Public report of agentscope-ai/QwenPaw, 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, 15:29 UTC · Survey ID cd_e814e34327764d179ba76eb22532861d

agentscope-ai/QwenPaw

Measured 16 November 2026, 15:19 UTC, at code version 53f81b5

CAI score 58.6out of 100 At risk Up 3.1 since the last survey

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

A very large codebase: 802,996 lines of product code in 47 projects, tests not counted · Estimated rebuild effort: about 11.5 person-years · Weakest lens: Accessibility, 55.0

Findings by how serious they are

464 critical 5249 serious 494 minor

13 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, 15:19 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 ▸

93of 93 dimensions measured by tools.
6146of 6207 findings point to an exact file and line, so you can open each one in the code. The other 61 concern the repository as a whole, such as missing documentation.
93dimensions across 8 lenses, read from 802,996 lines of product code in 47 projects.
Chapters

Executive summary

agentscope-ai/QwenPaw is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back because it has controls that only work with a mouse. It scores 58.6 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 55.0, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is recording design decisions, worth about 1.5 points. Making the controls keyboard-usable would lift Accessibility itself, worth about 2.5 points.

255 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Forty-seven known security holes in the packages the code depends on can be used by attackers, and forty-five secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. The 21 pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The nine pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 11 parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.

The product code is 802,996 lines, about €1,700,000 to rebuild.

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

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

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

Code composition: what the lines of code are
Product code 58%Tests 42%
New since the last survey: 782 findings

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

  • Cyclomatic Complexity · PostComposer.PostComposer (cyclomatic 171) REDACTED
  • Cyclomatic Complexity · PostAssistance.PostAssistance (cyclomatic 113) console/src/pages/CommunityFeedback/PostAssistance.tsx
  • Cyclomatic Complexity · index.CommunityPage (cyclomatic 83) console/src/pages/Market/Community/index.tsx
  • Cyclomatic Complexity · PostDetail.PostDetail (cyclomatic 79) console/src/pages/Market/Community/PostDetail.tsx
  • Cyclomatic Complexity · index.CommunitySettings (cyclomatic 67) console/src/pages/Settings/Community/index.tsx
  • Cyclomatic Complexity · ResourceReportModal.ResourceReportModal (cyclomatic 57) console/src/pages/CommunityFeedback/ResourceReportModal.tsx
  • Cyclomatic Complexity · CodexMigrationProvider._inventory (cyclomatic 48) src/qwenpaw/portability/providers/codex.py
  • Cyclomatic Complexity · NotificationSettings.NotificationSettings (cyclomatic 39) console/src/notifications/NotificationSettings.tsx
  • Cyclomatic Complexity · CodexBackend._convert_notification (cyclomatic 36) plugins/harness/codex/adapter.py
  • Cyclomatic Complexity · BackendExecution._produce (cyclomatic 36) src/qwenpaw/runtime/backends/execution.py
  • Cyclomatic Complexity · Discussion.AnswerCard (cyclomatic 34) console/src/pages/Market/Community/Discussion.tsx
  • Cyclomatic Complexity · osNotifyStore.useOsNotify (cyclomatic 33) console/src/os/osNotifyStore.ts
  • Cyclomatic Complexity · QuoteSelection.QuoteSelection (cyclomatic 33) console/src/pages/Chat/QuoteSelection.tsx
  • Cyclomatic Complexity · DependencyUpgradeManager.stage (cyclomatic 32) src/qwenpaw/plugins/dependency_upgrade.py
  • Cyclomatic Complexity · ArticleTocCard.ArticleToc (cyclomatic 32) console/src/pages/Market/Community/ArticleTocCard.tsx
  • Cyclomatic Complexity · DraftLibrary.DraftLibrary (cyclomatic 30) console/src/pages/CommunityFeedback/DraftLibrary.tsx
  • Cyclomatic Complexity · ResourcePicker.ResourcePicker (cyclomatic 29) console/src/pages/CommunityFeedback/ResourcePicker.tsx
  • Cyclomatic Complexity · community_drafts._rich_markdown (cyclomatic 28) src/qwenpaw/app/community_drafts.py
  • Cyclomatic Complexity · community_connection.normalize_message (cyclomatic 27) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · useInboxData.mapEventToPushMessage (cyclomatic 27) console/src/pages/Inbox/hooks/useInboxData.ts
  • Cyclomatic Complexity · CommunityInboxState.CommunityInboxState (cyclomatic 26) console/src/pages/Inbox/components/CommunityInboxState.tsx
  • Cyclomatic Complexity · CommunityConnectionService.sync_once (cyclomatic 25) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · dependency_gate._host_observation_roots (cyclomatic 24) src/qwenpaw/plugins/dependency_gate.py
  • Cyclomatic Complexity · wheel_additions._install_data (cyclomatic 24) src/qwenpaw/plugins/wheel_additions.py
  • Cyclomatic Complexity · Discussion.CommentRow (cyclomatic 24) console/src/pages/Market/Community/Discussion.tsx
  • Cyclomatic Complexity · Settings.Settings (cyclomatic 24) plugins/harness/_shared/ui/Settings.tsx
  • Cyclomatic Complexity · RelatedResources.RelatedResources (cyclomatic 23) console/src/pages/Market/Community/RelatedResources.tsx
  • Cyclomatic Complexity · usePluginManager.usePluginManager.changeActivation (cyclomatic 23) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts
  • Cyclomatic Complexity · CommunityConnectionService.community_request (cyclomatic 22) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · CommentEmojiPicker.CommentEmojiPicker (cyclomatic 22) console/src/pages/Market/Community/CommentEmojiPicker.tsx
  • Cyclomatic Complexity · PostBody.PostBody (cyclomatic 22) REDACTED
  • Cyclomatic Complexity · CodexBackend._handle_server_request (cyclomatic 21) plugins/harness/codex/adapter.py
  • Cyclomatic Complexity · CommunityConnectionService._connection_from_tokens (cyclomatic 21) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · console.get_inbox_events (cyclomatic 21) src/qwenpaw/app/routers/console.py
  • Cyclomatic Complexity · markdown_cjk.normalize_cjk_emphasis (cyclomatic 21) src/qwenpaw/utils/markdown_cjk.py
  • Cyclomatic Complexity · turnUsage.wrapChatResponseUsageStream (cyclomatic 21) console/src/pages/Chat/turnUsage.ts
  • Cyclomatic Complexity · legacyPostDrafts.listPostDrafts (cyclomatic 21) console/src/pages/CommunityFeedback/legacyPostDrafts.ts
  • Cyclomatic Complexity · CommentImageAttachments.CommentImageAttachments (cyclomatic 21) console/src/pages/Market/Community/CommentImageAttachments.tsx
  • Cyclomatic Complexity · community_feedback.resolve_feedback_link (cyclomatic 20) src/qwenpaw/app/community_feedback.py
  • Cyclomatic Complexity · dependencies.observe_dependencies (cyclomatic 20) src/qwenpaw/plugins/execution/dependencies.py
  • Cyclomatic Complexity · CodexRolloutReader._index (cyclomatic 20) src/qwenpaw/portability/providers/codex_rollout_reader.py
  • Cyclomatic Complexity · index.SessionListPollingController (cyclomatic 20) console/src/components/SessionListPollingController/index.tsx
  • Cyclomatic Complexity · index.ProjectSelectModal (cyclomatic 20) console/src/components/ProjectSelectModal/index.tsx
  • Cyclomatic Complexity · BackendModelSelector.BackendModelSelector (cyclomatic 20) console/src/pages/Chat/components/BackendModelSelector.tsx
  • Cyclomatic Complexity · discovery.resolve_codex_binary_info (cyclomatic 19) plugins/harness/codex/discovery.py
  • Cyclomatic Complexity · event_mapper.history_items (cyclomatic 19) plugins/harness/qoder/event_mapper.py
  • Cyclomatic Complexity · CommunityConnectionService._request (cyclomatic 19) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · community_drafts._inline_nodes (cyclomatic 19) src/qwenpaw/app/community_drafts.py
  • Cyclomatic Complexity · console.post_mark_inbox_read (cyclomatic 19) src/qwenpaw/app/routers/console.py
  • Cyclomatic Complexity · DependencyUpgradeManager._legacy_collect_consumers (cyclomatic 19) src/qwenpaw/plugins/dependency_upgrade.py
  • Cyclomatic Complexity · DependencyReadEvidence.from_mapping (cyclomatic 19) src/qwenpaw/plugins/execution/dependencies.py
  • Cyclomatic Complexity · _RolloutMetadataState.update (cyclomatic 19) src/qwenpaw/portability/providers/codex_rollout_reader.py
  • Cyclomatic Complexity · useOsNotifyPoller.useOsNotifyPoller (cyclomatic 19) console/src/os/useOsNotifyPoller.ts
  • Cyclomatic Complexity · MatrixStateStore._migrate_previous_state (cyclomatic 18) plugins/channel/matrix/qwenpaw_channel_matrix/state.py
  • Cyclomatic Complexity · OpenVikingClient._request (cyclomatic 18) plugins/memory/openviking/backend/client.py
  • Cyclomatic Complexity · ToolRegistry.filter (cyclomatic 18) src/qwenpaw/runtime/tool_registry.py
  • Cyclomatic Complexity · usePluginLoader.loadFrontendPlugin (cyclomatic 18) console/src/plugins/usePluginLoader.ts
  • Cyclomatic Complexity · PushMessageCard.PushMessageCard (cyclomatic 18) console/src/pages/Inbox/components/PushMessageCard.tsx
  • Cyclomatic Complexity · CommunityConnectionService.status (cyclomatic 17) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · module_isolation.probe_plugin_source (cyclomatic 17) src/qwenpaw/plugins/module_isolation.py
  • Cyclomatic Complexity · BackendExecution._content_from_request (cyclomatic 17) src/qwenpaw/runtime/backends/execution.py
  • Cyclomatic Complexity · HarnessSessionBridge._output_block (cyclomatic 17) src/qwenpaw/runtime/backends/session.py
  • Cyclomatic Complexity · qwenpaw_desktop::notifications::poll_console (cyclomatic 17) console/src-tauri/src/notifications.rs
  • Cyclomatic Complexity · ScreenshotEditor.ScreenshotEditor (cyclomatic 17) console/src/pages/CommunityFeedback/ScreenshotEditor.tsx
  • Cyclomatic Complexity · useHarnessConnection.useHarnessConnection.connect (cyclomatic 17) plugins/harness/_shared/ui/useHarnessConnection.ts
  • Cyclomatic Complexity · MatrixPlatform.start (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · CodexBackend.run_turn (cyclomatic 16) plugins/harness/codex/adapter.py
  • Cyclomatic Complexity · CodexBackend._history_item (cyclomatic 16) plugins/harness/codex/adapter.py
  • Cyclomatic Complexity · pool_service._register_pool_skill_entry (cyclomatic 16) src/qwenpaw/agents/skill_system/pool_service.py
  • Cyclomatic Complexity · CommunityConnectionService.complete (cyclomatic 16) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · CommunityConnectionService._password_reconnect (cyclomatic 16) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · community_connection.normalize_platform_message (cyclomatic 16) src/qwenpaw/app/community_connection.py
  • Cyclomatic Complexity · plugin_commands.install (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · providers_cmd._select_llm_model (cyclomatic 16) src/qwenpaw/cli/providers_cmd.py
  • Cyclomatic Complexity · ChannelBackend._probe_once (cyclomatic 16) src/qwenpaw/plugins/channel_adapter.py
  • Cyclomatic Complexity · DependencyGate.evaluate (cyclomatic 16) src/qwenpaw/plugins/dependency_gate.py
  • Cyclomatic Complexity · dependency_recovery.recover_additions (cyclomatic 16) src/qwenpaw/plugins/dependency_recovery.py
  • Cyclomatic Complexity · worker.run (cyclomatic 16) src/qwenpaw/plugins/execution/worker.py
  • Cyclomatic Complexity · sdk_version.validate_sdk (cyclomatic 16) src/qwenpaw/plugins/sdk_version.py
  • Cyclomatic Complexity · markdown_cjk._delimiter_flanking (cyclomatic 16) src/qwenpaw/utils/markdown_cjk.py
  • Cyclomatic Complexity · index.CommunityFeedback (cyclomatic 16) console/src/components/CommunityFeedback/index.tsx
  • Cyclomatic Complexity · HostBubbles.HostMessage (cyclomatic 16) console/src/pages/Chat/HostBubbles.tsx
  • Cyclomatic Complexity · CommunityRelatedResources.CommunityRelatedResources (cyclomatic 16) console/src/pages/Inbox/components/CommunityRelatedResources.tsx
  • Cyclomatic Complexity · useInboxData.useInboxData.loadPushMessages (cyclomatic 16) console/src/pages/Inbox/hooks/useInboxData.ts
  • Cognitive Complexity · PostComposer.PostComposer (cognitive 200) REDACTED
  • Cognitive Complexity · index.CommunityPage (cognitive 101) console/src/pages/Market/Community/index.tsx
  • Cognitive Complexity · qwenpaw_desktop::notifications::poll_console (cognitive 71) console/src-tauri/src/notifications.rs
  • Cognitive Complexity · CodexMigrationProvider._inventory (cognitive 58) src/qwenpaw/portability/providers/codex.py
  • Cognitive Complexity · index.CommunitySettings (cognitive 53) console/src/pages/Settings/Community/index.tsx
  • Cognitive Complexity · PostDetail.PostDetail (cognitive 52) console/src/pages/Market/Community/PostDetail.tsx
  • Cognitive Complexity · wheel_additions._install_data (cognitive 49) src/qwenpaw/plugins/wheel_additions.py
  • Cognitive Complexity · BackendExecution._produce (cognitive 47) src/qwenpaw/runtime/backends/execution.py
  • Cognitive Complexity · DependencyUpgradeManager.stage (cognitive 44) src/qwenpaw/plugins/dependency_upgrade.py
  • Cognitive Complexity · CodexRolloutReader._index (cognitive 42) src/qwenpaw/portability/providers/codex_rollout_reader.py
  • Cognitive Complexity · CommunityConnectionService.sync_once (cognitive 40) src/qwenpaw/app/community_connection.py
  • Cognitive Complexity · CodexBackend._convert_notification (cognitive 39) plugins/harness/codex/adapter.py
  • Cognitive Complexity · PostAssistance.PostAssistance (cognitive 39) console/src/pages/CommunityFeedback/PostAssistance.tsx
  • Cognitive Complexity · ArticleTocCard.ArticleToc (cognitive 39) console/src/pages/Market/Community/ArticleTocCard.tsx
  • Cognitive Complexity · NotificationSettings.NotificationSettings (cognitive 37) console/src/notifications/NotificationSettings.tsx
  • Cognitive Complexity · dependency_recovery.recover_additions (cognitive 35) src/qwenpaw/plugins/dependency_recovery.py

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

Fixed since the last survey: 1553 findings

These 1553 critical or serious findings were in the previous survey, on 4 November 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · CodexMigrationProvider.inventory (cyclomatic 52) src/qwenpaw/portability/providers/codex.py
  • Cyclomatic Complexity · AgentBackendFields.AgentBackendFields (cyclomatic 52) console/src/pages/Settings/Agents/components/AgentBackendFields.tsx
  • Cyclomatic Complexity · viewer.html.renderReport (cyclomatic 45) scripts/startup_profile/viewer.html
  • Cyclomatic Complexity · viewer.html.showFunctionDetail (cyclomatic 40) scripts/startup_profile/viewer.html
  • Cyclomatic Complexity · HarnessRuntime.stream (cyclomatic 38) src/qwenpaw/harnesses/runtime.py
  • Cyclomatic Complexity · CodexAdapter._convert_notification (cyclomatic 36) src/qwenpaw/harnesses/codex/adapter.py
  • Cyclomatic Complexity · check_channel_contracts.scan_contract_tests (cyclomatic 33) scripts/check_channel_contracts.py
  • Cyclomatic Complexity · python_backend._observe_host_dependencies (cyclomatic 32) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · cleanup_windows_sandbox._cleanup_single_elevated_sandbox (cyclomatic 31) scripts/cleanup_windows_sandbox.py
  • Cyclomatic Complexity · ExecTracer.trace_calls (cyclomatic 28) scripts/startup_profile/tracer.py
  • Cyclomatic Complexity · canary.check (cyclomatic 23) scripts/model_catalog/canary.py
  • Cyclomatic Complexity · stage_channel_runtime._validate_official_resources (cyclomatic 23) scripts/pack-tauri/stage_channel_runtime.py
  • Cyclomatic Complexity · DependencyUpgradeManager._prepare_resolution (cyclomatic 23) src/qwenpaw/plugins/dependency_upgrade.py
  • Cyclomatic Complexity · CodexAdapter._handle_server_request (cyclomatic 21) src/qwenpaw/harnesses/codex/adapter.py
  • Cyclomatic Complexity · dependencies.check_import_origins (cyclomatic 21) src/qwenpaw/plugins/execution/dependencies.py
  • Cyclomatic Complexity · matrix_legacy._capture (cyclomatic 21) src/qwenpaw/plugins/matrix_legacy.py
  • Cyclomatic Complexity · python_backend._host_progress_provenance (cyclomatic 21) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · cleanup_windows_sandbox.main (cyclomatic 20) scripts/cleanup_windows_sandbox.py
  • Cyclomatic Complexity · CodexRolloutReader._index (cyclomatic 20) src/qwenpaw/harnesses/codex/rollout_reader.py
  • Cyclomatic Complexity · check_channel_contracts._class_gate_error (cyclomatic 19) scripts/check_channel_contracts.py
  • Cyclomatic Complexity · discovery.resolve_codex_binary_info (cyclomatic 19) src/qwenpaw/harnesses/codex/discovery.py
  • Cyclomatic Complexity · _RolloutMetadataState.update (cyclomatic 19) src/qwenpaw/harnesses/codex/rollout_reader.py
  • Cyclomatic Complexity · event_mapper.history_items (cyclomatic 19) src/qwenpaw/harnesses/qoder/event_mapper.py
  • Cyclomatic Complexity · PythonBackend.reconcile_host_observations (cyclomatic 19) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · MatrixPlatform._bind_authenticated_state (cyclomatic 18) REDACTED
  • Cyclomatic Complexity · cleanup_windows_sandbox._cleanup_single_container (cyclomatic 18) scripts/cleanup_windows_sandbox.py
  • Cyclomatic Complexity · CodexAdapter.run_turn (cyclomatic 18) src/qwenpaw/harnesses/codex/adapter.py
  • Cyclomatic Complexity · dependency_gate.admit_shared_dependencies (cyclomatic 18) src/qwenpaw/plugins/dependency_gate.py
  • Cyclomatic Complexity · python_backend._capture_host_progress (cyclomatic 18) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · capabilities.filterMenuForAgentCapabilities (cyclomatic 18) console/src/layouts/registry/capabilities.ts
  • Cyclomatic Complexity · generate_plugin_metadata.build_official_channel_bundle (cyclomatic 17) scripts/pack/generate_plugin_metadata.py
  • Cyclomatic Complexity · HarnessRuntime._content_from_request (cyclomatic 17) src/qwenpaw/harnesses/runtime.py
  • Cyclomatic Complexity · HarnessSessionBridge._output_block (cyclomatic 17) src/qwenpaw/harnesses/session.py
  • Cyclomatic Complexity · PluginProcess._open (cyclomatic 17) src/qwenpaw/plugins/execution/process.py
  • Cyclomatic Complexity · PythonBackend.admit_existing (cyclomatic 17) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · python_backend._observe_host_delta (cyclomatic 17) src/qwenpaw/plugins/python_backend.py
  • Cyclomatic Complexity · useSidebarSessionListData.useSessionListData (cyclomatic 17) console/src/layouts/useSidebarSessionListData.ts
  • Cyclomatic Complexity · HarnessModelSelector.HarnessModelSelector (cyclomatic 17) console/src/pages/Chat/components/HarnessModelSelector.tsx
  • Cyclomatic Complexity · CodexAdapter._history_item (cyclomatic 16) src/qwenpaw/harnesses/codex/adapter.py
  • Cyclomatic Complexity · dependency_gate.parse_requirements_file (cyclomatic 16) src/qwenpaw/plugins/dependency_gate.py
  • Cyclomatic Complexity · PluginLoader._recover_startup_transactions (cyclomatic 16) src/qwenpaw/plugins/loader.py
  • Cyclomatic Complexity · CodexMigrationProvider._discover_skills (cyclomatic 16) src/qwenpaw/portability/providers/codex.py
  • Cognitive Complexity · check_channel_contracts.scan_contract_tests (cognitive 79) scripts/check_channel_contracts.py
  • Cognitive Complexity · python_backend._observe_host_dependencies (cognitive 74) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · CodexMigrationProvider.inventory (cognitive 64) src/qwenpaw/portability/providers/codex.py
  • Cognitive Complexity · ExecTracer.trace_calls (cognitive 59) scripts/startup_profile/tracer.py
  • Cognitive Complexity · cleanup_windows_sandbox._cleanup_single_elevated_sandbox (cognitive 51) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · python_backend._host_progress_provenance (cognitive 51) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · dependencies.check_import_origins (cognitive 47) src/qwenpaw/plugins/execution/dependencies.py
  • Cognitive Complexity · HarnessRuntime.stream (cognitive 46) src/qwenpaw/harnesses/runtime.py
  • Cognitive Complexity · CodexRolloutReader._index (cognitive 42) src/qwenpaw/harnesses/codex/rollout_reader.py
  • Cognitive Complexity · AgentBackendFields.AgentBackendFields (cognitive 42) console/src/pages/Settings/Agents/components/AgentBackendFields.tsx
  • Cognitive Complexity · CodexAdapter._convert_notification (cognitive 39) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · canary.check (cognitive 38) scripts/model_catalog/canary.py
  • Cognitive Complexity · viewer.html.showFunctionDetail (cognitive 37) scripts/startup_profile/viewer.html
  • Cognitive Complexity · cleanup_windows_sandbox._cleanup_single_container (cognitive 36) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · PythonBackend.reconcile_host_observations (cognitive 34) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · check_channel_contracts._class_gate_error (cognitive 31) scripts/check_channel_contracts.py
  • Cognitive Complexity · stage_channel_runtime._validate_official_resources (cognitive 30) scripts/pack-tauri/stage_channel_runtime.py
  • Cognitive Complexity · HarnessRuntime._content_from_request (cognitive 30) src/qwenpaw/harnesses/runtime.py
  • Cognitive Complexity · MatrixPlatform._bind_authenticated_state (cognitive 29) REDACTED
  • Cognitive Complexity · viewer.html.renderReport (cognitive 29) scripts/startup_profile/viewer.html
  • Cognitive Complexity · cleanup_windows_sandbox.main (cognitive 28) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · matrix_legacy._capture (cognitive 28) src/qwenpaw/plugins/matrix_legacy.py
  • Cognitive Complexity · dependency_gate.admit_shared_dependencies (cognitive 27) src/qwenpaw/plugins/dependency_gate.py
  • Cognitive Complexity · DependencyUpgradeManager._prepare_resolution (cognitive 27) src/qwenpaw/plugins/dependency_upgrade.py
  • Cognitive Complexity · discovery.resolve_codex_binary_info (cognitive 26) src/qwenpaw/harnesses/codex/discovery.py
  • Cognitive Complexity · python_backend._capture_host_progress (cognitive 26) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · generate_plugin_metadata.build_official_channel_bundle (cognitive 25) scripts/pack/generate_plugin_metadata.py
  • Cognitive Complexity · generate_plugin_metadata.discover_and_pack (cognitive 25) scripts/pack/generate_plugin_metadata.py
  • Cognitive Complexity · projection.project_runtime (cognitive 24) src/qwenpaw/harnesses/codex/projection.py
  • Cognitive Complexity · PluginLoader._recover_startup_transactions (cognitive 24) src/qwenpaw/plugins/loader.py
  • Cognitive Complexity · python_backend._observe_host_delta (cognitive 24) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · stage_channel_runtime._validate_closure (cognitive 23) scripts/pack-tauri/stage_channel_runtime.py
  • Cognitive Complexity · verify_desktop_artifacts.main (cognitive 23) scripts/pack/verify_desktop_artifacts.py
  • Cognitive Complexity · review_runner._fix_nested_code_fences (cognitive 23) scripts/review-bot/review_runner.py
  • Cognitive Complexity · python_backend._files_for_loaded_origins (cognitive 23) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · wheel_additions._install_scripts (cognitive 23) src/qwenpaw/plugins/wheel_additions.py
  • Cognitive Complexity · stage_channel_runtime._extract_wheel (cognitive 22) scripts/pack-tauri/stage_channel_runtime.py
  • Cognitive Complexity · generate_plugin_metadata.main (cognitive 22) scripts/pack/generate_plugin_metadata.py
  • Cognitive Complexity · CodexAdapter.list_external_threads (cognitive 22) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · CodexAdapter.run_turn (cognitive 22) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · cleanup_windows_sandbox._cleanup_single_unelevated_sandbox (cognitive 21) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · validate_channel_contracts._validate_model_contract (cognitive 21) scripts/pack/validate_channel_contracts.py
  • Cognitive Complexity · PlaywrightDriver.__init__ (cognitive 21) scripts/verify/desktop_verify.py
  • Cognitive Complexity · CodexAdapter._handle_server_request (cognitive 21) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · CodexMigrationProvider._discover_skills (cognitive 21) src/qwenpaw/portability/providers/codex.py
  • Cognitive Complexity · generate_plugin_metadata._dry_run_scan (cognitive 20) scripts/pack/generate_plugin_metadata.py
  • Cognitive Complexity · _RolloutMetadataState.update (cognitive 20) src/qwenpaw/harnesses/codex/rollout_reader.py
  • Cognitive Complexity · check_channel_contracts._direct_imports (cognitive 19) scripts/check_channel_contracts.py
  • Cognitive Complexity · check_channel_contracts._build_source_index (cognitive 19) scripts/check_channel_contracts.py
  • Cognitive Complexity · cleanup_windows_sandbox._remove_ace_by_sid_api (cognitive 19) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · cleanup_windows_sandbox._cleanup_deny_paths_protection (cognitive 19) scripts/cleanup_windows_sandbox.py
  • Cognitive Complexity · real_behavior_proof_policy._extract_sections (cognitive 19) scripts/github/real_behavior_proof_policy.py
  • Cognitive Complexity · CodexAdapter.models (cognitive 19) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · CodexAdapter._history_item (cognitive 19) src/qwenpaw/harnesses/codex/adapter.py
  • Cognitive Complexity · event_mapper.history_items (cognitive 19) src/qwenpaw/harnesses/qoder/event_mapper.py
  • Cognitive Complexity · PluginProcess._open (cognitive 19) src/qwenpaw/plugins/execution/process.py
  • Cognitive Complexity · python_backend._check_read_history (cognitive 19) src/qwenpaw/plugins/python_backend.py
  • Cognitive Complexity · sync_shared_channel_descriptors.main (cognitive 18) scripts/channel_isolation/sync_shared_channel_descriptors.py
Rebuild cost: about €1,700,000 · Estimate
Cost to rebuild€560,000 to €2,800,000, for 9,254 to 29,357 hours of work, about 11.5 person-years for 6 to 22 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 59. 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.
SizeVery large: 802,996 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 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml.
Raises the score by about 1.5 points · Low effort · ADR Quality
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 2.5 points · Medium effort · Keyboard semantics
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 2.1 points · Medium effort · Forms & labels

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €1,700,000 to build again, about 11.5 person-years of work. Its weakest lens is Accessibility, at 55.0 (Adequate). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 1.5 points for low effort, because it clears the 1 ADR Quality 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.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 1,126,215 lines over the last 90 days, which is about 4,567,428 lines a year. At that pace, the extra work comes to an estimated 693.5 to 4161.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: 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.

2027 modules, with 1743 dependencies between them. 3 loops run through 7 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1987 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 console.src.api.types.provider2 console.src.components.Chat.ToolCards.shared.types3 console.src.features.files-workspace.types4 console.src.layouts.DockableSidebar5 console.src.os6 console.src.pages.Chat7 console.src.plugins.registry.types8 console.src.utils9 plugins.apps.qwenpaw-creator.backend.domain.enums10 plugins.apps.qwenpaw-creator.backend.schemas.common11 plugins.apps.qwenpaw-creator.backend.services.project_files.models12 plugins.apps.qwenpaw-creator.ui.src.contracts.creator.projectSnapshot13 qwenpaw_desktop.computer_use_server.state14 src.qwenpaw.config.config15 src.qwenpaw.drivers.contracts16 src.qwenpaw.loop.gates.base17 src.qwenpaw.plugins18 src.qwenpaw.plugins.tools19 src.qwenpaw.portability20 src.qwenpaw.providers.provider21 src.qwenpaw.runtime.hooks22 console.src.features.files-workspace23 console.src.pages.Agent.Skills.components24 plugins.apps.qwenpaw-creator.backend.services.project_files.store25 plugins.apps.qwenpaw-creator.backend.services.runtime_files.models26 plugins.apps.qwenpaw-creator.ui.src.api.creator27 plugins.apps.qwenpaw-creator.ui.src.components.blueprint28 plugins.apps.qwenpaw-creator.ui.src.components.creator29 plugins.apps.qwenpaw-creator.ui.src.lib30 src.qwenpaw.app.routers31 src.qwenpaw.plugins.sdk32 src.qwenpaw.providers33 src.qwenpaw.providers.openai_provider34 plugins.apps.qwenpaw-creator.backend.services.project_files.facade35 plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models36 plugins.apps.qwenpaw-creator.backend.api37 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver38 plugins.apps.qwenpaw-creator.backend.services.media_files39 plugins.apps.qwenpaw-creator.backend.services.project_files40 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime
1 console.src.api.types.provider
2 console.src.components.Chat.ToolCards.shared.types
3 console.src.features.files-workspace.types
4 console.src.layouts.DockableSidebar
5 console.src.os
6 console.src.pages.Chat
7 console.src.plugins.registry.types
8 console.src.utils
9 plugins.apps.qwenpaw-creator.backend.domain.enums
10 plugins.apps.qwenpaw-creator.backend.schemas.common
11 plugins.apps.qwenpaw-creator.backend.services.project_files.models
12 plugins.apps.qwenpaw-creator.ui.src.contracts.creator.projectSnapshot
13 qwenpaw_desktop.computer_use_server.state
14 src.qwenpaw.config.config
15 src.qwenpaw.drivers.contracts
16 src.qwenpaw.loop.gates.base
17 src.qwenpaw.plugins
18 src.qwenpaw.plugins.tools
19 src.qwenpaw.portability
20 src.qwenpaw.providers.provider
21 src.qwenpaw.runtime.hooks
22 console.src.features.files-workspace6
23 console.src.pages.Agent.Skills.components1
24 plugins.apps.qwenpaw-creator.backend.services.project_files.store2
25 plugins.apps.qwenpaw-creator.backend.services.runtime_files.models3
26 plugins.apps.qwenpaw-creator.ui.src.api.creator7
27 plugins.apps.qwenpaw-creator.ui.src.components.blueprint6
28 plugins.apps.qwenpaw-creator.ui.src.components.creator1
29 plugins.apps.qwenpaw-creator.ui.src.lib4
30 src.qwenpaw.app.routers151
31 src.qwenpaw.plugins.sdk1
32 src.qwenpaw.providers6
33 src.qwenpaw.providers.openai_provider2
34 plugins.apps.qwenpaw-creator.backend.services.project_files.facade2
35 plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models42
36 plugins.apps.qwenpaw-creator.backend.api42155
37 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver1113
38 plugins.apps.qwenpaw-creator.backend.services.media_files2393174
39 plugins.apps.qwenpaw-creator.backend.services.project_files119671
40 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime34233
Uses a module listed above itPart of a loopThe module itself
1 console.src.api.types.provider2 console.src.components.Chat.ToolCards.shared.types3 console.src.features.files-workspace.types4 console.src.layouts.DockableSidebar5 console.src.os6 console.src.pages.Chat7 console.src.plugins.registry.types8 console.src.utils9 plugins.apps.qwenpaw-creator.backend.domain.enums10 plugins.apps.qwenpaw-creator.backend.schemas.common11 plugins.apps.qwenpaw-creator.backend.services.project_files.models12 plugins.apps.qwenpaw-creator.ui.src.contracts.creator.projectSnapshot13 qwenpaw_desktop.computer_use_server.state14 src.qwenpaw.config.config15 src.qwenpaw.drivers.contracts16 src.qwenpaw.loop.gates.base17 src.qwenpaw.plugins18 src.qwenpaw.plugins.tools19 src.qwenpaw.portability20 src.qwenpaw.providers.provider21 src.qwenpaw.runtime.hooks22 console.src.features.files-workspace23 console.src.pages.Agent.Skills.components24 plugins.apps.qwenpaw-creator.backend.services.project_files.store25 plugins.apps.qwenpaw-creator.backend.services.runtime_files.models26 plugins.apps.qwenpaw-creator.ui.src.api.creator27 plugins.apps.qwenpaw-creator.ui.src.components.blueprint28 plugins.apps.qwenpaw-creator.ui.src.components.creator29 plugins.apps.qwenpaw-creator.ui.src.lib30 src.qwenpaw.app.routers31 src.qwenpaw.plugins.sdk32 src.qwenpaw.providers33 src.qwenpaw.providers.openai_provider34 plugins.apps.qwenpaw-creator.backend.services.project_files.facade35 plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models36 plugins.apps.qwenpaw-creator.backend.api37 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver38 plugins.apps.qwenpaw-creator.backend.services.media_files39 plugins.apps.qwenpaw-creator.backend.services.project_files40 plugins.apps.qwenpaw-creator.backend.services.file_agent_runtimeconsole.src.api.types.provider1console.src.components.Chat.ToolCards.shared.types2console.src.features.files-workspace.types3console.src.layouts.DockableSidebar4console.src.os5console.src.pages.Chat6console.src.plugins.registry.types7console.src.utils8plugins.apps.qwenpaw-creator.backend.domain.enums9plugins.apps.qwenpaw-creator.backend.schemas.common10plugins.apps.qwenpaw-creator.backend.services.project_files.models11plugins.apps.qwenpaw-creator.ui.src.contracts.creator.projectSnapshot12qwenpaw_desktop.computer_use_server.state13src.qwenpaw.config.config14src.qwenpaw.drivers.contracts15src.qwenpaw.loop.gates.base16src.qwenpaw.plugins17src.qwenpaw.plugins.tools18src.qwenpaw.portability19src.qwenpaw.providers.provider20src.qwenpaw.runtime.hooks21console.src.features.files-workspace22console.src.pages.Agent.Skills.components23plugins.apps.qwenpaw-creator.backend.services.project_files.store24plugins.apps.qwenpaw-creator.backend.services.runtime_files.models25plugins.apps.qwenpaw-creator.ui.src.api.creator26plugins.apps.qwenpaw-creator.ui.src.components.blueprint27plugins.apps.qwenpaw-creator.ui.src.components.creator28plugins.apps.qwenpaw-creator.ui.src.lib29src.qwenpaw.app.routers30src.qwenpaw.plugins.sdk31src.qwenpaw.providers32src.qwenpaw.providers.openai_provider33plugins.apps.qwenpaw-creator.backend.services.project_files.facade34plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models35plugins.apps.qwenpaw-creator.backend.api36plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver37plugins.apps.qwenpaw-creator.backend.services.media_files38plugins.apps.qwenpaw-creator.backend.services.project_files39plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime4061237614151162242421551113239317411967134233+1987 more modules (most-connected shown)

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

At a glance — Architecture · 81.9 · Strong ·

At a glance — Maturity · 59.6 · Adequate · gated by M4 ·

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

At a glance — Security · 77.8 · Adequate · gated by D29, D36 ·

At a glance — Domain Modelling · 73.7 · Adequate · gated by DM5 ·

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

At a glance — Performance · 85.0 · Strong ·

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 — Injection416High / Critical
A03:2025 — Software Supply Chain Failures113High / Critical
A02:2025 — Security Misconfiguration27High / Critical
A07:2025 — Authentication Failures2High / Critical
A01:2025 — Broken Access Control1Medium

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; 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.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml.+1.5 ptsLowADR Quality
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.5 ptsMediumKeyboard semantics
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.1 ptsMediumForms & labels
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.+2.0 ptsMediumText alternatives
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+1.5 ptsMediumPage structure
Reconcile the README with reality: scripts/startup_profile/README.md names Python 3.8 or later, but packages/qwenpawmail-mcp/pyproject.toml:10 requires `requires-python = ">=3.10"` (the lowest of 2 declarations): the package does not install on Python 3.8; plugins/channel/azure_bot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/matrix/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/onebot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/qq/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist.+1.3 ptsMediumDocumentation accuracy
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.+0.9 ptsMediumArchitecture documentation
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.+0.8 ptsMediumOutbound HTTP resilience

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.0SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.1SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.4SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.9SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED

How the grades work

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

Critical — 464

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

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

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

Could not be resolved — 13

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

Methodology & how to trust this report

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 93 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 — 93 dimensions across the health lenses
D1D2D3D4D5D6D10D11D12D13D14D15D16D17D19D20D24D26D28D29D30D31D32D34D35D36D37D43D44AC1AC2AC3AC4AC5AX10AX2AX3AX4AX6AX9C2DM1DM10DM11DM12DM4DM5DM6DM9M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X17X19X2X21X23X24X25X26X27X28X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e4f0-c057-7055-811b-e237ff86b8ca.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .py, and our analyzer cannot run the .py test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 80.5% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 8,335 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 1,286 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22'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. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D31 IaC & Container Security — 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. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
  • D31 IaC & Container Security — 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. Plugins/apps/qwenpaw-creator/Dockerfile.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 6 of 7 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • D32 Data Compliance (PII/GDPR) — 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. `console/src/components/SessionGroupDnd/index.tsx`, `console/src/hooks/useUiLocale.ts`, `console/src/i18n.ts`, `console/src/pages/Agent/Config/components/TimezoneAtlas/atlas.d.ts`, `console/src/pages/Chat/headlineFilter.ts`, … (+18 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.
  • 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. 144 further occurrence(s) are not listed individually; the score already reflects all 184.
  • 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
  • AC6 Visual & motion safety — 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. Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex').
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/qwenpaw/tool_calls/_hooks.py, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. An image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository. (rule: registry). The renderer reported: compose up failed (exit 17 — an image could not be built) — failed to solve: agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to resolve source metadata for agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to do request: Head "https://agentscope-registry.ap-southeast-1.cr.aliyuncs.com/v2/agentscope/uv/manifests/0.13.4": Forbidden; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; runtime evidence skipped.
  • 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 17 — an image could not be built) — failed to solve: agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to resolve source metadata for agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to do request: Head "https://agentscope-registry.ap-southeast-1.cr.aliyuncs.com/v2/agentscope/uv/manifests/0.13.4": Forbidden; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; runtime evidence skipped.
  • C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • DM8 Value-object opportunities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • 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.
  • 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — 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 reads a prose claim (a path, a setting, a variable, a route, a version, a project, an install, a bare project name in a command) only in text identified as English: the cues that tell a claim from an absence, the past, a plan or an example are an English lexicon, and on other text they would let a false claim through. Links, image targets, fenced commands with an explicit path or a package-manager script, and env-fence variables are checked in every language. 'und' is text the identifier could not name (too short, mixed script, no function words).
  • 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. 491 further occurrence(s) are not listed individually; the score already reflects all 531.
  • 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. 493 further occurrence(s) are not listed individually; the score already reflects all 533.
  • 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. 100 further occurrence(s) are not listed individually; the score already reflects all 140.
  • 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. 29 further occurrence(s) are not listed individually; the score already reflects all 69.
  • 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. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • 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. 401 further occurrence(s) are not listed individually; the score already reflects all 441.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
  • X26 Unsynchronised callback handoff — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — 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. 539 further occurrence(s) are not listed individually; the score already reflects all 579.
  • X4 Structured logging — 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. 331 further occurrence(s) are not listed individually; the score already reflects all 371.
  • X7 Silent fallback defaults — 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. 68 further occurrence(s) are not listed individually; the score already reflects all 108.

Repo exclusion declarations: 24 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.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • 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 Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

1118 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was index.ChatPage at 534. A further 11 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 qwenpaw_desktop::computer_use_server::platform_macos::input::keycode_for at 87 — they are counted neither in the figure above nor in this dimension's score. 8 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: console/src-tauri/src/computer_use_server/platform_macos/input.rs (qwenpaw_desktop::computer_use_server::platform_macos::input::keycode_for at 87), console/src-tauri/src/computer_use_server/platform_windows/uia.rs (qwenpaw_desktop::computer_use_server::platform_windows::uia::control_type_name at 42), console/src/components/SkillVisual/index.tsx (index.getFileIcon at 41), console/src-tauri/src/computer_use_server/platform_windows/input.rs (qwenpaw_desktop::computer_use_server::platform_windows::input::virtual_key at 36), console/src/pages/Settings/Models/components/providerIcon.ts (providerIcon.providerIcon at 35), and 3 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

ModelConfigModal.ModelConfigModal::renderCard (cyclomatic 44) · ×5plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3142
qwenpaw_desktop::computer_use_server::dispatch::dispatch_request (cyclomatic 42) · ×3console/src-tauri/src/computer_use_server/dispatch.rs:128
create_plan.normalize_plan (cyclomatic 28) · ×2src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:193
ChannelDrawer.ChannelDrawer::prepareSave (cyclomatic 22) · ×2console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1992
validate_skill.validate_draft (cyclomatic 20) · ×2src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:409

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

What to do

  1. Bring the 13 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with index.ChatPage (cyclomatic 534), PostComposer.PostComposer (cyclomatic 171), SessionProjectDirectory.SessionProjectDirectory (cyclomatic 163). — 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 13 together lifts Cyclomatic Complexity from 2.0 to about 3.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

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

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

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

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

1711 method(s) exceeded the cognitive complexity threshold of 15; the worst was index.ChatPage at 536.

qwenpaw_desktop::notifications::poll_console (cognitive 71) · ×13console/src-tauri/src/notifications.rs:483
ModelConfigModal.ModelConfigModal::handleProtocolChange (cognitive 36) · ×7plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2086
index.CronJobsPage::handleSubmit (cognitive 40) · ×2console/src/pages/Control/CronJobs/index.tsx:392
validate_skill.validate_draft (cognitive 30) · ×2src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:409
create_plan.normalize_plan (cognitive 28) · ×2src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:193

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

What to do

  1. Bring the 117 bodies over 60 down to 60 or less in Cognitive Complexity — start with index.ChatPage (cognitive 536), work_graph.derive_work_graph (cognitive 287), index.InboxPage (cognitive 262). — 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 117 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

753 god class(es) detected.

FunctionTooLong: ModelConfigModal.ModelConfigModal · ×344plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1012
FileTooLong: file_agent_runtime/driver.py · ×311plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py
TooManyMethods: PluginLoader · ×57src/qwenpaw/plugins/loader.py:311
ClassTooLong: ModelConfigModal · ×40plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1
TooManyFunctions: qwenpaw_desktop::computer_use_server::platform_windows::inputconsole/src-tauri/src/computer_use_server/platform_windows/input.rs:33

What to do

  1. Resolve the 344 FunctionTooLong finding(s) in God Classes — start with index.tsx (54), AgentLoopCard.tsx (5), Discussion.tsx (5). — One of this dimension's main actionable groups (344 warning-level).
  2. Resolve the 311 FileTooLong finding(s) in God Classes — start with index.tsx (17), REDACTED (14), manager.py (5). — One of this dimension's main actionable groups (311 warning-level).
  3. Resolve the 57 TooManyMethods finding(s) in God Classes — start with REDACTED (8), manager.py (4), adapter.py (4). — One of this dimension's main actionable groups (57 warning-level).

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

D4 · Code Duplication8.5 / 10Strong✓ Tool-verified

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

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

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

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

Duplicated block (12 lines × 2) · ×28plugins/apps/qwenpaw-creator/backend/models/asr_model.py:383
Duplicated block (9 lines × 2) · ×22packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:269
Edited copy of a member (9 corresponding lines) · ×20plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:58
Duplicated block (7 lines × 2) · ×20plugins/apps/agent-kanban/backend/main.py:802
Duplicated block (8 lines × 2) · ×19plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:245

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

What to do

  1. Resolve the 28 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with service.py (2), asr_model.py, config.py. — One of this dimension's main actionable groups (28 warning-level).
  2. Resolve the 22 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with driver.py (2), detectors.py (2), mail_client.py. — One of this dimension's main actionable groups (22 warning-level).
  3. Resolve the 20 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with api.py (2), REDACTED (2), cleanup_windows_sandbox.py (2). — One of this dimension's main actionable groups (20 warning-level).

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 8 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.8 / 10 · rule-coverage 100% · ceiling Verified

8 of 479 classes have LCOM4 above 3.

Low cohesion: ChatPage (LCOM4 16) · ×8e2e/pages/chat_page.py:22

What to do

  1. Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with chat_page.py, REDACTED, sdk.py. — One of this dimension's main actionable groups (8 warning-level).

Detailed fixes: d6_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

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

Mock-dominated test: shows the snapshot conflict and refreshes instead of a generic failure · ×81plugins/apps/qwenpaw-creator/ui/src/components/agent/__tests__/ExecutionAuthorizationCard.test.tsx:395
Skipped (documented): importFromHub: an empty task id exits the poll loop with success:false · ×3console/src/pages/Agent/Skills/useSkills.paths.test.ts:600

✓ 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 2 measured tier(s). JavaScript/TypeScript (vitest via `npm ci --ignore-scripts` in console/; vitest via `npm ci --ignore-scripts` in plugins/apps/qwenpaw-creator/ui/ (401 tests); vitest via `npm ci --ignore-scripts` in plugins/apps/qwenpaw-data/ui/ (3 tests); vitest via `npm ci --ignore-scripts` in plugins/bundle/qwenpaw-openui/frontend/ (25 tests)): measured (0 flaky); Python (2 distributions): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.3 / 10Exemplary✓ 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 9.3 / 10 · rule-coverage 100% · ceiling Verified

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

Outdated: futures-util · ×14

✓ On the Gold path — maintain.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.2 / 10Stronggated by 255 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 9.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: console/src/pages/Chat/index.tsx (40×534=21360); plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx (7×481=3367); console/src/layouts/Sidebar.tsx (22×120=2640) Repeated repair below the complexity floor: src/qwenpaw/providers/openai_provider.py (8 of 11 changes were fixes); src/qwenpaw/hub/control_app.py (7 of 12 changes were fixes); src/qwenpaw/providers/retry_chat_model.py (5 of 6 changes were fixes)

Hotspot: console/src/pages/Chat/index.tsx · ×239console/src/pages/Chat/index.tsx:1219
Repeated repair: src/qwenpaw/providers/openai_provider.py · ×16src/qwenpaw/providers/openai_provider.py:203

What to do

  1. Resolve the 239 Hotspot finding(s) in Churn × Complexity Hotspots — start with index.tsx (29), manager.py (3), REDACTED (2). — One of this dimension's main actionable groups (239 warning-level).
  2. Resolve the 16 Repeated repair finding(s) in Churn × Complexity Hotspots — start with openai_provider.py, control_app.py, retry_chat_model.py. — One of this dimension's main actionable groups (16 warning-level).

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

D16 · Bus Factor9.1 / 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.1 / 10 · rule-coverage 100% · ceiling Documented

168 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py. Counted over 1917 of the 2881 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×12
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 12 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

12 deducted task-comment markers across 802996 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 · ×12tests/conftest.py:442

What to do

  1. Resolve the 12 TodoComment finding(s) in Explicit Debt — start with model_factory.py (2), conftest.py, test_provider_contract.py. — One of this dimension's main actionable groups (12 warning-level).

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

2 of 2 documentation facets pass in full. 150 document(s) read across 15 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundpyproject.toml:117

What to do

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

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

D24 · Comment Value9.6 9.2 / 10Exemplary✓ 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 9.2 / 10 · rule-coverage 96% · ceiling Documented

13 of 3305 judged comments only repeat the code they sit on (0.4 %). 195 comment(s) in another language or script were not judged.

redundant comment · ×13console/src/contexts/ApprovalContext.test.tsx:15
doc comments repeat the namesconsole/src/api/modules/mcp.ts:16

✓ On the Gold path — maintain.

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

D26 · Project Cohesion7.9 / 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.9 / 10 · rule-coverage 100% · ceiling Documented

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

Projects may be oversized for their cohesion · ×5pyproject.toml:1

What to do

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

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

416 finding(s): 0 critical, 352 high, 44 medium, 20 low. 254 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 71 file(s) — `console/src-tauri/src/computer_use_helper.rs` (line 244, line 246), `console/src/api/modules/provider.test.ts` (line 66, line 73), `console/src/components/SessionGroupDnd/index.tsx` (line 198), `console/src/features/files-workspace/FilesDrawer.test.tsx` (line 695), `console/src/hooks/useUiLocale.ts` (line 40), … (+66 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 21 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

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

What to do

  1. Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 254 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (255 issue-level, 1 of them charged here).
  2. Resolve the 21 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (21 issue-level).
  3. Resolve the 18 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (18 issue-level).

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

93 finding(s): 1 critical, 46 high, 43 medium, 3 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 45 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (42), REDACTED (3). — One of this dimension's main actionable groups (45 issue-level).
  2. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 High 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 4.1 / 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.1 / 10 · rule-coverage 86% · ceiling Documented

29 finding(s): 1 critical, 8 high, 18 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 23 file(s) — `console/src/components/SessionGroupDnd/index.tsx`, `console/src/hooks/useUiLocale.ts`, `console/src/i18n.ts`, `console/src/pages/Agent/Config/components/TimezoneAtlas/atlas.d.ts`, `console/src/pages/Chat/headlineFilter.ts`, … (+18 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness9.3 / 10Adequategated by 11 critical findings✓ Tool-verified

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

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

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

134 of 1917 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/qwenpaw/agents/skills/pptx-en/scripts/office/validators/base.py. Counted over 1917 of the 2881 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×11src/qwenpaw/agents/skills/pptx-en/scripts/office/validators/base.py:1
Orphaned file · ×123src/qwenpaw/checkpoints/policy.py:1
Further orphaned files (smaller)

What to do

  1. Resolve the 11 Orphaned knowledge finding(s) in Knowledge Freshness — start with REDACTED (3), adapter.py (2), service.py. — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 123 Orphaned file finding(s) in Knowledge Freshness — start with docx.py (3), __init__.py (3), pptx.py (3). — One of this dimension's main actionable groups (123 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 11 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: providerIcon.ts↔provider_manager.py 75%; ChannelDrawer.tsx↔registry.py 73%; constants.ts↔config.py 73%

Change coupling: ChannelDrawer.tsx ↔ registry.py · ×9console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1
Change-coupling hub: provider_manager.py → ProviderConfigModal.tsx, providerIcon.ts, ollama_provider.py · ×2src/qwenpaw/providers/provider_manager.py

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with ChannelDrawer.tsx (2), LocalModelManageModal.tsx (2), constants.ts. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with provider_manager.py, ReactAgentCard.tsx. — One of this dimension's main actionable groups (2 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ 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 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 62 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

  • 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). (×9) — REDACTED:16, plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:358, plugins/apps/qwenpaw-creator/ui/src/components/agent/FileProjectReviewPanel.tsx:425, …
  • 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. — plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:153

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.1 / 10Adequate✓ Tool-verified

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

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

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

  • This 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. (×14) — console/src/components/ConfigFields.tsx:35, console/src/components/ConfigFields.tsx:52, console/src/components/ProjectSelectModal/index.tsx:160, …
  • 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. (×9) — console/src/components/ProjectSelectModal/index.tsx:159, console/src/components/ProjectSelectModal/index.tsx:167, console/src/components/ProjectSelectModal/index.tsx:457, …
  • 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. (×17) — console/src/components/SessionGroupHeader/index.tsx:159, console/src/components/SessionItem/index.tsx:255, console/src/components/SessionItem/index.tsx:352, …

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.5 / 10Strong✓ 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>. (×3) — console/index.html:2, plugins/apps/qwenpaw-data/ui/public/data-console/index.html:2, plugins/bundle/chrome/assets/extensions/chrome/popup/popup.html:2
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — website/src/pages/Downloads/index.tsx:214

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 semantics3.4 / 10Weak✓ Tool-verified

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

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

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

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×15) — console/src/components/ContextMenu/index.tsx:96, console/src/layouts/AppBrand.tsx:232, console/src/layouts/AppBrand.tsx:296, …
  • 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}. (×4) — console/src/components/interaction/DurationWheel.tsx:193, plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2555, plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3283, …
  • This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×3) — console/src/os/Launcher.tsx:65, console/src/pages/Chat/ModelSelector/ModelPickerPopover.tsx:62, console/src/pages/Coding/TabbedEditor.tsx:1158
  • 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. (×3) — console/src/os/MissionControl.tsx:95, console/src/os/WallpaperPicker.tsx:24, console/src/pages/Market/Community/ImageLightbox.tsx:38
  • This <div> binds pointerdown, pointerup, pointermove 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. — console/src/os/WindowFrame.tsx:463
  • 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. — console/src/pages/Chat/components/MessageQueuePanel.tsx:267
  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×4) — REDACTED:482, REDACTED:529, REDACTED:598, …
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×5) — REDACTED:832, plugins/bundle/cloudpaw/ui/src/index.ts:485, plugins/bundle/cloudpaw/ui/src/index.ts:588, …
  • This <img> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control. — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/EpisodeOverviewRail.tsx:100
  • This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control. (×3) — plugins/apps/qwenpaw-creator/ui/src/components/creator/VideoTemplatePicker.tsx:130, plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1973, plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1991

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.

AX10 · Code composition9.3 / 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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

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

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

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

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

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

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

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

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

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

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

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

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

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

C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

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

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

DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM10 · One transaction, one aggregate9.8 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

  • `ProviderImportService._apply` saves `AsyncDriverCardStore`, `AsyncCredentialStore` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/qwenpaw/portability/importer.py:144

What to do

  • Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
DM11 · Constructible invalid state10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM4 · Rich vs anemic model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

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

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

DM5 · Encapsulated state1.0 / 10Critical✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

  • `AdvisorClient` exposes publicly writable state (last_usage). — src/qwenpaw/modes/advisor/models.py:125

What to do

  • Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — 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 decisions6.0 / 10Adequate✓ 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.

  • console.src.api.modules.toolCalls.ToolCallInfo's [offload_reason, status] are judged in console.src.components.Chat.ToolCards.shared.ToolCallControlPopover, console.src.hooks.useToolCallControl — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold.ManualAdmission's [project_id, store] are judged in plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold.HoldAwareExecutionStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.work_graph.WorkNode's [kind, node_id] are judged in plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.work_scheduler.WorkGraphScheduler, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.workgraph_execution — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.project_files.assets.StagedAsset's [sha256, size_bytes] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution, plugins.apps.qwenpaw-creator.backend.services.project_files.assets.AssetFileStore, plugins.apps.qwenpaw-creator.backend.services.project_files.remote_cache — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.project_files.models.ArtifactSlot's [kind, owner_ref] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.rough_cut, plugins.apps.qwenpaw-creator.backend.services.project_files.blueprint_readiness, plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex, plugins.apps.qwenpaw-creator.backend.services.project_files.script_artifacts — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.project_files.models.ArtifactSlot's [selected_version_id, version_ids] are judged in plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex, plugins.apps.qwenpaw-creator.backend.services.project_files.script_import — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex's [artifact_versions_by_id, files_by_id] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.project_files.store.ProjectSnapshot's [etag, generation] are judged in plugins.apps.qwenpaw-creator.backend.api.project_file_routes, plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService, plugins.apps.qwenpaw-creator.backend.services.project_files.commit.ProjectCommitBoundary, plugins.apps.qwenpaw-creator.backend.services.project_files.poller.ProjectPoller, plugins.apps.qwenpaw-creator.backend.services.project_files.recovery.ProjectCommitRecoveryCoordinator, plugins.apps.qwenpaw-creator.backend.services.project_files.review.ProjectReviewService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.ExecutionAuthorizationRecord's [requested_model, requested_provider] are judged in plugins.apps.qwenpaw-creator.backend.api.file_execution_routes, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver.FileCreatorAgentRuntime — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.SpecialistRunRecord's [input_etag, request_fingerprint, target_refs] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [input_etag, input_generation] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [input_etag, input_refs, request_fingerprint] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [kind, metadata, status] are judged in plugins.apps.qwenpaw-creator.backend.api.file_asset_routes, plugins.apps.qwenpaw-creator.backend.services.project_files.remote_cache — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [kind, status] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService, plugins.apps.qwenpaw-creator.backend.services.source_analysis.service — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [request_fingerprint, task_id] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [result, status] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.publication_retry — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • plugins.apps.qwenpaw-creator.backend.services.runtime_files.models.ProjectChange's [after_hash, before_hash] are judged in plugins.apps.qwenpaw-creator.backend.services.project_files.commit.ProjectCommitBoundary, plugins.apps.qwenpaw-creator.backend.services.runtime_files.manual_edit_store, plugins.apps.qwenpaw-creator.backend.services.runtime_files.manual_edit_store.ManualEditBuffer — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.qwenpaw.app.approvals.service.ApprovalActor's [agent_id, channel, root_session_id, session_id, user_id] are judged in src.qwenpaw.app.approvals.service.ApprovalService, src.qwenpaw.runtime.builtin_commands — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.qwenpaw.config.config.ModelSlotConfig's [model, provider_id] are judged in src.qwenpaw.providers.provider_manager.ProviderManager, src.qwenpaw.runtime.commands.control.model_handler.ModelCommandHandler — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.qwenpaw.drivers.contracts.DriverCard's [name, protocol] are judged in src.qwenpaw.agents.skill_system.registry, src.qwenpaw.drivers.handler.DriverHandler — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.qwenpaw.plugins.architecture.PluginManifest's [id, version] are judged in src.qwenpaw.plugins.official_channels, src.qwenpaw.plugins.updates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.qwenpaw.providers.model_info.ModelInfo's [supports_image, supports_multimodal] are judged in src.qwenpaw.agents.prompt, src.qwenpaw.agents.tools.view_media — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.

What to do

  • Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
M1 · Documentation (README)9.0 / 10Exemplary✓ 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.

M2 · Architecture documentation5.0 / 10Adequate✓ 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.
  • `website/public/blog/cross-harness-agent-os.en.md` draws the system's parts, and the drawing no longer matches the code: it leaves out `seed`, which the repository has beside the units it does draw. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape. — website/public/blog/cross-harness-agent-os.en.md:233
  • `website/public/blog/cross-harness-agent-os.zh.md` draws the system's parts, and the drawing no longer matches the code: it leaves out `seed`, which the repository has beside the units it does draw. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape. — website/public/blog/cross-harness-agent-os.zh.md:232

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.
  • Update website/public/blog/cross-harness-agent-os.en.md so it draws the parts the code has today: add seed.
  • Update website/public/blog/cross-harness-agent-os.zh.md so it draws the parts the code has today: add seed.
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 accuracy2.3 / 10Critical✓ 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.

  • scripts/startup_profile/README.md names Python 3.8 or later, but packages/qwenpawmail-mcp/pyproject.toml:10 requires `requires-python = ">=3.10"` (the lowest of 2 declarations): the package does not install on Python 3.8. 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. — scripts/startup_profile/README.md:84
  • plugins/channel/azure_bot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/azure_bot/README.md:95
  • plugins/channel/matrix/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/matrix/README.md:117
  • plugins/channel/onebot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/onebot/README.md:72
  • plugins/channel/qq/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/qq/README.md:45
  • plugins/channel/sip/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/sip/README.md:117
  • plugins/channel/voice/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/voice/README.md:98
  • plugins/channel/wechat/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/wechat/README.md:38
  • plugins/channel/wecom/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/wecom/README.md:15
  • plugins/channel/xiaoyi/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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. — plugins/channel/xiaoyi/README.md:63

What to do

  • Reconcile the README with reality: scripts/startup_profile/README.md names Python 3.8 or later, but packages/qwenpawmail-mcp/pyproject.toml:10 requires `requires-python = ">=3.10"` (the lowest of 2 declarations): the package does not install on Python 3.8; plugins/channel/azure_bot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/matrix/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/onebot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist; plugins/channel/qq/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.md` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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 · Observability7.8 / 10Strong✓ Tool-verified

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

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

  • Only 27/29 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/qwenpawmail-mcp`, `plugins/channel/azure_bot`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling7.0 / 10Strong✓ 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.

  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:7

What to do

  • Dependabot is configured but does not watch `cargo` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ 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.

P5 · DR & Backup10.0 / 10Exemplary✓ 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.

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.

  • `httpx.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — plugins/bundle/qwenpaw-pet/emitter.py:229
  • `httpx.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — plugins/bundle/qwenpaw-pet/emitter.py:728, plugins/bundle/qwenpaw-pet/emitter.py:770
  • `aiohttp.ClientSession(` 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. (×4) — plugins/channel/discord/qwenpaw_channel_discord/platform.py:428, plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:489, plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/utils.py:45, …
  • `requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — REDACTED:796, REDACTED:800
  • `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:805
  • `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:76
  • `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:162
  • `httpx.AsyncClient(` 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. — src/qwenpaw/drivers/credentials/providers.py:83

What to do

  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
PF3 · Async & latency hygiene8.5 / 10Strong✓ 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.

  • `_ensure_aliyun_cli` is async and calls subprocess.run — a blocking call inside async code stalls the event loop — every other task on it waits for as long as it runs. — REDACTED:392

What to do

  • Python: await the async equivalent (asyncio.sleep, an async HTTP client such as httpx.AsyncClient or aiohttp, asyncio.create_subprocess_exec), or move the blocking call off the loop with `await asyncio.to_thread(...)`; never call asyncio.run inside a coroutine — await the coroutine.
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 Duplication6.6 / 10Adequate✓ 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.

  • 122 duplicated blocks under console/src/pages/ have copies in at least two of the sibling directories Agent, AppCenter, Chat, Coding, CommunityFeedback, Control (+7 more sibling(s) not listed) — 49 of them are reported below, and 73 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 122 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 122 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 122 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. — console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33
  • 72 duplicated blocks under console/src/ have copies in at least two of the sibling directories api, components, contexts, features, hooks, layouts (+7 more sibling(s) not listed) — 37 of them are reported below, and 35 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 72 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 72 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 72 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. — console/src/os/useOsAppMarket.ts:32
  • 61 duplicated blocks under the repository root have copies in at least two of the sibling directories console, plugins — 24 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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. — console/src/pages/Settings/Models/components/modals/CustomProviderModal.tsx:110
  • 23 duplicated blocks under console/src/pages/Settings/ have copies in at least two of the sibling directories AgentStats, Agents, Backups, Environments, Models, PluginManager (+4 more sibling(s) not listed) — 6 of them are reported below, and 17 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. — console/src/pages/Settings/PluginManager/index.tsx:87
  • 21 duplicated blocks under plugins/apps/qwenpaw-creator/ui/src/ have copies in at least two of the sibling directories components, lib, pages, selectors, store — 12 of them are reported below, and 9 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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. — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371
  • 15 duplicated blocks under plugins/apps/qwenpaw-creator/ui/src/components/ have copies in at least two of the sibling directories agent, blueprint, common, creator, layout, onboarding (+2 more sibling(s) not listed) — 8 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 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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. — plugins/apps/qwenpaw-creator/ui/src/components/agent/MentionInput.tsx:252
  • 8 duplicated blocks under console/src/pages/Agent/ have copies in at least two of the sibling directories ACP, Checkpoints, MCP, Skills, Tools — 6 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 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. — console/src/pages/Agent/Skills/index.tsx:100
  • 6 duplicated blocks under plugins/memory/ have copies in at least two of the sibling directories adbpg, openviking, powercontext — 4 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 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. — plugins/memory/adbpg/frontend/src/index.tsx:134
  • 5 duplicated blocks under console/src/pages/Control/ have copies in at least two of the sibling directories Channels, CronJobs, Sessions — 2 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — console/src/pages/Control/CronJobs/index.tsx:749
  • console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33 · console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:27 — the two spans are one implementation copied and then locally edited — 1055 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. — console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33
  • console/src/pages/Market/Community/Discussion.tsx:299 · console/src/pages/Market/Community/Discussion.tsx:866 — the two spans are one implementation copied and then locally edited — 938 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Market/Community/Discussion.tsx:299
  • console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:14 · console/src/pages/Settings/Security/components/FileGuardSection.tsx:26 — the two spans are one implementation copied and then locally edited — 870 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. — console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:14
  • console/src/pages/Settings/Models/components/modals/JsonConfigEditor.tsx:5 · console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:55 — the two spans are one implementation copied and then locally edited — 756 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. — console/src/pages/Settings/Models/components/modals/JsonConfigEditor.tsx:5
  • plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:123 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectComposer.tsx:207 — the two spans are one implementation copied and then locally edited — 702 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. — plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:123
  • console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:440 · console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:583 — the two spans are one implementation copied and then locally edited — 593 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:440
  • console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:76 · console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:76 — the two spans are one implementation copied and then locally edited — 712 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. — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:76
  • console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:428 · console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:621 — the two spans are one implementation copied and then locally edited — 539 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. — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:428
  • console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:127 · console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:257 — the two spans are one implementation copied and then locally edited — 494 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. — console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:127
  • console/src/plugins/registry/store.ts:192 · console/src/plugins/registry/store.ts:552 — the two spans are one implementation copied and then locally edited — 578 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/plugins/registry/store.ts:192
  • console/src/pages/Chat/components/ApprovalLevelToggle.tsx:156 · console/src/pages/Chat/components/BackendApprovalToggle.tsx:75 — the two spans are one implementation copied and then locally edited — 391 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. — console/src/pages/Chat/components/ApprovalLevelToggle.tsx:156
  • plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2695 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2767 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2695
  • console/src/os/useOsAppMarket.ts:32 · console/src/pages/Settings/PluginManager/hooks/useMarketPlugins.ts:46 — the two spans are one implementation copied and then locally edited — 423 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. — console/src/os/useOsAppMarket.ts:32
  • plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371 · plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoAssetsPage.tsx:185 — the two spans are one implementation copied and then locally edited — 290 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. — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371
  • console/src/pages/Market/Community/Discussion.tsx:740 · console/src/pages/Market/Community/Discussion.tsx:1022 — the two spans are one implementation copied and then locally edited — 331 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Market/Community/Discussion.tsx:740
  • console/src/pages/Agent/Skills/components/PoolTransferModal.tsx:127 · console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:184 — the two spans are one implementation copied and then locally edited — 308 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. — console/src/pages/Agent/Skills/components/PoolTransferModal.tsx:127
  • console/src/pages/Agent/Skills/useSkillsPage.tsx:680 · console/src/pages/Settings/SkillPool/useSkillPool.tsx:616 — the two spans are one implementation copied and then locally edited — 308 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. — console/src/pages/Agent/Skills/useSkillsPage.tsx:680
  • plugins/apps/qwenpaw-data/scripts/data-console/paw-bridge.js:14 · plugins/apps/qwenpaw-data/ui/public/data-console/paw-bridge.js:14 — these 2 files are line-for-line copies of one another — 59 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. — plugins/apps/qwenpaw-data/scripts/data-console/paw-bridge.js:14
  • plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:484 · plugins/apps/qwenpaw-creator/ui/src/store/projectSnapshotStore.ts:406 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:484
  • console/src/pages/Settings/Agents/components/AgentModal.tsx:253 · console/src/pages/Settings/Agents/components/AgentModal.tsx:325 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Settings/Agents/components/AgentModal.tsx:253
  • console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:147 · console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:255 — the two spans are one implementation copied and then locally edited — 289 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:147
  • console/src/pages/Chat/HostBubbles.tsx:326 · console/src/pages/Chat/HostBubbles.tsx:402 — the two spans are one implementation copied and then locally edited — 293 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — console/src/pages/Chat/HostBubbles.tsx:326
  • console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:339 · console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:293 — the two spans are one implementation copied and then locally edited — 345 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. — console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:339
  • console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx:19 · console/src/components/Chat/ToolCards/cards/WriteFileCard.tsx:19 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx:19
  • console/src/pages/Agent/MCP/components/MCPAccessClientPanel.tsx:25 · console/src/pages/Agent/MCP/components/MCPAccessToolPanel.tsx:26 — the two spans are one implementation copied and then locally edited — 254 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. — console/src/pages/Agent/MCP/components/MCPAccessClientPanel.tsx:25
  • console/src/pages/Agent/Skills/index.tsx:38 · console/src/pages/Agent/Skills/useSkillsPage.tsx:900 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — console/src/pages/Agent/Skills/index.tsx:38
  • plugins/apps/qwenpaw-creator/ui/src/components/onboarding/AssetsTour.tsx:13 · plugins/apps/qwenpaw-creator/ui/src/components/onboarding/ProjectTour.tsx:20 — the two spans are one implementation copied and then locally edited — 234 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. — plugins/apps/qwenpaw-creator/ui/src/components/onboarding/AssetsTour.tsx:13
  • console/src/pages/Agent/Config/components/AgentLoopCard.tsx:156 · console/src/pages/Agent/Config/components/AgentLoopCard.tsx:737 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — console/src/pages/Agent/Config/components/AgentLoopCard.tsx:156
  • plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2642 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3398 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2642
  • console/src/os/MissionControl.tsx:29 · console/src/os/SpacesPanel.tsx:24 — the two spans are one implementation copied and then locally edited — 386 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. — console/src/os/MissionControl.tsx:29
  • console/src/pages/Agent/Skills/index.tsx:100 · console/src/pages/Agent/Tools/index.tsx:228 — the two spans are one implementation copied and then locally edited — 285 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. — console/src/pages/Agent/Skills/index.tsx:100

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

  • console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:17 imports react-syntax-highlighter/dist/esm/styles/prism, 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. — console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:17
  • REDACTED:8 imports react-syntax-highlighter/dist/esm/styles/prism, 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. — REDACTED:8
  • console/src/hooks/useUiLocale.ts:6 imports @agentscope-ai/design/lib/i18n, 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. — console/src/hooks/useUiLocale.ts:6
  • console/src/pages/Chat/HostBubbles.tsx:20 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Request/Card, 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. — console/src/pages/Chat/HostBubbles.tsx:20
  • console/src/pages/Chat/HostBubbles.tsx:21 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder, 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. — console/src/pages/Chat/HostBubbles.tsx:21
  • console/src/pages/Chat/HostBubbles.tsx:22 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Actions, 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. — console/src/pages/Chat/HostBubbles.tsx:22
  • console/src/pages/Chat/HostBubbles.tsx:23 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Error, 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. — console/src/pages/Chat/HostBubbles.tsx:23
  • console/src/pages/Chat/HostBubbles.tsx:24 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Reasoning, 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. — console/src/pages/Chat/HostBubbles.tsx:24
  • console/src/pages/Chat/HostBubbles.tsx:25 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Tool, 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. — console/src/pages/Chat/HostBubbles.tsx:25
  • console/src/pages/Chat/HostBubbles.tsx:36 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/Context/ChatAnywhereOptionsContext, 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. — console/src/pages/Chat/HostBubbles.tsx:36
  • console/src/pages/Chat/index.tsx:95 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/Context/ChatAnywhereI18nContext, 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. — console/src/pages/Chat/index.tsx:95
  • console/src/pages/Chat/messageDisplay.ts:1 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/types, 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. — console/src/pages/Chat/messageDisplay.ts:1
  • console/src/pages/Chat/turnEndedProvider.tsx:22 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder, 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. — console/src/pages/Chat/turnEndedProvider.tsx:22
  • console/src/plugins/pawapp-sdk/types.ts:2 reaches into another package with a relative path (../../../../src/qwenpaw/plugins/frontend/paw) — import the package by name instead. — console/src/plugins/pawapp-sdk/types.ts:2
  • console/src/plugins/types/qwenpaw.d.ts:2 reaches into another package with a relative path (../../../../src/qwenpaw/plugins/frontend/host) — import the package by name instead. — console/src/plugins/types/qwenpaw.d.ts:2

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 Complexity8.0 / 10Strong✓ Tool-verified

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

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

  • (anonymous) has cyclomatic complexity 175 and cognitive complexity 271; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1165
  • WorkbenchSurface has cyclomatic complexity 110 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284
  • buildAgentProgressModel has cyclomatic complexity 90 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:262
  • AgentDock has cyclomatic complexity 82 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136
  • IssueCard has cyclomatic complexity 70 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:248
  • SessionProjectDirectory has cyclomatic complexity 68 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — console/src/features/project-directory/SessionProjectDirectory.tsx:114
  • ElementDetail has cyclomatic complexity 66 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:322
  • deriveAgentLiveStatus has cyclomatic complexity 63 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:400
  • fileReviewPresentation has cyclomatic complexity 63 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — plugins/apps/qwenpaw-creator/ui/src/lib/fileProjectReviewPresentation.ts:127
  • EmbeddingModelCard has cyclomatic complexity 55 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/pages/Agent/Config/components/EmbeddingModelCard.tsx:44
  • ChannelDrawer has cyclomatic complexity 55 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183
  • ThinkingControl has cyclomatic complexity 54 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. — console/src/features/thinking/ThinkingControl.tsx:15
  • (anonymous) has cyclomatic complexity 53 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/pages/Chat/index.tsx:3257
  • FilesDrawer has cyclomatic complexity 53 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/features/files-workspace/FilesDrawer.tsx:74
  • ToolCallCard has cyclomatic complexity 53 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:760
  • (anonymous) has cyclomatic complexity 51 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. — console/src/pages/Chat/index.tsx:3583
  • PostComposer has cyclomatic complexity 51 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:149
  • actionEnvelopeFromText has cyclomatic complexity 50 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:307
  • ChatSenderTabsPanel has cyclomatic complexity 50 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 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. — console/src/pages/Chat/components/ChatSenderTabsPanel.tsx:45
  • TabbedEditor has cyclomatic complexity 50 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/pages/Coding/TabbedEditor.tsx:185
  • (anonymous) has cyclomatic complexity 49 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:123
  • (anonymous) has cyclomatic complexity 48 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1030
  • ChatPage has cyclomatic complexity 48 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — console/src/pages/Chat/index.tsx:1219
  • PlanPage has cyclomatic complexity 48 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:40
  • TimelineCanvas has cyclomatic complexity 48 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:120
  • (anonymous) has cyclomatic complexity 47 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1683
  • PostAssistance has cyclomatic complexity 46 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. — console/src/pages/CommunityFeedback/PostAssistance.tsx:58
  • PostDetail has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — console/src/pages/Market/Community/PostDetail.tsx:54
  • renderCard has cyclomatic complexity 45 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. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3142
  • settingsSearchTarget has cyclomatic complexity 44 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. — console/src/pages/SettingsCenter/settingsSearch.ts:386
  • InboxPage has cyclomatic complexity 44 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — console/src/pages/Inbox/index.tsx:161
  • ImportWorkflow has cyclomatic complexity 44 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. — console/src/pages/Import/index.tsx:189
  • BackgroundTaskPanel has cyclomatic complexity 43 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/pages/Chat/components/BackgroundTaskPanel.tsx:61
  • extractMediaFromBlocks has cyclomatic complexity 41 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:222
  • ExecutionAuthorizationCard has cyclomatic complexity 40 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. — plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:292
  • (anonymous) has cyclomatic complexity 39 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — console/src/pages/Chat/index.tsx:409
  • (anonymous) has cyclomatic complexity 39 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. — console/src/pages/Chat/index.tsx:1570
  • SessionItem 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. — console/src/components/SessionItem/index.tsx:69
  • ToolCardShell has cyclomatic complexity 39 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/components/Chat/ToolCards/shared/ToolCardShell.tsx:61
  • AppBrand has cyclomatic complexity 39 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — console/src/layouts/AppBrand.tsx:68
R3 · Large Files5.0 / 10Weak✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx has 4799 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1
  • console/src/pages/Chat/index.tsx has 4623 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Chat/index.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx has 2702 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx has 2549 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1
  • console/src/pages/Control/Channels/components/ChannelDrawer.tsx has 2409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx has 2289 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts has 2271 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts:1
  • console/src/pages/Hub/index.tsx has 2083 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Hub/index.tsx:1
  • console/src/os/useOsStyles.ts has 2053 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/os/useOsStyles.ts:1
  • console/src/pages/Chat/sessionApi/index.ts has 1847 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Chat/sessionApi/index.ts:1
  • plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts has 1780 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx has 1573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:1
  • REDACTED has 1544 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
  • console/src/pages/Agent/Config/components/AgentLoopCard.tsx has 1531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1
  • console/src/features/files-workspace/FilesNavigator.tsx has 1464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/features/files-workspace/FilesNavigator.tsx:1
  • console/src/pages/Coding/TabbedEditor.tsx has 1427 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Coding/TabbedEditor.tsx:1
  • plugins/bundle/chrome/frontend/src/index.tsx has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/bundle/chrome/frontend/src/index.tsx:1
  • console/src/pages/Chat/ModelSelector/index.tsx has 1356 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Chat/ModelSelector/index.tsx:1
  • console/src/features/project-directory/SessionProjectDirectory.tsx has 1348 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/features/project-directory/SessionProjectDirectory.tsx:1
  • console/src/pages/Settings/SkillPool/useSkillPool.tsx has 1341 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Settings/SkillPool/useSkillPool.tsx:1
  • REDACTED has 1311 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
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx has 1311 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:1
  • REDACTED has 1296 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
  • plugins/bundle/chrome/assets/extensions/chrome/service_worker.js has 1254 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:1
  • console/src/pages/Market/Community/Discussion.tsx has 1236 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Market/Community/Discussion.tsx:1
  • console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx has 1204 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:1
  • console/src/pages/Inbox/index.tsx has 1190 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Inbox/index.tsx:1
  • console/src/layouts/Sidebar.tsx has 1185 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/layouts/Sidebar.tsx:1
  • REDACTED has 1175 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
  • console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx has 1071 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:1
  • console/src/pages/Control/CronJobs/index.tsx has 1060 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Control/CronJobs/index.tsx:1
  • console/src/pages/Import/index.tsx has 1023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Import/index.tsx:1
  • REDACTED has 1022 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
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx has 1016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:1
  • console/src/pages/SettingsCenter/index.tsx has 1003 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/SettingsCenter/index.tsx:1
  • console/src/pages/Control/CronJobs/components/JobDrawer.tsx has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/Control/CronJobs/components/JobDrawer.tsx:1
  • console/src/layouts/SidebarSessionList.tsx has 978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/layouts/SidebarSessionList.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:1
  • console/src/pages/CommunityFeedback/PostAssistance.tsx has 925 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — console/src/pages/CommunityFeedback/PostAssistance.tsx:1
  • plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx has 914 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.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 Coverage9.4 / 10Exemplary✓ Tool-verified

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

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

  • 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) — REDACTED:1, plugins/bundle/chrome/frontend/src/index.tsx:1, plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness4.5 / 10Weak✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

  • 55 outdated package(s); JS/npm CVEs scored in D30
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.

  • The package in `plugins/bundle/chrome/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/chrome/frontend` (or the workspace's task runner). — plugins/bundle/chrome/frontend/package.json:8
  • The package in `plugins/bundle/computer-use/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/computer-use/frontend` (or the workspace's task runner). — plugins/bundle/computer-use/frontend/package.json:8
  • The package in `plugins/bundle/qwenpaw-pet/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/qwenpaw-pet/frontend` (or the workspace's task runner). — plugins/bundle/qwenpaw-pet/frontend/package.json:8
R7 · Dead Code7.9 / 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 299 application, 39 tooling and 775 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 (299 application, 39 tooling, 775 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 (×8) — plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementList.tsx, plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSwitcher.tsx, plugins/apps/qwenpaw-creator/ui/src/components/creator/VisualCoverageCheckpoint.tsx, …
  • no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/apps/qwenpaw-creator/ui/src/components/creator/VisualCoverageCheckpoint.tsx) — 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 — plugins/apps/qwenpaw-creator/ui/src/selectors/visualVariantCoverage.ts
  • no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (console/src/pages/Settings/Environments/components/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 (×4) — console/src/pages/Settings/Environments/components/EnvRow.tsx, console/src/pages/Settings/Environments/components/Toolbar.tsx, console/src/pages/Settings/Environments/components/AddButton.tsx, …
  • Nothing imports this binding — it is safe to review for removal. (×18) — console/src/api/modules/community.ts:71, console/src/api/modules/hubGovernance.ts:115, console/src/constants/community.ts:1, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Inbox/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Inbox/components/index.ts in the same commit, or the barrel will import a name that no longer exists. (×4) — console/src/pages/Inbox/components/ApprovalCard.tsx:32, console/src/pages/Inbox/components/CreateHarvestModal.tsx:42, console/src/pages/Inbox/components/HarvestCard.tsx:22, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/Models/components/sections/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/Models/components/sections/index.ts in the same commit, or the barrel will import a name that no longer exists. — console/src/pages/Settings/Models/components/sections/ModelsSection.tsx:32
  • Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/SkillPool/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/SkillPool/components/index.ts in the same commit, or the barrel will import a name that no longer exists. (×3) — console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:10, console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:42, console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:82

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 Hygiene6.0 / 10Adequate✓ 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 but not declared in any reachable REDACTED — installs work only by hoisting accident. (×2) — plugins/harness/_shared/ui/Settings.tsx:2, console/src/pages/Chat/sdkSessionLifecycle.integration.test.tsx:25

What to do

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

  • console/src/pages/Agent/Skills/components/ImportHubModal.tsx → console/src/pages/Agent/Skills/components/index.ts → console/src/pages/Agent/Skills/components/ImportHubModal.tsx — console/src/pages/Agent/Skills/components/ImportHubModal.tsx:11
  • console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx → console/src/pages/Chat/ModelSelector/ModelChoice.tsx → console/src/pages/Chat/ModelSelector/index.tsx → console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx — console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx:1
  • console/src/pages/Settings/Security/components/ToolGuardTab.tsx → console/src/pages/Settings/Security/components/index.ts → console/src/pages/Settings/Security/components/ToolGuardTab.tsx — console/src/pages/Settings/Security/components/ToolGuardTab.tsx:16

What to do

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

Other · Security — Only what this repository's own non-C# files could be read for was assessed — 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. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

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

  • `https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.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. — scripts/startup_profile/viewer.html:7

What to do

  • 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.
X1 · Async correctness7.9 / 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 task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception. (×33) — src/qwenpaw/tool_calls/_coordinator.py:293, src/qwenpaw/providers/provider_manager.py:438, src/qwenpaw/providers/provider_manager.py:697, …

What to do

  • Task from `asyncio.create_task` is not kept
X12 · Unreachable branch8.0 / 10Strong✓ Tool-verified

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

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

  • `if foreground_matches(hwnd) { return Ok(()); }` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 465) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/input.rs:471
  • `let element = observation.elements.get(element_id).ok_or(( "element_not_found…` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 520) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/uia.rs:526
  • `if unsafe { IsIconic(hwnd).as_bool() }` follows `{ return Err(format !("invalid hwnd: {}", args.hwnd)); }` (line 79) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/wgc.rs:82
  • `let mut title = [ 0_u16; 512 ];` follows `{ return None; }` (line 175) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/window.rs:178
  • `unsafe { PostMessageW(Some(hwnd), WM_CLOSE, WPARAM(0), LPARAM(0)) }.map_err(|…` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 242) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/window.rs:248
  • `thread::sleep(Duration::from_millis(CLOSE_POLL_INTERVAL_MS));` follows `{ return Ok(json !({ "closed" : true })); }` (line 251) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_windows/window.rs:254
  • `let filter = unsafe { SCContentFilter::initWithDesktopIndependentWindow(SCCon…` follows `{ let _ = sender.send(Err("The selected window is not on the active desktop."…` (line 231) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — console/src-tauri/src/computer_use_server/platform_macos/capture.rs:238

What to do

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document1.9 / 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.

  • `codex_non_root_session_kind` is public, takes a document from its caller (line 59) and hands it to `_source_label`, which calls itself at line 55 (`_source_label`) with a piece of `value` (and at line 56) — and nowhere in `_source_label` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_source_label` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/portability/providers/codex_rollout_reader.py:55
  • `canonical_json` is public, takes a document from its caller (line 165) and hands it to `_encode`, which calls itself at line 125 (`_encode`) with a piece of `value` — and nowhere in `_encode` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/channel_protocol/canonical.py:125
  • `create_trace` is public, takes a document from its caller (line 67) and hands it to `_to_jsonable`, which calls itself at line 30 (`_to_jsonable`) with a piece of `value` (and at line 32, line 34, line 36) — and nowhere in `_to_jsonable` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_to_jsonable` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/app/inbox_trace_store.py:30
  • `write_query_error_dump` is public, takes a document from its caller (line 48) and hands it to `_safe_json_serialize`, which calls itself at line 23 (`_safe_json_serialize`) with a piece of `obj` (and at line 25) — and nowhere in `_safe_json_serialize` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_safe_json_serialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/app/chats/query_error_dump.py:23
  • `resolve_step_refs` is public and takes `value: Any` from its caller, and it calls itself at line 220 (`resolve_step_refs`) with a piece of `value` (and at line 224) — and nowhere in `resolve_step_refs` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `resolve_step_refs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/agents/tools/run_tool_batch.py:220
  • `write_skill_to_dir` is public, takes a document from its caller (line 1356) and hands it to `_create_files_from_tree`, which calls itself at line 894 (`_create_files_from_tree`) with a piece of `tree` — and nowhere in `_create_files_from_tree` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_create_files_from_tree` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/qwenpaw/agents/skill_system/store.py:894
  • `hashProjectValue` is exported, takes a document from its caller (line 268) and hands it to `sortJson`, which calls itself at line 242 (`sortJson`) with a piece of `value` (and at line 247) — and nowhere in `sortJson` 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 `sortJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/apps/qwenpaw-creator/ui/src/api/creator/projects.ts:242
  • `canonical_json_bytes` is public, takes a document from its caller (line 101) and hands it to `normalize_numbers`, which calls itself at line 114 (`normalize_numbers`) with a piece of `obj` (and at line 116) — and nowhere in `normalize_numbers` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normalize_numbers` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:114
  • `diff_json` is public, takes a document from its caller (line 139) and hands it to `visit`, which calls itself at line 182 (`visit`) with a piece of `left` — and nowhere in `visit` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:182
  • `canonical_data` is public and takes `value: Any` from its caller, and it calls itself at line 41 (`canonical_data`) with a piece of `value` (and at line 43, line 51) — and nowhere in `canonical_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `canonical_data` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:41
  • `project_document_etag` is public, takes a document from its caller (line 209) and hands it to `_source_document_data`, which calls itself at line 171 (`_source_document_data`) with a piece of `value` (and at line 182, line 188, line 192, line 200) — and nowhere in `_source_document_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_source_document_data` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:171
  • `stripScrollHeadlineTextBlocks` is exported and takes `node: unknown` from its caller, and it calls itself at line 31 (`stripScrollHeadlineTextBlocks`) with a piece of `node` (and at line 48) — and nowhere in `stripScrollHeadlineTextBlocks` 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 `stripScrollHeadlineTextBlocks` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — console/src/pages/Chat/headlineFilter.ts:31
  • `formatRawToolValue` is exported, takes a document from its caller (line 196) and hands it to `sanitizeForDisplay`, which calls itself at line 131 (`sanitizeForDisplay`) with a piece of `value` (and at line 150) — and nowhere in `sanitizeForDisplay` 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 `sanitizeForDisplay` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — console/src/components/Chat/ToolCards/shared/rawToolDisplay.ts:131

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.
X19 · Unrestored process-global state6.6 / 10Adequate✓ Tool-verified

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

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

  • `ensure_ffprobe` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CREATOR_FFPROBE_PATH_ENV` environment variable (set at line 395, cleared at line 403) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — REDACTED:392

What to do

  • Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Python the same holds for `os.chdir`, `os.environ` and `sys.stdout`: pass `cwd=`/`env=` to `subprocess`, or use `contextlib.chdir`/`redirect_stdout`, rather than moving the global by hand.
X2 · Cancellation propagation6.1 / 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 24/68 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.
  • `loadContributors` 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 })`. — website/src/pages/Home/components/Contributors.tsx:84
  • `fetchProductIndex` 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 })`. — website/src/pages/Downloads/index.tsx:56
  • `loadDownloads` 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 })`. — website/src/pages/Downloads/index.tsx:88
  • `fetchBlogPost` 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) — website/src/pages/Blog/Post.tsx:33, website/src/pages/Blog/index.tsx:29
  • `apiGet` 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 })`. — plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:76
  • `apiPost` 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 })`. — plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:84
  • `submitImport` 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 })`. — plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:363
  • `downloadFilm` 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 })`. — plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectExportActions.tsx:46
  • `downloadWithBrowser` 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 })`. — console/src/utils/downloadFileFromUrl.ts:141
  • `refreshCatalog` 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 })`. — console/src/plugins/harnesses.ts:108
  • `fetchFrontendPlugins` 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 })`. — console/src/plugins/usePluginLoader.ts:68
  • `executePluginScript` 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 })`. — console/src/plugins/usePluginLoader.ts:99
  • `upload` 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 })`. — console/src/pages/Market/Community/api.ts:188
  • `fetchPreviewError` 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 })`. — console/src/components/Chat/ToolCards/shared/MediaPreview.tsx:26
  • `resolveAuthGate` 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 })`. — console/src/auth/gate.ts:24
  • `transcribeAudio` 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 })`. — console/src/api/modules/agent.ts:148
  • `login` 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 })`. — console/src/api/modules/auth.ts:25
  • `register` 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 })`. — console/src/api/modules/auth.ts:37
  • `getStatus` 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 })`. — console/src/api/modules/auth.ts:57
  • `getCurrentUser` 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 })`. — console/src/api/modules/auth.ts:63
  • `updateProfile` 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 })`. — console/src/api/modules/auth.ts:75
  • `image` 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 })`. — console/src/api/modules/avatars.ts:22
  • `importBackup` 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 })`. — console/src/api/modules/backup.ts:154
  • `resolveImportConflict` 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 })`. — console/src/api/modules/backup.ts:184
  • `uploadFile` 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 })`. — console/src/api/modules/chat.ts:42
  • `governanceRequest` 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 })`. — console/src/api/modules/hubGovernance.ts:5
  • `list` 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 })`. — console/src/api/modules/pawapp.ts:44
  • `get` 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 })`. — console/src/api/modules/pawapp.ts:55
  • `getIframeUrl` 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 })`. — console/src/api/modules/pawapp.ts:70
  • `uninstall` 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 })`. — console/src/api/modules/pawapp.ts:87
  • `requestDependencyUpgrade` 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 })`. — console/src/api/modules/plugin.ts:140
  • `fetchPlugins` 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 })`. — console/src/api/modules/plugin.ts:214
  • `setPluginEnabled` 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 })`. — console/src/api/modules/plugin.ts:228
  • `fetchPluginCatalog` 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 })`. — console/src/api/modules/plugin.ts:259
  • `installPlugin` 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 })`. — console/src/api/modules/plugin.ts:276
  • `uploadPlugin` 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 })`. — console/src/api/modules/plugin.ts:312
  • `repairPluginDependencies` 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 })`. — console/src/api/modules/plugin.ts:345
  • `fetchPluginStatus` 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 })`. — console/src/api/modules/plugin.ts:394

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.6 / 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 2553 is called with an argument built by `"…".join(cmd)` (line 2556), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/plugins/loader.py:2553
  • `debug` at line 197 is called with an argument built by `list(arguments.keys())` (line 200), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/local_models/tag_parser.py:197
  • `debug` at line 362 is called with an argument built by `[str(entry.path) for entry in resolved.dirs]` (line 365), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/hooks/request_setup/contextvars_hook.py:362
  • `debug` at line 765 is called with an argument built by `sorted(restore_aids)` (line 770), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/backup/_ops/restore.py:765
  • `debug` at line 2179 is called with an argument built by `[getattr(p, "…", None) for p in parts]` (line 2182), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/app/channels/base.py:2179
  • `debug` at line 116 is called with an argument built by `"…".join(decision.reasons)` (line 121), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — src/qwenpaw/agents/routing_chat_model.py:116
  • `debug` at line 407 is called with an argument built by `incoming_message.to_dict()` (line 409), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:407

What to do

  • In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
X24 · Document value interpolated into markup unescaped7.3 / 10Strong✓ 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.

  • `result.html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:215
  • `html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:142

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

  • `resolveElementPlayback` accepts `timeline.ticks_per_second` from the caller and keeps it in `ticksPerSecond` on line 234, where only it can read the value — but nothing ever reads `ticksPerSecond`. Setting `timeline.ticks_per_second` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `ticksPerSecond` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `timeline.ticks_per_second` from the accepted options so callers stop setting a knob that does nothing. — plugins/apps/qwenpaw-creator/ui/src/selectors/elementPlaybackSelectors.ts:234

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.
X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling6.0 / 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.

  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×30) — src/qwenpaw/utils/console_static.py:53, src/qwenpaw/utils/logging.py:251, src/qwenpaw/utils/platform.py:24, …
  • 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. (×10) — src/qwenpaw/utils/io_utils.py:111, src/qwenpaw/utils/logging.py:127, src/qwenpaw/tool_calls/_timeout_helper.py:121, …

What to do

  • Swallowed exception (caught, then discarded)
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 logging5.3 / 10Adequate✓ 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.

  • `warning` at line 784 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/tool_calls/_coordinator.py:784
  • `warning` at line 1059 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/builder.py:1059
  • `warning` at line 114 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:114
  • `debug` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:121
  • `warning` at line 151 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:151
  • `info` at line 161 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:161
  • `info` at line 293 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:293
  • `exception` at line 306 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/__init__.py:306
  • `exception` at line 342 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/model_handler.py:342
  • `info` at line 348 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/model_handler.py:348
  • `exception` at line 399 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/model_handler.py:399
  • `info` at line 405 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/model_handler.py:405
  • `info` at line 46 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/stop_handler.py:46
  • `warning` at line 65 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/stop_handler.py:65
  • `info` at line 84 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/stop_handler.py:84
  • `warning` at line 99 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/runtime/commands/control/stop_handler.py:99
  • `warning` at line 43 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/plugin_provider_registry.py:43
  • `info` at line 50 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/plugin_provider_registry.py:50
  • `warning` at line 394 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/provider_manager_discovery.py:394
  • `warning` at line 551 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/provider_manager_persistence.py:551
  • `warning` at line 607 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/provider_manager_persistence.py:607
  • `warning` at line 752 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/provider_manager_persistence.py:752
  • `warning` at line 1203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/provider_manager_persistence.py:1203
  • `warning` at line 90 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:90
  • `warning` at line 509 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:509
  • `warning` at line 711 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:711
  • `warning` at line 750 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:750
  • `warning` at line 762 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:762
  • `warning` at line 932 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/retry_chat_model.py:932
  • `warning` at line 299 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/providers/oauth/chatgpt.py:299
  • `warning` at line 282 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:282
  • `warning` at line 289 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:289
  • `warning` at line 295 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:295
  • `warning` at line 301 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:301
  • `warning` at line 448 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:448
  • `warning` at line 601 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:601
  • `warning` at line 650 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:650
  • `warning` at line 799 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:799
  • `warning` at line 806 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:806
  • `warning` at line 926 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — src/qwenpaw/portability/importer.py:926

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.

  • 15/16 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.
  • ~0.7 `!` null assertions per 1k TypeScript source lines — 174 assertion(s) across the 247082 source line(s) of the 1200 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: website/src/pages/Evaluation/Chart.tsx (18), website/src/pages/Evaluation/metrics.ts (12), console/src/plugins/registry/store.ts (8). 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 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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

Not statically assessed — these 42 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.3, 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.7, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health57.9Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture81.9StrongSolid.
Maturity59.6Adequate — gated by M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness60.4Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77.8Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling73.7Adequate — gated by DM5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility55.0Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85.0StrongStrongest area.
Unscored — 5 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 3 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 42 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.

  • AC6 Visual & motion safety — Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to resolve source metadata for agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/uv:0.13.4: failed to do request: Head "https://agentscope-registry.ap-southeast-1.cr.aliyuncs.com/v2/agentscope/uv/manifests/0.13.4": Forbidden; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript, Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (qwenpaw), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P8 Schema migrations — Peewee is declared, but this repository defines no table or model of its own, so there is no database schema here for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 841 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 a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, 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.
  • X16 Unfloored truncation loop — X16 reached only 32% of this repository's production lines — python (535,877 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X18 Disposal-pattern correctness — X18 reached only 32% of this repository's production lines — python (535,877 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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
  • X29 Per-element action decided by a fixed element — X29 reached only 32% of this repository's production lines — python (535,877 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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 — 464 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 230 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×45
  • 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
  • + 20 more in this group — see findings.md.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×21
  • Click handler on a non-interactive <div> console/src/components/ContextMenu/index.tsx:96 — 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> console/src/components/interaction/DurationWheel.tsx:193 — 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> console/src/pages/Agent/MCP/components/MCPOAuthSection.tsx:230 — 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> console/src/pages/Agent/Skills/components/PoolTransferModal.tsx:158 — 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> console/src/pages/Chat/LazyAccordion.tsx:69 — 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> console/src/pages/Market/Community/MarkdownComposer.tsx:201 — 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> REDACTED:140 — 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> REDACTED:177 — 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> console/src/pages/Settings/Agents/components/AgentModal.tsx:472 — 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> console/src/pages/Settings/Models/index.tsx:659 — 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> console/src/pages/Settings/PluginManager/components/InstallPluginModal.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> console/src/pages/Settings/SkillPool/components/ImportBuiltinModal.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> REDACTED:832 — 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> plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2555 — 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> plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3283 — 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> plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3831 — 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> plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:1074 — 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> plugins/bundle/cloudpaw/ui/src/index.ts: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> plugins/bundle/cloudpaw/ui/src/index.ts:588 — 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> plugins/bundle/cloudpaw/ui/src/index.ts:692 — 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> plugins/bundle/cloudpaw/ui/src/index.ts:736 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
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
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×11
  • Orphaned knowledge src/qwenpaw/agents/skills/pptx-en/scripts/office/validators/base.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/agents/skills/docx-zh/scripts/office/validators/base.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/agents/skills/docx-en/scripts/office/validators/base.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/checkpoints/service.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/browser/control_link/chrome/bridge.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge REDACTED:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/checkpoints/restore.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/browser/control_link/chrome/adapter.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/qwenpaw/browser/control_link/cdp/adapter.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge REDACTED:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge console/src/pages/Agent/Checkpoints/index.tsx:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×9
  • <label> that labels no control console/src/components/ProjectSelectModal/index.tsx:159 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/components/ProjectSelectModal/index.tsx:167 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/components/ProjectSelectModal/index.tsx:457 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/ACP/index.tsx:778 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/Checkpoints/index.tsx:544 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/Checkpoints/index.tsx:555 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1468 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1483 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1496 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a <span> nested inside <button> · ×3
  • Click handler on a <span> nested inside <button> plugins/apps/qwenpaw-creator/ui/src/components/creator/VideoTemplatePicker.tsx:130 — This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
  • Click handler on a <span> nested inside <button> plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1973 — This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
  • Click handler on a <span> nested inside <button> plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1991 — This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×2
  • Click handler on a non-interactive <span> console/src/layouts/AppBrand.tsx:232 — 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 <span> console/src/layouts/AppBrand.tsx:296 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×2
  • Import cycle (2 files) console/src/pages/Agent/Skills/components/ImportHubModal.tsx:11 — console/src/pages/Agent/Skills/components/ImportHubModal.tsx → console/src/pages/Agent/Skills/components/index.ts → console/src/pages/Agent/Skills/components/ImportHubModal.tsx
  • Import cycle (2 files) console/src/pages/Settings/Security/components/ToolGuardTab.tsx:16 — console/src/pages/Settings/Security/components/ToolGuardTab.tsx → console/src/pages/Settings/Security/components/index.ts → console/src/pages/Settings/Security/components/ToolGuardTab.tsx
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> console/src/os/WindowFrame.tsx:463 — This <div> binds pointerdown, pointerup, pointermove 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.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> console/src/pages/Chat/components/MessageQueuePanel.tsx:267 — 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> console/src/pages/Market/Community/ImageLightbox.tsx:45 — 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 · Click handler on a <img> nested inside <button> · ×1
  • Click handler on a <img> nested inside <button> plugins/apps/qwenpaw-creator/ui/src/components/blueprint/EpisodeOverviewRail.tsx:100 — This <img> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'lucide-react' · ×1
  • Unlisted import 'lucide-react' plugins/harness/_shared/ui/Settings.tsx:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'use-context-selector' · ×1
  • Unlisted import 'use-context-selector' console/src/pages/Chat/sdkSessionLifecycle.integration.test.tsx:25 — 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) console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx:1 — console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx → console/src/pages/Chat/ModelSelector/ModelChoice.tsx → console/src/pages/Chat/ModelSelector/index.tsx → console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx
Serious — 5249 finding(s)
D3 · God Classes · FunctionTooLong · ×344
  • FunctionTooLong: ModelConfigModal.ModelConfigModal plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1012 — FunctionTooLong — ModelConfigModal runs 3217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3117 over it, 32.17× 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.ChatPage console/src/pages/Chat/index.tsx:1219 — FunctionTooLong — ChatPage runs 2683 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2583 over it, 26.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ChannelDrawer.ChannelDrawer console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183 — FunctionTooLong — ChannelDrawer runs 1949 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1849 over it, 19.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: R2VWorkbenchPage.WorkbenchSurface plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284 — FunctionTooLong — WorkbenchSurface runs 1648 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1548 over it, 16.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AgentDock.AgentDock plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136 — FunctionTooLong — AgentDock runs 1341 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1241 over it, 13.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ElementDetail.ElementDetail plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:322 — FunctionTooLong — ElementDetail runs 1108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1008 over it, 11.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.
  • FunctionTooLong: index.ModelSelector console/src/pages/Chat/ModelSelector/index.tsx:107 — FunctionTooLong — ModelSelector runs 1049 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 949 over it, 10.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.HubPage console/src/pages/Hub/index.tsx:76 — FunctionTooLong — HubPage runs 1018 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 918 over it, 10.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TimelineTracks.TimelineTracks plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:141 — FunctionTooLong — TimelineTracks runs 993 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 893 over it, 9.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PostComposer.PostComposer REDACTED:149 — FunctionTooLong — PostComposer runs 977 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 877 over it, 9.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SessionProjectDirectory.SessionProjectDirectory console/src/features/project-directory/SessionProjectDirectory.tsx:114 — FunctionTooLong — SessionProjectDirectory runs 973 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 873 over it, 9.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TabbedEditor.TabbedEditor console/src/pages/Coding/TabbedEditor.tsx:185 — FunctionTooLong — TabbedEditor runs 966 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 866 over it, 9.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AssetsPage.AssetsPage plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1457 — FunctionTooLong — AssetsPage runs 963 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 863 over it, 9.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.
  • FunctionTooLong: useSkillPool.useSkillPool console/src/pages/Settings/SkillPool/useSkillPool.tsx:146 — FunctionTooLong — useSkillPool runs 961 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 861 over it, 9.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LocalModelManageModal.LocalModelManageModal console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:126 — FunctionTooLong — LocalModelManageModal runs 926 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 826 over it, 9.26× 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: Sidebar.Sidebar console/src/layouts/Sidebar.tsx:119 — FunctionTooLong — Sidebar runs 913 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 813 over it, 9.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.InboxPage console/src/pages/Inbox/index.tsx:161 — FunctionTooLong — InboxPage runs 903 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 803 over it, 9.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ReMeLightMemoryCard.ReMeLightMemoryCard console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:27 — FunctionTooLong — ReMeLightMemoryCard runs 892 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 792 over it, 8.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.CronJobsPage console/src/pages/Control/CronJobs/index.tsx:95 — FunctionTooLong — CronJobsPage runs 840 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 740 over it, 8.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: FilesNavigator.FilesNavigator console/src/features/files-workspace/FilesNavigator.tsx:511 — FunctionTooLong — FilesNavigator runs 790 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 690 over it, 7.90× 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: PostAssistance.PostAssistance console/src/pages/CommunityFeedback/PostAssistance.tsx:58 — FunctionTooLong — PostAssistance runs 754 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 654 over it, 7.54× 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: TimelineCanvas.TimelineCanvas plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:120 — FunctionTooLong — TimelineCanvas runs 754 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 654 over it, 7.54× 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: JobDrawer.JobDrawer console/src/pages/Control/CronJobs/components/JobDrawer.tsx:70 — FunctionTooLong — JobDrawer runs 739 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 639 over it, 7.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PlanPage.PlanPage plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:40 — FunctionTooLong — PlanPage runs 718 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 618 over it, 7.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.Evaluation website/src/pages/Evaluation/index.tsx:45 — FunctionTooLong — Evaluation runs 713 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 613 over it, 7.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 319 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×311
  • FileTooLong: file_agent_runtime/driver.py plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py — FileTooLong — 7892 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7392 over it, 15.78× 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: plugins/loader.py src/qwenpaw/plugins/loader.py — FileTooLong — 4568 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4068 over it, 9.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: media_files/r2v_execution.py plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py — FileTooLong — 4503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4003 over it, 9.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: deprecated_browser/browser_control.py src/qwenpaw/agents/tools/deprecated_browser/browser_control.py — FileTooLong — 4173 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3673 over it, 8.35× 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: creator/ModelConfigModal.tsx plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx — FileTooLong — 3964 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: ModelConfigModal (1012-4914). The bar is 500 significant lines; this is 3464 over it, 7.93× 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_files/local_execution.py plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py — FileTooLong — 3938 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3438 over it, 7.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Chat/index.tsx console/src/pages/Chat/index.tsx — FileTooLong — 3554 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: ChatPage (1219-4889). The bar is 500 significant lines; this is 3054 over it, 7.11× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: media_files/image_execution.py plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py — FileTooLong — 2913 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2413 over it, 5.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: config/config.py src/qwenpaw/config/config.py — FileTooLong — 2863 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2363 over it, 5.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2513 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2013 over it, 5.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source_analysis/service.py plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py — FileTooLong — 2277 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1777 over it, 4.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: agent/AgentDock.tsx plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx — FileTooLong — 2260 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1760 over it, 4.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: channels/isolated_proxy.py src/qwenpaw/app/channels/isolated_proxy.py — FileTooLong — 2196 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1696 over it, 4.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/AssetsPage.tsx plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx — FileTooLong — 2136 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1636 over it, 4.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: components/ChannelDrawer.tsx console/src/pages/Control/Channels/components/ChannelDrawer.tsx — FileTooLong — 2102 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ChannelDrawer (183-2456). The bar is 500 significant lines; this is 1602 over it, 4.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: api/model_routes.py plugins/apps/qwenpaw-creator/backend/api/model_routes.py — FileTooLong — 2023 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1523 over it, 4.05× 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: runtime_files/session_store.py plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py — FileTooLong — 2002 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1502 over it, 4.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1955 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1455 over it, 3.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/R2VWorkbenchPage.tsx plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx — FileTooLong — 1905 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: WorkbenchSurface (284-2300). The bar is 500 significant lines; this is 1405 over it, 3.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: skill_system/hub.py src/qwenpaw/agents/skill_system/hub.py — FileTooLong — 1856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1356 over it, 3.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: plugins/api.py src/qwenpaw/plugins/api.py — FileTooLong — 1829 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1329 over it, 3.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: routers/skills.py src/qwenpaw/app/routers/skills.py — FileTooLong — 1827 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1327 over it, 3.65× 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: agents/model_factory.py src/qwenpaw/agents/model_factory.py — FileTooLong — 1807 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1307 over it, 3.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Hub/index.tsx console/src/pages/Hub/index.tsx — FileTooLong — 1802 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1302 over it, 3.60× 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: channels/base.py src/qwenpaw/app/channels/base.py — FileTooLong — 1800 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1300 over it, 3.60× 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.
  • + 286 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×239
  • Hotspot: console/src/pages/Chat/index.tsx console/src/pages/Chat/index.tsx:1219 — console/src/pages/Chat/index.tsx changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 534 in index.ChatPage at line 1219. 19 of those changes were fix/bug commits, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Chat/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1012 — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 481 in ModelConfigModal.ModelConfigModal at line 1012. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/layouts/Sidebar.tsx console/src/layouts/Sidebar.tsx:119 — console/src/layouts/Sidebar.tsx changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 120 in Sidebar.Sidebar at line 119. 9 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/layouts/Sidebar.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Control/Channels/components/ChannelDrawer.tsx console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183 — console/src/pages/Control/Channels/components/ChannelDrawer.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 180 in ChannelDrawer.ChannelDrawer at line 183. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Control/Channels/components/ChannelDrawer.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/features/project-directory/SessionProjectDirectory.tsx console/src/features/project-directory/SessionProjectDirectory.tsx:114 — console/src/features/project-directory/SessionProjectDirectory.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 163 in SessionProjectDirectory.SessionProjectDirectory at line 114. 4 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/features/project-directory/SessionProjectDirectory.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Chat/ModelSelector/index.tsx console/src/pages/Chat/ModelSelector/index.tsx:107 — console/src/pages/Chat/ModelSelector/index.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 180 in index.ModelSelector at line 107. 4 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Chat/ModelSelector/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/layouts/SidebarSessionList.tsx console/src/layouts/SidebarSessionList.tsx:274 — console/src/layouts/SidebarSessionList.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in SidebarSessionList.SidebarSessionList at line 274. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/layouts/SidebarSessionList.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284 — plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 273 in R2VWorkbenchPage.WorkbenchSurface at line 284. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Inbox/index.tsx console/src/pages/Inbox/index.tsx:161 — console/src/pages/Inbox/index.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in index.InboxPage at line 161. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Inbox/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136 — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 210 in AgentDock.AgentDock at line 1136. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/qwenpaw/agents/react_agent.py src/qwenpaw/agents/react_agent.py:1177 — src/qwenpaw/agents/react_agent.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in QwenPawAgent._reasoning at line 1177. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/agents/react_agent.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/features/files-workspace/FilesNavigator.tsx console/src/features/files-workspace/FilesNavigator.tsx:511 — console/src/features/files-workspace/FilesNavigator.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 128 in FilesNavigator.FilesNavigator at line 511. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/features/files-workspace/FilesNavigator.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/qwenpaw/plugins/loader.py src/qwenpaw/plugins/loader.py:4427 — src/qwenpaw/plugins/loader.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in PluginLoader._unload_plugin_reserved at line 4427. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/plugins/loader.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/SettingsCenter/index.tsx console/src/pages/SettingsCenter/index.tsx:346 — console/src/pages/SettingsCenter/index.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in index.SettingsCenter at line 346. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/SettingsCenter/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Settings/Models/index.tsx console/src/pages/Settings/Models/index.tsx:47 — console/src/pages/Settings/Models/index.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in index.ModelsPage at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Settings/Models/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/features/files-workspace/FilesWorkspace.tsx console/src/features/files-workspace/FilesWorkspace.tsx:65 — console/src/features/files-workspace/FilesWorkspace.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in FilesWorkspace.FilesWorkspace at line 65. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/features/files-workspace/FilesWorkspace.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Control/CronJobs/index.tsx console/src/pages/Control/CronJobs/index.tsx:95 — console/src/pages/Control/CronJobs/index.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 122 in index.CronJobsPage at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Control/CronJobs/index.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Coding/TabbedEditor.tsx console/src/pages/Coding/TabbedEditor.tsx:185 — console/src/pages/Coding/TabbedEditor.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in TabbedEditor.TabbedEditor at line 185. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Coding/TabbedEditor.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:296 — console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in ProviderConfigModal.ProviderConfigModal at line 296. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:669 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 148 in work_graph.derive_work_graph at line 669. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/qwenpaw/config/config.py src/qwenpaw/config/config.py:3755 — src/qwenpaw/config/config.py changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in config.load_agent_config at line 3755. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/config/config.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/features/files-workspace/FilesDrawer.tsx console/src/features/files-workspace/FilesDrawer.tsx:74 — console/src/features/files-workspace/FilesDrawer.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in FilesDrawer.FilesDrawer at line 74. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/features/files-workspace/FilesDrawer.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx:43 — console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in RemoteModelManageModal.RemoteModelManageModal at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:126 — console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in LocalModelManageModal.LocalModelManageModal at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: plugins/apps/qwenpaw-creator/backend/models/video_model.py plugins/apps/qwenpaw-creator/backend/models/video_model.py:604 — plugins/apps/qwenpaw-creator/backend/models/video_model.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in video_model.submit_video_task at line 604. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- plugins/apps/qwenpaw-creator/backend/models/video_model.py`: 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.
  • + 214 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×57
  • TooManyMethods: PluginLoader src/qwenpaw/plugins/loader.py:311 — TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.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: MatrixPlatform REDACTED:236 — TooManyMethods — 89 methods. The bar is 30 methods; this is 59 over it, 2.97× 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: BaseChannel src/qwenpaw/app/channels/base.py:84 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× 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: IsolatedChannelProxy src/qwenpaw/app/channels/isolated_proxy.py:173 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× 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: FileR2VExecutionService plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:1634 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× 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: ProjectRuntimeSessionStore plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:160 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.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: FileCreatorAgentRuntime plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:1555 — TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.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: ScrollContextManager src/qwenpaw/agents/context/scroll/manager.py:81 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.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: PluginRegistry src/qwenpaw/plugins/registry.py:142 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.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.
  • TooManyMethods: PluginTestHost src/qwenpaw/plugins/testing.py:140 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ProjectExecutionStore plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:222 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: PawApp src/qwenpaw/cli/tui/app.py:147 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: PluginApi src/qwenpaw/plugins/api.py:591 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: Provider src/qwenpaw/providers/provider.py:341 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: QwenPawAgent src/qwenpaw/agents/react_agent.py:235 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: QwenPawACPAgent src/qwenpaw/agents/acp/server.py:355 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: MemorySpace src/qwenpaw/agents/context/scroll/memoryspace.py:344 — 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: MultiAgentManager src/qwenpaw/app/multi_agent_manager.py:43 — 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: CommandHandler src/qwenpaw/agents/command_handler.py:162 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 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.
  • TooManyMethods: CronManager src/qwenpaw/app/crons/manager.py:99 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 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.
  • TooManyMethods: VoicePlatform plugins/channel/voice/qwenpaw_channel_voice/platform.py:259 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 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.
  • TooManyMethods: SharedResponseDriver src/qwenpaw/channel_protocol/shared_response_driver.py:55 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 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.
  • TooManyMethods: LarkOapiPlatform plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:162 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: ReMeLightMemoryManager src/qwenpaw/agents/memory/reme_light_memory_manager.py:258 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SessionApi console/src/pages/Chat/sessionApi/index.ts:545 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 32 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×40
  • ClassTooLong: ModelConfigModal plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1 — ClassTooLong — 3217 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 2817 over it, 8.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: ChannelDrawer console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1 — ClassTooLong — 1949 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 1549 over it, 4.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AgentDock plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1 — ClassTooLong — 1341 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 941 over it, 3.35× 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: ElementDetail plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:1 — ClassTooLong — 1108 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 708 over it, 2.77× 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: TimelineTracks plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:1 — ClassTooLong — 993 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 593 over it, 2.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: PostComposer REDACTED:1 — ClassTooLong — 977 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 577 over it, 2.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SessionProjectDirectory console/src/features/project-directory/SessionProjectDirectory.tsx:1 — ClassTooLong — 973 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 573 over it, 2.43× 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: TabbedEditor console/src/pages/Coding/TabbedEditor.tsx:1 — ClassTooLong — 966 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 566 over it, 2.42× 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: AssetsPage plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1 — ClassTooLong — 963 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 563 over it, 2.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useSkillPool console/src/pages/Settings/SkillPool/useSkillPool.tsx:1 — ClassTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 561 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LocalModelManageModal console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:1 — ClassTooLong — 926 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 526 over it, 2.32× 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: Sidebar console/src/layouts/Sidebar.tsx:1 — ClassTooLong — 913 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 513 over it, 2.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReMeLightMemoryCard console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:1 — ClassTooLong — 892 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 492 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SessionApi console/src/pages/Chat/sessionApi/index.ts:545 — ClassTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 419 over it, 2.05× 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: FilesNavigator console/src/features/files-workspace/FilesNavigator.tsx:1 — ClassTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 390 over it, 1.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TimelineCanvas plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:1 — ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 354 over it, 1.89× 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: PostAssistance console/src/pages/CommunityFeedback/PostAssistance.tsx:1 — ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 354 over it, 1.89× 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: JobDrawer console/src/pages/Control/CronJobs/components/JobDrawer.tsx:1 — ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 339 over it, 1.85× 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: PlanPage plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:1 — ClassTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 318 over it, 1.80× 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: useSkillsPage console/src/pages/Agent/Skills/useSkillsPage.tsx:1 — ClassTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 292 over it, 1.73× 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: FilesWorkspace console/src/features/files-workspace/FilesWorkspace.tsx:1 — ClassTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 197 over it, 1.49× 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: GeneralSettings console/src/pages/SettingsCenter/GeneralSettings.tsx:1 — ClassTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 189 over it, 1.47× 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: MemoryGraphView REDACTED:1 — ClassTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 181 over it, 1.45× 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: SidebarSessionList console/src/layouts/SidebarSessionList.tsx:1 — ClassTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 171 over it, 1.43× 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: RemoteModelManageModal console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx:1 — ClassTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 167 over it, 1.42× 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.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file REDACTED: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 plugins/bundle/chrome/frontend/src/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 plugins/bundle/qwenpaw-pet/frontend/src/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 console/src/pages/Control/Sessions/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 plugins/bundle/computer-use/frontend/src/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 console/src/pages/Agent/Config/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 console/src/pages/Agent/Config/components/ReactAgentCard.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 console/src/pages/Settings/SkillPool/components/PoolSkillDrawer.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 console/src/pages/Settings/SkillPool/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 plugins/memory/powercontext/frontend/src/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 console/src/tauri/DesktopClient.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 plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementList.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 plugins/bundle/chrome/frontend/src/locale.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 plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSwitcher.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 plugins/memory/openviking/frontend/src/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 console/src/pages/Settings/Security/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 console/src/pages/Agent/Config/components/TimezoneAtlas/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 console/src/pages/Settings/SkillPool/components/ImportBuiltinModal.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 console/src/pages/Settings/SkillPool/components/PoolSkillCard.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 plugins/apps/qwenpaw-creator/ui/src/selectors/visualVariantCoverage.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 plugins/memory/adbpg/frontend/src/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 plugins/apps/qwenpaw-data/scripts/context-console/paw-bridge.js: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 console/src/pages/Control/Sessions/components/columns.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 console/src/pages/Settings/SkillPool/components/PoolSkillListItem.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 plugins/apps/qwenpaw-creator/ui/src/components/creator/VisualCoverageCheckpoint.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.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: loadContributors website/src/pages/Home/components/Contributors.tsx:84 — `loadContributors` 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: fetchProductIndex website/src/pages/Downloads/index.tsx:56 — `fetchProductIndex` 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: loadDownloads website/src/pages/Downloads/index.tsx:88 — `loadDownloads` 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: fetchBlogPost website/src/pages/Blog/Post.tsx:33 — `fetchBlogPost` 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: fetchBlogPost website/src/pages/Blog/index.tsx:29 — `fetchBlogPost` 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: apiGet plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:76 — `apiGet` 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: apiPost plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:84 — `apiPost` 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: submitImport plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:363 — `submitImport` 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: downloadFilm plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectExportActions.tsx:46 — `downloadFilm` 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: downloadWithBrowser console/src/utils/downloadFileFromUrl.ts:141 — `downloadWithBrowser` 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: refreshCatalog console/src/plugins/harnesses.ts:108 — `refreshCatalog` 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: fetchFrontendPlugins console/src/plugins/usePluginLoader.ts:68 — `fetchFrontendPlugins` 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: executePluginScript console/src/plugins/usePluginLoader.ts:99 — `executePluginScript` 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: upload console/src/pages/Market/Community/api.ts:188 — `upload` 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: fetchPreviewError console/src/components/Chat/ToolCards/shared/MediaPreview.tsx:26 — `fetchPreviewError` 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: resolveAuthGate console/src/auth/gate.ts:24 — `resolveAuthGate` 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: transcribeAudio console/src/api/modules/agent.ts:148 — `transcribeAudio` 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: login console/src/api/modules/auth.ts:25 — `login` 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: register console/src/api/modules/auth.ts:37 — `register` 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: getStatus console/src/api/modules/auth.ts:57 — `getStatus` 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: getCurrentUser console/src/api/modules/auth.ts:63 — `getCurrentUser` 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: updateProfile console/src/api/modules/auth.ts:75 — `updateProfile` 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: image console/src/api/modules/avatars.ts:22 — `image` 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: importBackup console/src/api/modules/backup.ts:154 — `importBackup` 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: resolveImportConflict console/src/api/modules/backup.ts:184 — `resolveImportConflict` 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 })`.
  • + 14 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×30
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/console_static.py:53 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/logging.py:251 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/platform.py:24 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/telemetry.py:34 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/telemetry.py:160 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/telemetry.py:191 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/telemetry.py:219 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/utils/telemetry.py:244 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/tool_calls/_middleware.py:70 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/secret_store.py:206 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/tool_guard/engine.py:55 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/tool_guard/utils.py:60 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/tool_guard/guardians/file_guardian.py:163 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:526 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/security/skill_scanner/__init__.py:93 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builder.py:396 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builder.py:1147 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builder.py:1197 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builtin_commands.py:48 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builtin_commands.py:110 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builtin_commands.py:636 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/builtin_commands.py:794 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/runtime/prompt_contributors.py:425 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/providers/anthropic_provider.py:204 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/qwenpaw/providers/chatgpt_provider.py:227 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×28
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:383 — plugins/apps/qwenpaw-creator/backend/models/asr_model.py:383-394 | plugins/apps/qwenpaw-creator/backend/models/asr_model.py:1072-1083 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/models/config.py:214 — plugins/apps/qwenpaw-creator/backend/models/config.py:214-225 | plugins/apps/qwenpaw-creator/backend/models/config.py:2030-2041 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:101 — plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:101-112 | plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:132-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3636 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3636-3647 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:5031-5042 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2507 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2507-2518 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:1411-1422 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:350 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:350-361 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:763-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:555 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:555-566 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:957-968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:90 — plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:90-101 | plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:139-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) plugins/apps/qwenpaw-data/backend/context_gateway.py:253 — plugins/apps/qwenpaw-data/backend/context_gateway.py:253-264 | plugins/apps/qwenpaw-data/backend/engine_gateway.py:338-349 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) plugins/bundle/cloudpaw/tools/a2a_call.py:368 — plugins/bundle/cloudpaw/tools/a2a_call.py:368-379 | plugins/bundle/cloudpaw/tools/a2a_call.py:386-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:1605 — REDACTED:1605-1616 | REDACTED:1632-1643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1605` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/agent_stats/service.py:79 — src/qwenpaw/agent_stats/service.py:79-90 | src/qwenpaw/agent_stats/service.py:187-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/agents/acp/service.py:462 — src/qwenpaw/agents/acp/service.py:462-473 | src/qwenpaw/agents/acp/service.py:481-492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/qwenpaw/agents/skill_system/hub.py:2347 — src/qwenpaw/agents/skill_system/hub.py:2347-2358 | src/qwenpaw/agents/skill_system/hub.py:2407-2418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:405 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:405-416 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:405-416 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:395 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:395-406 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:395-406 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/agents/utils/message_request_normalizer.py:291 — src/qwenpaw/agents/utils/message_request_normalizer.py:291-302 | src/qwenpaw/agents/utils/message_request_normalizer.py:317-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/app/chats/manager.py:679 — src/qwenpaw/app/chats/manager.py:679-690 | src/qwenpaw/app/chats/manager.py:730-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/app/chats/manager.py:678` calls `set` and `src/qwenpaw/app/chats/manager.py:729` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) src/qwenpaw/app/mail/mail_access_control.py:457 — src/qwenpaw/app/mail/mail_access_control.py:457-468 | src/qwenpaw/app/mail/mail_access_control.py:520-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/backup/_ops/restore.py:391 — src/qwenpaw/backup/_ops/restore.py:391-402 | src/qwenpaw/backup/_utils/safe_swap.py:211-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/checkpoints/safe_workspace_fs.py:239 — src/qwenpaw/checkpoints/safe_workspace_fs.py:239-250 | src/qwenpaw/checkpoints/safe_workspace_fs.py:268-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/checkpoints/safe_workspace_fs.py:267` calls `_read_stream` and `src/qwenpaw/checkpoints/safe_workspace_fs.py:238` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) src/qwenpaw/drivers/credentials/providers.py:223 — src/qwenpaw/drivers/credentials/providers.py:223-234 | src/qwenpaw/drivers/credentials/providers.py:237-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/qwenpaw/plugins/dependency_recovery.py:45 — src/qwenpaw/plugins/dependency_recovery.py:45-56 | src/qwenpaw/plugins/dependency_transaction.py:100-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) src/qwenpaw/plugins/loader.py:3767 — src/qwenpaw/plugins/loader.py:3767-3778 | src/qwenpaw/plugins/loader.py:3809-3820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/qwenpaw/providers/gemini_provider.py:247 — src/qwenpaw/providers/gemini_provider.py:247-258 | src/qwenpaw/providers/openai_provider.py:231-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×22
  • Duplicated block (9 lines × 2) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:269 — packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:269-281 | REDACTED:1593-1601 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1059 — plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1059-1067 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1129-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1138` calls `_media_declaration` and `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1068` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:123 — plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:123-131 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:352-360 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323-3331 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4997-5005 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:993 — plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:993-1001 | plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:1011-1019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:993` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:142 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:142-150 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:90-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) plugins/apps/qwenpaw-data/backend/context_gateway.py:172 — plugins/apps/qwenpaw-data/backend/context_gateway.py:172-181 | plugins/apps/qwenpaw-data/backend/engine_gateway.py:212-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-data/backend/context_gateway.py:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:59 — REDACTED:59-67 | REDACTED:103-111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) plugins/bundle/qwenpaw-pet/pet_paths.py:40 — plugins/bundle/qwenpaw-pet/pet_paths.py:40-48 | plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/pet_package.py:140-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) plugins/channel/discord/qwenpaw_channel_discord/driver.py:189 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:189-197 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:181-189 — before extracting anything, compare `plugins/channel/discord/qwenpaw_channel_discord/driver.py` and `plugins/channel/slack/qwenpaw_channel_slack/driver.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) plugins/channel/qq/qwenpaw_channel_qq/driver.py:155 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:155-163 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:125-133 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/telegram/qwenpaw_channel_telegram/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/qwenpaw/app/routers/backup.py:288 — src/qwenpaw/app/routers/backup.py:288-296 | src/qwenpaw/app/routers/backup.py:438-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/qwenpaw/governance/detectors.py:654 — src/qwenpaw/governance/detectors.py:654-662 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:284-294 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/qwenpaw/pawapp/app.py:141 — src/qwenpaw/pawapp/app.py:141-149 | src/qwenpaw/pawapp/app.py:168-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/qwenpaw/portability/compatibility_testing.py:769 — src/qwenpaw/portability/compatibility_testing.py:769-777 | src/qwenpaw/portability/compatibility_testing.py:784-792 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/portability/compatibility_testing.py:769` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/qwenpaw/app/channels/access_control.py:184 — src/qwenpaw/app/channels/access_control.py:184-196 | src/qwenpaw/app/mail/mail_access_control.py:313-321 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/qwenpaw/cli/tui/widgets/session_picker.py:102 — src/qwenpaw/cli/tui/widgets/session_picker.py:102-110 | src/qwenpaw/cli/tui/widgets/theme_picker.py:75-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/qwenpaw/governance/detectors.py:526 — src/qwenpaw/governance/detectors.py:526-534 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:94-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) REDACTED:316 — REDACTED:316-324 | src/qwenpaw/providers/provider_persistence.py:29-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) console/src-tauri/src/backend/runtime.rs:33 — console/src-tauri/src/backend/runtime.rs:33-41 | console/src-tauri/src/backend/runtime.rs:440-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `console/src-tauri/src/backend/runtime.rs:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/qwenpaw/sandbox/local_sandbox.py:236 — src/qwenpaw/sandbox/local_sandbox.py:236-244 | src/qwenpaw/sandbox/macos_sandbox.py:301-309 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/sandbox/local_sandbox.py:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) scripts/pack/generate_plugin_metadata.py:108 — scripts/pack/generate_plugin_metadata.py:108-116 | scripts/pack/generate_plugin_metadata.py:150-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X1 · Async correctness · Task from `asyncio.create_task` is not kept · ×22
  • Task from `asyncio.create_task` is not kept src/qwenpaw/tool_calls/_coordinator.py:293 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/providers/provider_manager.py:697 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/pawapp/task.py:159 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/browser/execution/subprocess_plane.py:378 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/browser/control_link/chrome/adapter.py:174 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/browser/control_link/chrome/bridge.py:269 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/browser/control_link/cdp/adapter.py:213 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/backup/orchestration.py:43 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/_app.py:636 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/_app.py:642 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/utils.py:165 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/routers/config.py:1137 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/routers/config.py:1170 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/routers/console.py:539 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/crons/manager.py:858 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/crons/manager.py:860 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/approvals/service.py:250 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/app/approvals/service.py:320 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/agents/tools/agent_management.py:1727 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/agents/tools/view_media.py:547 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/agents/acp/server.py:688 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept src/qwenpaw/agents/acp/server.py:726 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
D30 · Dependency Vulnerabilities · Medium CVE · ×20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×20
  • Edited copy of a member (9 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:58 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:58-66 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1817-1830 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/app/crons/api.py:179 — src/qwenpaw/app/crons/api.py:179-187 | src/qwenpaw/app/crons/api.py:192-200 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:135 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:135-150 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:90-98 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/app/crons/api.py:108 — src/qwenpaw/app/crons/api.py:108-116 | src/qwenpaw/app/crons/api.py:125-135 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/memory/openviking/backend/manager.py:571 — plugins/memory/openviking/backend/manager.py:571-579 | plugins/memory/powercontext/backend/client.py:27-44 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/agents/skill_system/store.py:1331 — src/qwenpaw/agents/skill_system/store.py:1331-1341 | src/qwenpaw/agents/skill_system/store.py:1345-1353 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/channel/discord/qwenpaw_channel_discord/platform.py:148 — plugins/channel/discord/qwenpaw_channel_discord/platform.py:148-156 | plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:200-208 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/app/routers/pawapps.py:166 — src/qwenpaw/app/routers/pawapps.py:166-178 | src/qwenpaw/app/routers/pawapps.py:267-275 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:397 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:397-408 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py:69-77 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/browser/control_link/cdp/adapter.py:552 — src/qwenpaw/browser/control_link/cdp/adapter.py:552-561 | src/qwenpaw/browser/control_link/chrome/adapter.py:594-602 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:120 — packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:120-128 | REDACTED:307-315 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/qwenpaw/plugins/architecture.py:87 — src/qwenpaw/plugins/architecture.py:87-101 | REDACTED:88-96 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) console/src-tauri/src/computer_use_server/platform_macos/window.rs:104 — console/src-tauri/src/computer_use_server/platform_macos/window.rs:104-115 | console/src-tauri/src/computer_use_server/platform_windows/window.rs:164-172 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:180 — plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:180-189 | plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:774-782 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) console/src-tauri/src/backend/runtime.rs:169 — console/src-tauri/src/backend/runtime.rs:169-177 | console/src-tauri/src/updates/coordination.rs:94-102 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:81 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:81-89 | plugins/channel/voice/qwenpaw_channel_voice/platform.py:215-223 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) scripts/check_channel_contracts.py:957 — scripts/check_channel_contracts.py:957-965 | scripts/check_channel_contracts.py:968-976 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) REDACTED:2087 — REDACTED:2087-2095 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:2095-2106 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) scripts/cleanup_windows_sandbox.py:458 — scripts/cleanup_windows_sandbox.py:458-467 | REDACTED:2562-2570 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) scripts/cleanup_windows_sandbox.py:471 — scripts/cleanup_windows_sandbox.py:471-479 | src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:175-190 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×20
  • Duplicated block (7 lines × 2) plugins/apps/agent-kanban/backend/main.py:802 — plugins/apps/agent-kanban/backend/main.py:802-808 | plugins/apps/agent-kanban/backend/main.py:813-819 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:798 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:798-804 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:682-688 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) plugins/apps/qwenpaw-creator/backend/utils/retry.py:32 — plugins/apps/qwenpaw-creator/backend/utils/retry.py:32-38 | plugins/apps/qwenpaw-creator/backend/utils/retry.py:57-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:1884 — REDACTED:1884-1890 | REDACTED:1899-1905 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1884` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) plugins/channel/qq/qwenpaw_channel_qq/driver.py:132 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:132-138 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:142-148 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/wecom/qwenpaw_channel_wecom/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) plugins/harness/qoder/event_mapper.py:193 — plugins/harness/qoder/event_mapper.py:193-199 | src/qwenpaw/portability/providers/qoder_sessions.py:483-489 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/qwenpaw/agents/context/scroll/eviction_index.py:372 — src/qwenpaw/agents/context/scroll/eviction_index.py:372-378 | src/qwenpaw/agents/context/scroll/eviction_index.py:391-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/qwenpaw/agents/skill_system/hub.py:1109 — src/qwenpaw/agents/skill_system/hub.py:1109-1115 | src/qwenpaw/agents/skill_system/hub.py:1126-1132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/qwenpaw/app/channels/renderer.py:221 — src/qwenpaw/app/channels/renderer.py:221-227 | src/qwenpaw/app/channels/renderer.py:303-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/qwenpaw/app/routers/skills.py:1061 — src/qwenpaw/app/routers/skills.py:1061-1067 | src/qwenpaw/app/routers/skills.py:1105-1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:89 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:89-95 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:59-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:54 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:54-60 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:58-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:56 — plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:56-62 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:54-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) src/qwenpaw/app/routers/agents.py:436 — src/qwenpaw/app/routers/agents.py:436-442 | src/qwenpaw/app/routers/messages.py:21-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) src/qwenpaw/market/providers/modelscope.py:176 — src/qwenpaw/market/providers/modelscope.py:176-182 | src/qwenpaw/market/providers/qwenpaw.py:166-172 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5486 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5486-5492 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2608-2614 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) plugins/channel/sip/qwenpaw_channel_sip/driver.py:184 — plugins/channel/sip/qwenpaw_channel_sip/driver.py:184-190 | src/qwenpaw/channel_protocol/shared_response_driver.py:91-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) console/src-tauri/src/computer_use_server/platform_macos/window.rs:41 — console/src-tauri/src/computer_use_server/platform_macos/window.rs:41-47 | console/src-tauri/src/computer_use_server/platform_windows/window.rs:130-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:603 — console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:603-609 | console/src-tauri/src/computer_use_server/platform_windows/uia.rs:387-393 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:603` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) scripts/cleanup_windows_sandbox.py:374 — scripts/cleanup_windows_sandbox.py:374-380 | REDACTED:1169-1175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×19
  • Duplicated block (8 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:245 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:245-252 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:231-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:774 — plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:774-781 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:946-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) plugins/bundle/chrome/api/routes.py:50 — plugins/bundle/chrome/api/routes.py:50-58 | plugins/bundle/chrome/extension_setup.py:528-535 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/qwenpaw/app/chats/utils.py:894 — src/qwenpaw/app/chats/utils.py:894-901 | src/qwenpaw/app/chats/utils.py:974-981 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/chats/utils.py:894` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/qwenpaw/app/routers/skills.py:956 — src/qwenpaw/app/routers/skills.py:956-963 | src/qwenpaw/app/routers/skills.py:1007-1014 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/qwenpaw/cli/cron_cmd.py:86 — src/qwenpaw/cli/cron_cmd.py:86-93 | src/qwenpaw/cli/cron_cmd.py:897-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/qwenpaw/hooks/session/session_hook.py:53 — src/qwenpaw/hooks/session/session_hook.py:53-60 | src/qwenpaw/hooks/session/session_hook.py:105-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/qwenpaw/providers/fallback_chat_model.py:56 — src/qwenpaw/providers/fallback_chat_model.py:56-63 | src/qwenpaw/providers/retry_chat_model.py:399-406 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/qwenpaw/utils/outbound_media.py:222 — src/qwenpaw/utils/outbound_media.py:222-229 | src/qwenpaw/utils/outbound_media.py:268-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/qwenpaw/app/channels/base.py:2266 — src/qwenpaw/app/channels/base.py:2266-2273 | src/qwenpaw/app/channels/renderer.py:542-549 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:340 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:340-347 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:136-143 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) plugins/bundle/cloudpaw/a2a_mode.py:52 — plugins/bundle/cloudpaw/a2a_mode.py:52-59 | src/qwenpaw/modes/mission/__init__.py:296-303 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `ctx` to `"HookContext"` in one and `"Any"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:121 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:121-128 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:80-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) plugins/channel/discord/qwenpaw_channel_discord/driver.py:259 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:259-266 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:234-241 — before extracting anything, compare `plugins/channel/discord/qwenpaw_channel_discord/driver.py` and `plugins/channel/slack/qwenpaw_channel_slack/driver.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) plugins/harness/codex/adapter.py:131 — plugins/harness/codex/adapter.py:131-138 | plugins/harness/qoder/adapter.py:130-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:217 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:217-224 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:217-224 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/qwenpaw/modes/goal/goal_mode.py:111 — src/qwenpaw/modes/goal/goal_mode.py:111-118 | src/qwenpaw/modes/mission/__init__.py:34-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) plugins/channel/discord/qwenpaw_channel_discord/platform.py:312 — plugins/channel/discord/qwenpaw_channel_discord/platform.py:312-319 | plugins/channel/slack/qwenpaw_channel_slack/platform.py:350-357 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) console/src-tauri/src/computer_use_runtime.rs:810 — console/src-tauri/src/computer_use_runtime.rs:810-817 | console/src-tauri/src/computer_use_runtime.rs:823-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×18
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:181 — plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:181-193 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:157-169 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5286 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5286-5299 | plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:277-289 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:835 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:835-847 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1504-1516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:157 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:157-169 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:252-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:965 — plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:965-977 | plugins/apps/qwenpaw-creator/backend/services/media_files/script_execution.py:349-361 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:965` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:381 — plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:381-393 | plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:410-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:381` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:441 — plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:441-453 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:800-812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:238 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:238-250 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:387-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:238` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:463 — plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:463-475 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:1714-1726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:100 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:100-112 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:116-128 — before extracting anything, compare `plugins/bundle/computer-use/computer_use/transport/unix_socket.py` and `plugins/bundle/computer-use/computer_use/transport/windows_pipe.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) REDACTED:696 — REDACTED:696-708 | REDACTED:1058-1070 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/qwenpaw/app/chats/utils.py:755 — src/qwenpaw/app/chats/utils.py:755-767 | src/qwenpaw/app/chats/utils.py:1035-1047 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/chats/utils.py:755` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/qwenpaw/app/routers/agents.py:446 — src/qwenpaw/app/routers/agents.py:446-458 | src/qwenpaw/cli/agents_cmd.py:303-315 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) src/qwenpaw/config/config.py:3777 — src/qwenpaw/config/config.py:3777-3789 | src/qwenpaw/config/config.py:3991-4003 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/config/config.py:3777` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/qwenpaw/hub/process_isolation.py:250 — src/qwenpaw/hub/process_isolation.py:250-262 | src/qwenpaw/hub/process_isolation.py:458-470 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/hub/process_isolation.py:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/qwenpaw/providers/lmstudio_provider.py:16 — src/qwenpaw/providers/lmstudio_provider.py:16-28 | src/qwenpaw/providers/ollama_provider.py:62-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) src/qwenpaw/runtime/prompt_contributors.py:162 — src/qwenpaw/runtime/prompt_contributors.py:162-174 | src/qwenpaw/runtime/prompt_contributors.py:239-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) REDACTED:1174 — REDACTED:1174-1186 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1280-1294 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×18
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:388 — plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:388-398 | plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:463-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:388` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:713 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:713-723 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:769-779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:1188 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:1188-1198 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:1392-1403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:1392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:569 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:569-581 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:439-449 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:569` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1313 — plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1313-1324 | plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1731-1741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:811 — plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:811-821 | plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:845-855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:811` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) plugins/bundle/omp_workflows/shared/state.py:60 — plugins/bundle/omp_workflows/shared/state.py:60-70 | plugins/bundle/omp_workflows/shared/state.py:93-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) REDACTED:2042 — REDACTED:2042-2052 | REDACTED:2467-2477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) REDACTED:2874 — REDACTED:2874-2884 | plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:1072-1082 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) plugins/harness/qoder/event_mapper.py:255 — plugins/harness/qoder/event_mapper.py:255-265 | src/qwenpaw/portability/providers/qoder_sessions.py:556-566 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/qwenpaw/agents/skill_system/registry.py:983 — src/qwenpaw/agents/skill_system/registry.py:983-993 | src/qwenpaw/agents/skill_system/registry.py:1146-1156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/qwenpaw/channel_protocol/artifacts.py:37 — src/qwenpaw/channel_protocol/artifacts.py:37-47 | src/qwenpaw/plugins/execution/bootstrap.py:514-524 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) src/qwenpaw/cli/doctor_fix_runner.py:501 — src/qwenpaw/cli/doctor_fix_runner.py:501-511 | src/qwenpaw/cli/doctor_fix_runner.py:526-536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/doctor_fix_runner.py:501` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/qwenpaw/config/channel_config_compat.py:150 — src/qwenpaw/config/channel_config_compat.py:150-160 | src/qwenpaw/config/channel_config_compat.py:174-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/config/channel_config_compat.py:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/qwenpaw/providers/provider.py:1153 — src/qwenpaw/providers/provider.py:1153-1164 | src/qwenpaw/providers/provider.py:1190-1200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/providers/provider.py:1153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:625 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:625-635 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:497-507 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `job` to `SourceObservationJob` in one and `SourceVideoReadJob` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) src/qwenpaw/browser/control_link/cdp/adapter.py:150 — src/qwenpaw/browser/control_link/cdp/adapter.py:150-160 | src/qwenpaw/browser/control_link/chrome/adapter.py:90-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) scripts/cleanup_windows_sandbox.py:204 — scripts/cleanup_windows_sandbox.py:204-214 | scripts/cleanup_windows_sandbox.py:369-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC2 · Forms & labels · <Input> field component without a label · ×17
  • <Input> field component without a label console/src/components/ConfigFields.tsx:52 — 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.
  • <Input> field component without a label console/src/components/ProjectSelectModal/index.tsx:160 — 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.
  • <Input> field component without a label console/src/components/ProjectSelectModal/index.tsx:168 — 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.
  • <Input> field component without a label console/src/components/ProjectSelectModal/index.tsx:458 — 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.
  • <Input> field component without a label console/src/components/SessionGroupHeader/index.tsx:159 — 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.
  • <Input> field component without a label console/src/components/SessionItem/index.tsx:352 — 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.
  • <Input> field component without a label console/src/features/project-directory/SessionProjectDirectory.tsx:902 — 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.
  • <Input> field component without a label console/src/features/project-directory/SessionProjectDirectory.tsx:914 — 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.
  • <Input> field component without a label console/src/features/project-directory/SessionProjectDirectory.tsx:1134 — 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.
  • <Input> field component without a label console/src/layouts/SidebarSessionList.tsx:946 — 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.
  • <Input> field component without a label console/src/layouts/SidebarSessionList.tsx:960 — 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.
  • <Input> field component without a label console/src/pages/Agent/Checkpoints/index.tsx:404 — 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.
  • <Input> field component without a label console/src/pages/Agent/Checkpoints/index.tsx:556 — 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.
  • <Input> field component without a label console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1469 — 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.
  • <Input> field component without a label console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1486 — 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.
  • <Input> field component without a label console/src/pages/Agent/MCP/components/MCPAccessRuleRows.tsx:40 — 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.
  • <Input> field component without a label console/src/pages/Agent/MCP/components/MCPAccessRuleRows.tsx:96 — 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×16
  • Repeated repair: src/qwenpaw/providers/openai_provider.py src/qwenpaw/providers/openai_provider.py:203 — src/qwenpaw/providers/openai_provider.py changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is OpenAIProvider._normalize_models_payload at line 203), 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(context): support slow summary models and consistent token limits (#8496)”; “fix(providers): honor thinking defaults and declared wire controls (#8358)”; “fix(providers): honor declared thinking disable wire (#8436)”; “fix(providers): carry the session header on connection checks (#7869)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/providers/openai_provider.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/hub/control_app.py src/qwenpaw/hub/control_app.py:158 — src/qwenpaw/hub/control_app.py changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is control_app.create_hub_app at line 158), 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(community): rely on deployment access controls for password login (#8679)”; “fix(hub): distinguish invitation redemption failure reasons (#7952)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”; “fix(hub): audit login attempts and denied runtime creation (#7683)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/hub/control_app.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/providers/retry_chat_model.py src/qwenpaw/providers/retry_chat_model.py:1081 — src/qwenpaw/providers/retry_chat_model.py changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is RetryChatModel._wrap_stream at line 1081), 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(providers): prevent silent LLM startup hangs (#8435) (#8468)”; “fix(providers): recover after stalled stream cleanup (#7960)”; “fix(agent): fold consumed thinking under context pressure (#7521)”; “fix: detect and recover from stalled LLM streams (#7150)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/providers/retry_chat_model.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/constant.py src/qwenpaw/constant.py:24 — src/qwenpaw/constant.py changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is EnvVarLoader.get_float at line 24), 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(memory): stop leaking auto-memory-recall payload to channels (#7835)”; “fix(providers): prevent silent LLM startup hangs (#8435) (#8468)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”; “fix: detect and recover from stalled LLM streams (#7150)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/constant.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/sandbox/windows_unelevated_sandbox.py src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1176 — src/qwenpaw/sandbox/windows_unelevated_sandbox.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is windows_unelevated_sandbox._remove_ace_by_sid_api at line 1176), 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(sandbox): never write a sandbox ACE on a volume root (#8018)”; “fix(shell): add opt-in memory protection with live Console settings (#8574)”; “fix(ci): resolve cross-platform path handling and test failures (#8003)”; “fix(sandbox): fix antivirus software blocking issues (#6986)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/sandbox/windows_unelevated_sandbox.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/backup/_ops/restore.py src/qwenpaw/backup/_ops/restore.py:283 — src/qwenpaw/backup/_ops/restore.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is restore._stage_agents at line 283), 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(sqlite): skip completed startup migrations and snapshot live backups (#8541)”; “fix(history): support external database paths and portable backups (#8246)”; “fix(history): harden SQLite persistence, backup, and restore (#6459)”; “fix(backup): preserve Unix permission bits during restore for SECRET_DIR and .master_key (#7658)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/backup/_ops/restore.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/providers/provider_model_state.py src/qwenpaw/providers/provider_model_state.py:265 — src/qwenpaw/providers/provider_model_state.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is provider_model_state.migrate_provider_snapshot at line 265), 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(providers): reject out-of-range model config values on the write path (#8550)”; “fix(providers): migrate discovered model output limits (#7386)”; “fix(providers): separate model output capabilities from request limits (#7337)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/providers/provider_model_state.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/agents/context/__init__.py src/qwenpaw/agents/context/__init__.py:138 — src/qwenpaw/agents/context/__init__.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is context.build_scroll_components at line 138), 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(context): support slow summary models and consistent token limits (#8496)”; “fix(sqlite): skip completed startup migrations and snapshot live backups (#8541)”; “fix(history): harden SQLite persistence, backup, and restore (#6459)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/agents/context/__init__.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: console/src/pages/Coding/FilePreview.tsx console/src/pages/Coding/FilePreview.tsx:359 — console/src/pages/Coding/FilePreview.tsx changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is FilePreview.MarkdownPreview at line 359), 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(console): resolve markdown preview relative links and images (#8551)”; “fix(console): restore interactive HTML previews (#8245)”; “fix(console): render LaTeX math with KaTeX (#7909)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/pages/Coding/FilePreview.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/hub/process_isolation.py src/qwenpaw/hub/process_isolation.py:273 — src/qwenpaw/hub/process_isolation.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is MacOSSeatbeltIsolator.prepare at line 273), 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(test): reduce plugin unit test execution time (#8489)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”; “fix(hub): authenticate CLI requests to the current local runtime (#7631)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/hub/process_isolation.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/hub/model_service/api_models.py src/qwenpaw/hub/model_service/api_models.py:76 — src/qwenpaw/hub/model_service/api_models.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ConnectionBody.valid_provider at line 76), 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(hub): configure gateway timeout and preserve upstream errors (#8387)”; “fix(hub): respect administrator token capability overrides (#8169)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/hub/model_service/api_models.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: console/src/api/modules/hub.ts console/src/api/modules/hub.ts:253 — console/src/api/modules/hub.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is hub.listPath at line 253), 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(console): support configurable basename for subpath deployments (#8316)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”; “fix(hub): make runtime lifecycle startup non-blocking (#7566)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- console/src/api/modules/hub.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.
  • Repeated repair: src/qwenpaw/sandbox/config.py src/qwenpaw/sandbox/config.py:787 — src/qwenpaw/sandbox/config.py 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 12 (its worst body is config.create_sandbox at line 787), 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(sandbox): never write a sandbox ACE on a volume root (#8018)”; “fix(hub): correct local runtime CLI, PawApp access and model defaults (#7833)”; “fix(sandbox): expand ~ and in policy-derived mount paths so out-of-w… (#7116)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/sandbox/config.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/plugins/dependency_usage.py src/qwenpaw/plugins/dependency_usage.py:334 — src/qwenpaw/plugins/dependency_usage.py 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 12 (its worst body is DependencyUsageRegistry._observe_host at line 334), 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(plugins): refactor dependency check (#8598)”; “fix(channels): resolve desktop plugin installation and repair failures (#8509)”; “fix(test): reduce plugin unit test execution time (#8489)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/plugins/dependency_usage.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/plugins/python_backend.py src/qwenpaw/plugins/python_backend.py:340 — src/qwenpaw/plugins/python_backend.py 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 15 (its worst body is PythonBackend.prepare at line 340), 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(plugins): refactor dependency check (#8598)”; “fix(channels): resolve desktop plugin installation and repair failures (#8509)”; “fix(test): reduce plugin unit test execution time (#8489)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/plugins/python_backend.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/qwenpaw/sandbox/local_sandbox.py src/qwenpaw/sandbox/local_sandbox.py:186 — src/qwenpaw/sandbox/local_sandbox.py 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 14 (its worst body is NoneSandbox.execute at line 186), 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(sandbox): preserve cmd.exe quoting in NoneSandbox (#8602)”; “fix(shell): add opt-in memory protection with live Console settings (#8574)”; “fix(shell): detach child stdin from interactive console (#7598)”. 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 16:48:08 +08:00' --until='2026-11-16 16:48:08 +08:00' --full-history --no-merges -- src/qwenpaw/sandbox/local_sandbox.py`: 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.
D31 · IaC & Container Security · Medium IaC · ×16
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×15
  • Edited copy of a member (20 corresponding lines) REDACTED:628 — REDACTED:628-683 | REDACTED:702-772 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:721 — plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:721-740 | plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:332-352 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/checkpoints/safe_workspace_fs.py:234 — src/qwenpaw/checkpoints/safe_workspace_fs.py:234-253 | src/qwenpaw/checkpoints/safe_workspace_fs.py:262-284 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/agents/fork_project.py:868 — src/qwenpaw/agents/fork_project.py:868-897 | src/qwenpaw/agents/fork_project.py:1141-1160 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/providers/retry_chat_model.py:399 — src/qwenpaw/providers/retry_chat_model.py:399-422 | src/qwenpaw/token_usage/model_wrapper.py:77-96 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:851 — REDACTED:851-870 | REDACTED:877-902 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:391 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:391-410 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:812-835 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/drivers/credentials/store.py:132 — src/qwenpaw/drivers/credentials/store.py:132-151 | src/qwenpaw/drivers/credentials/store.py:154-175 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/plugins/execution/bootstrap.py:459 — src/qwenpaw/plugins/execution/bootstrap.py:459-478 | src/qwenpaw/plugins/execution/bootstrap.py:482-501 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:361 — plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:361-381 | plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:395-414 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:996 — plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:996-1016 | plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1029-1048 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/tool/qwen-image/qwen_image_tool.py:111 — plugins/tool/qwen-image/qwen_image_tool.py:111-133 | plugins/tool/wan27/wan27_tool.py:87-106 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/providers/anthropic_provider.py:373 — src/qwenpaw/providers/anthropic_provider.py:373-407 | src/qwenpaw/providers/gemini_provider.py:430-449 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) plugins/memory/adbpg/backend/manager.py:130 — plugins/memory/adbpg/backend/manager.py:130-149 | plugins/memory/powercontext/backend/manager.py:185-210 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/qwenpaw/agents/context/scroll/memoryspace.py:495 — src/qwenpaw/agents/context/scroll/memoryspace.py:495-514 | src/qwenpaw/agents/context/scroll/memoryspace.py:552-573 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×15
  • Duplicated block (15 lines × 2) REDACTED:502 — REDACTED:502-516 | REDACTED:554-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4994 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4994-5008 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5038-5052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4994` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2655 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2655-2669 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4103-4117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2655` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/script_execution.py:331 — plugins/apps/qwenpaw-creator/backend/services/media_files/script_execution.py:331-345 | plugins/apps/qwenpaw-creator/backend/services/project_files/script_import.py:386-400 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) plugins/bundle/chrome/extension_setup.py:456 — plugins/bundle/chrome/extension_setup.py:456-470 | plugins/bundle/chrome/extension_setup.py:491-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/bundle/chrome/extension_setup.py:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) plugins/bundle/qwenpaw-pet/pet_paths.py:13 — plugins/bundle/qwenpaw-pet/pet_paths.py:13-27 | plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/runtime.py:27-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:738 — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:738-752 | plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:456-470 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) REDACTED:2109 — REDACTED:2109-2123 | REDACTED:2503-2517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/qwenpaw/agents/context/scroll/manager.py:1152 — src/qwenpaw/agents/context/scroll/manager.py:1152-1166 | src/qwenpaw/loop/gates/completion.py:128-142 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/qwenpaw/agents/memory/proactive/proactive_trigger.py:133 — src/qwenpaw/agents/memory/proactive/proactive_trigger.py:133-147 | src/qwenpaw/agents/memory/proactive/proactive_utils.py:138-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2688 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2688-2702 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4094-4108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3829 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3829-3843 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4171-4185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/qwenpaw/config/config.py:3622 — src/qwenpaw/config/config.py:3622-3636 | src/qwenpaw/config/config.py:3643-3657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/qwenpaw/hub/control_app.py:1340 — src/qwenpaw/hub/control_app.py:1340-1354 | src/qwenpaw/hub/control_app.py:1367-1381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/hub/control_app.py:1340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15 lines × 2) src/qwenpaw/plugins/api.py:201 — src/qwenpaw/plugins/api.py:201-215 | src/qwenpaw/plugins/api.py:265-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×15
  • Duplicated block (10 lines × 2) plugins/apps/qwenpaw-creator/backend/models/video_backends/kling.py:255 — plugins/apps/qwenpaw-creator/backend/models/video_backends/kling.py:255-264 | plugins/apps/qwenpaw-creator/backend/models/video_backends/vidu.py:256-265 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/video_backends/kling.py:255` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1461 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1461-1470 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1509-1518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1461` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:77 — plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:77-86 | plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:123-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:52 — plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:52-61 | plugins/channel/wechat/qwenpaw_channel_wechat/driver.py:58-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:121 — plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:121-130 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:100-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) plugins/harness/codex/adapter.py:554 — plugins/harness/codex/adapter.py:554-563 | plugins/harness/codex/adapter.py:905-914 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:392 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:392-401 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:392-401 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1268 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1268-1277 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4908-4917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3186 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3186-3195 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3641-3650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/qwenpaw/app/routers/skills.py:1372 — src/qwenpaw/app/routers/skills.py:1372-1381 | src/qwenpaw/app/routers/skills.py:1464-1473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/routers/skills.py:1372` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) REDACTED:96 — REDACTED:96-106 | REDACTED:148-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/qwenpaw/providers/openai_provider.py:969 — src/qwenpaw/providers/openai_provider.py:969-978 | src/qwenpaw/providers/openai_provider.py:1046-1055 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) src/qwenpaw/cli/cron_cmd.py:16 — src/qwenpaw/cli/cron_cmd.py:16-25 | src/qwenpaw/cli/http.py:30-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/cron_cmd.py:16` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/utils.py:24 — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/utils.py:24-33 | REDACTED:295-307 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) console/src-tauri/src/computer_use_server/platform_macos/input.rs:614 — console/src-tauri/src/computer_use_server/platform_macos/input.rs:614-623 | console/src-tauri/src/computer_use_server/platform_macos/window.rs:249-258 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
R11 · Import Boundaries · Boundary violation [package · ×15
  • Boundary violation [package:third-party-deep-import] console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:17 — console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:17 imports react-syntax-highlighter/dist/esm/styles/prism, 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] REDACTED:8 — REDACTED:8 imports react-syntax-highlighter/dist/esm/styles/prism, 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] console/src/hooks/useUiLocale.ts:6 — console/src/hooks/useUiLocale.ts:6 imports @agentscope-ai/design/lib/i18n, 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] console/src/pages/Chat/HostBubbles.tsx:20 — console/src/pages/Chat/HostBubbles.tsx:20 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Request/Card, 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] console/src/pages/Chat/HostBubbles.tsx:21 — console/src/pages/Chat/HostBubbles.tsx:21 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder, 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] console/src/pages/Chat/HostBubbles.tsx:22 — console/src/pages/Chat/HostBubbles.tsx:22 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Actions, 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] console/src/pages/Chat/HostBubbles.tsx:23 — console/src/pages/Chat/HostBubbles.tsx:23 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Error, 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] console/src/pages/Chat/HostBubbles.tsx:24 — console/src/pages/Chat/HostBubbles.tsx:24 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Reasoning, 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] console/src/pages/Chat/HostBubbles.tsx:25 — console/src/pages/Chat/HostBubbles.tsx:25 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Tool, 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] console/src/pages/Chat/HostBubbles.tsx:36 — console/src/pages/Chat/HostBubbles.tsx:36 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/Context/ChatAnywhereOptionsContext, 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] console/src/pages/Chat/index.tsx:95 — console/src/pages/Chat/index.tsx:95 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/Context/ChatAnywhereI18nContext, 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] console/src/pages/Chat/messageDisplay.ts:1 — console/src/pages/Chat/messageDisplay.ts:1 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/types, 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] console/src/pages/Chat/turnEndedProvider.tsx:22 — console/src/pages/Chat/turnEndedProvider.tsx:22 imports @agentscope-ai/chat/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder, 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:relative-cross-package] console/src/plugins/pawapp-sdk/types.ts:2 — console/src/plugins/pawapp-sdk/types.ts:2 reaches into another package with a relative path (../../../../src/qwenpaw/plugins/frontend/paw) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] console/src/plugins/types/qwenpaw.d.ts:2 — console/src/plugins/types/qwenpaw.d.ts:2 reaches into another package with a relative path (../../../../src/qwenpaw/plugins/frontend/host) — import the package by name instead.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×14
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/models/config.py:672 — plugins/apps/qwenpaw-creator/backend/models/config.py:672-677 | plugins/apps/qwenpaw-creator/backend/models/config.py:1227-1232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:61 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:61-66 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1825-1830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:626 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:626-631 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_templates.py:114-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1912 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1912-1917 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:2190-2195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1912` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:480 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:480-485 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:620-625 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:621 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:621-626 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:859-864 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) src/qwenpaw/app/routers/skills.py:1014 — src/qwenpaw/app/routers/skills.py:1014-1019 | src/qwenpaw/app/routers/skills.py:1111-1116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2567 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2567-2572 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4072-4077 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:63 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:63-68 | plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:65-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/qwenpaw/app/routers/agents.py:350 — src/qwenpaw/app/routers/agents.py:350-355 | src/qwenpaw/config/config.py:2591-2596 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) src/qwenpaw/browser/control_link/cdp/adapter.py:63 — src/qwenpaw/browser/control_link/cdp/adapter.py:63-68 | src/qwenpaw/browser/control_link/playwright/adapter.py:164-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) REDACTED:169 — REDACTED:169-174 | REDACTED:301-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) src/qwenpaw/app/channels/access_control.py:88 — src/qwenpaw/app/channels/access_control.py:88-94 | src/qwenpaw/app/mail/mail_access_control.py:196-201 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) console/src-tauri/src/backend/runtime.rs:180 — console/src-tauri/src/backend/runtime.rs:180-185 | console/src-tauri/src/updates/coordination.rs:105-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×14
  • Duplicated block (5 lines × 2) plugins/apps/qwenpaw-creator/backend/models/config.py:673 — plugins/apps/qwenpaw-creator/backend/models/config.py:673-677 | plugins/apps/qwenpaw-creator/backend/models/config.py:748-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1463 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1463-1467 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1570-1574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1463` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/qwenpaw/hub/control_app.py:828 — src/qwenpaw/hub/control_app.py:828-832 | src/qwenpaw/hub/control_app.py:1432-1436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/hub/control_app.py:828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/qwenpaw/hub/control_app.py:967 — src/qwenpaw/hub/control_app.py:967-971 | src/qwenpaw/hub/control_app.py:1144-1148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/hub/control_app.py:967` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/hub/control_app.py:1150` calls `Query` and `src/qwenpaw/hub/control_app.py:973` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/keyframe_cache.py:76 — plugins/apps/qwenpaw-creator/backend/services/media_files/keyframe_cache.py:76-80 | plugins/apps/qwenpaw-creator/backend/services/project_files/remote_cache.py:101-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:99 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:99-103 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:69-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/server.py:54 — plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/server.py:54-58 | plugins/bundle/qwenpaw-pet/router.py:35-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) plugins/channel/slack/qwenpaw_channel_slack/handler.py:284 — plugins/channel/slack/qwenpaw_channel_slack/handler.py:284-288 | plugins/channel/slack/qwenpaw_channel_slack/sender.py:486-490 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) plugins/memory/openviking/backend/client.py:29 — plugins/memory/openviking/backend/client.py:29-37 | plugins/memory/powercontext/backend/client.py:191-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) plugins/memory/openviking/backend/manager.py:583 — plugins/memory/openviking/backend/manager.py:583-587 | src/qwenpaw/agents/memory/reme_light_memory_manager.py:249-253 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/qwenpaw/cli/tui/widgets/session_picker.py:135 — src/qwenpaw/cli/tui/widgets/session_picker.py:135-139 | src/qwenpaw/cli/tui/widgets/theme_picker.py:111-115 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) src/qwenpaw/app/channels/access_control.py:417 — src/qwenpaw/app/channels/access_control.py:417-421 | src/qwenpaw/app/mail/mail_access_control.py:634-638 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/app/mail/mail_access_control.py:633` calls `_reload_if_stale` and `src/qwenpaw/app/channels/access_control.py:416` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) console/src-tauri/src/computer_use_server/dispatch.rs:551 — console/src-tauri/src/computer_use_server/dispatch.rs:551-555 | console/src-tauri/src/computer_use_server/dispatch.rs:607-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `console/src-tauri/src/computer_use_server/dispatch.rs:551` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) console/src-tauri/src/backend_download.rs:108 — console/src-tauri/src/backend_download.rs:108-112 | console/src-tauri/src/external_link.rs:139-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `console/src-tauri/src/backend_download.rs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · qwenpaw_desktop · ×13
  • qwenpaw_desktop::notifications::poll_console (cognitive 71) console/src-tauri/src/notifications.rs:483 — qwenpaw_desktop::notifications::poll_console has cognitive complexity 71 (threshold 15). Drivers by points: if/else 13 (62 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 54). 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.
  • qwenpaw_desktop::backend::runtime::connect (cognitive 51) console/src-tauri/src/backend/runtime.rs:187 — qwenpaw_desktop::backend::runtime::connect has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (41 pts), match/switch 1 (6 pts), boolean chains 2, loops 2 (nesting depth added 33). 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.
  • qwenpaw_desktop::computer_use_server::dispatch::dispatch_request (cognitive 37) console/src-tauri/src/computer_use_server/dispatch.rs:128 — qwenpaw_desktop::computer_use_server::dispatch::dispatch_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 27 (32 pts), boolean chains 3, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • qwenpaw_desktop::updates::windows::installer_processes (cognitive 25) console/src-tauri/src/updates/windows.rs:468 — qwenpaw_desktop::updates::windows::installer_processes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • qwenpaw_desktop::computer_use_runtime::stop_managed_child (cognitive 23) console/src-tauri/src/computer_use_runtime.rs:768 — qwenpaw_desktop::computer_use_runtime::stop_managed_child has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • qwenpaw_desktop::computer_use_runtime::serve_control_connection (cognitive 20) console/src-tauri/src/computer_use_runtime.rs:1106 — qwenpaw_desktop::computer_use_runtime::serve_control_connection has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (20 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • qwenpaw_desktop::run (cognitive 18) console/src-tauri/src/lib.rs:36 — qwenpaw_desktop::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • qwenpaw_desktop::backend::attach (cognitive 17) console/src-tauri/src/backend.rs:183 — qwenpaw_desktop::backend::attach has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), match/switch 2 (3 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.
  • qwenpaw_desktop::backend::daemon::run (cognitive 17) console/src-tauri/src/backend/daemon.rs:11 — qwenpaw_desktop::backend::daemon::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • qwenpaw_desktop::computer_use_server::platform_macos::accessibility_tree::walk_accessibility (cognitive 17) console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:915 — qwenpaw_desktop::computer_use_server::platform_macos::accessibility_tree::walk_accessibility has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, loops 2 (4 pts) (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.
  • qwenpaw_desktop::computer_use_runtime::wait_for_macos_helper_ready (cognitive 16) console/src-tauri/src/computer_use_runtime.rs:345 — qwenpaw_desktop::computer_use_runtime::wait_for_macos_helper_ready has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • qwenpaw_desktop::computer_use_server::platform_macos::accessibility_tree::collect_accessibility (cognitive 16) console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:674 — qwenpaw_desktop::computer_use_server::platform_macos::accessibility_tree::collect_accessibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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.
  • qwenpaw_desktop::notifications::notify_events (cognitive 16) console/src-tauri/src/notifications.rs:602 — qwenpaw_desktop::notifications::notify_events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×13
  • Edited copy of a member (7 corresponding lines) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:282 — plugins/apps/qwenpaw-creator/backend/api/model_routes.py:282-290 | plugins/apps/qwenpaw-creator/backend/services/observability/config.py:57-63 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/cli/receipts_cmd.py:60 — src/qwenpaw/cli/receipts_cmd.py:60-66 | src/qwenpaw/cli/receipts_cmd.py:78-84 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:583 — plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:583-589 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/safe_remote_download.py:114-126 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/bundle/computer-use/computer_use/access.py:168 — plugins/bundle/computer-use/computer_use/access.py:168-179 | plugins/bundle/computer-use/computer_use/feature_state.py:89-95 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/keyframe_cache.py:66 — plugins/apps/qwenpaw-creator/backend/services/media_files/keyframe_cache.py:66-72 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:225-233 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/plugins/_messages.py:50 — src/qwenpaw/plugins/_messages.py:50-56 | src/qwenpaw/plugins/_messages.py:112-123 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/app/crons/manager.py:375 — src/qwenpaw/app/crons/manager.py:375-382 | src/qwenpaw/app/crons/manager.py:385-391 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/apps/qwenpaw-creator/backend/utils/paths.py:66 — plugins/apps/qwenpaw-creator/backend/utils/paths.py:66-72 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:2496-2503 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/runtime.py:197 — plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/runtime.py:197-203 | src/qwenpaw/agents/fork_project.py:568-575 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/agents/prompt.py:155 — src/qwenpaw/agents/prompt.py:155-179 | src/qwenpaw/runtime/prompt_contributors.py:110-116 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/hub/auth.py:472 — src/qwenpaw/hub/auth.py:472-478 | src/qwenpaw/hub/registry.py:100-107 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/config.py:2230 — plugins/apps/qwenpaw-creator/backend/models/config.py:2230-2237 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:70-76 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/qwenpaw/browser/control_link/cdp/adapter.py:136 — src/qwenpaw/browser/control_link/cdp/adapter.py:136-142 | src/qwenpaw/browser/control_link/playwright/adapter.py:195-205 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×13
  • Duplicated block (17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3294 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3294-3310 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4973-4989 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4972` calls `_target_element_id`, `str` and `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3293` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3395 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3395-3411 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4814-4830 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:576 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:576-592 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:605-621 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:262 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:262-278 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:406-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:405` calls `mkdir` and `plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:261` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:375 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:375-391 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:375-391 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2490 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2490-2506 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2536-2552 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) src/qwenpaw/app/routers/approval.py:145 — src/qwenpaw/app/routers/approval.py:145-161 | src/qwenpaw/app/routers/approval.py:221-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/routers/approval.py:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) src/qwenpaw/app/routers/skills.py:1353 — src/qwenpaw/app/routers/skills.py:1353-1369 | src/qwenpaw/app/routers/skills.py:1446-1462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/routers/skills.py:1353` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/app/routers/skills.py:1351` calls `get_agent_for_request`, `Path` and `src/qwenpaw/app/routers/skills.py:1445` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) src/qwenpaw/cli/providers_cmd.py:691 — src/qwenpaw/cli/providers_cmd.py:691-707 | src/qwenpaw/cli/providers_cmd.py:724-740 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/qwenpaw/governance/detectors.py:257 — src/qwenpaw/governance/detectors.py:257-273 | src/qwenpaw/governance/detectors.py:285-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/governance/detectors.py:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/qwenpaw/plugins/execution/process.py:201 — src/qwenpaw/plugins/execution/process.py:201-217 | src/qwenpaw/plugins/execution/process.py:374-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/qwenpaw/providers/local_decision_model.py:108 — src/qwenpaw/providers/local_decision_model.py:108-124 | src/qwenpaw/providers/typesafe_provider.py:91-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) REDACTED:1296 — REDACTED:1296-1312 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1552-1568 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×13
  • Duplicated block (14 lines × 2) plugins/apps/qwenpaw-creator/backend/api/project_routes.py:214 — plugins/apps/qwenpaw-creator/backend/api/project_routes.py:214-227 | plugins/apps/qwenpaw-creator/backend/api/project_routes.py:265-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) plugins/apps/qwenpaw-creator/backend/models/config.py:132 — plugins/apps/qwenpaw-creator/backend/models/config.py:132-145 | plugins/apps/qwenpaw-creator/backend/models/config.py:156-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) plugins/apps/qwenpaw-creator/backend/models/text_model.py:116 — plugins/apps/qwenpaw-creator/backend/models/text_model.py:116-129 | plugins/apps/qwenpaw-creator/backend/models/text_model.py:192-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8428 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8428-8441 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8622-8635 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:655 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:655-668 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3593-3606 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:300 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:300-313 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:304-317 — before extracting anything, compare `plugins/bundle/computer-use/computer_use/transport/unix_socket.py` and `plugins/bundle/computer-use/computer_use/transport/windows_pipe.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) plugins/channel/qq/qwenpaw_channel_qq/driver.py:221 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:221-234 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:181-194 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/telegram/qwenpaw_channel_telegram/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) src/qwenpaw/browser/runtime/engine.py:214 — src/qwenpaw/browser/runtime/engine.py:214-227 | src/qwenpaw/browser/runtime/engine.py:231-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/qwenpaw/checkpoints/safe_workspace_fs.py:379 — src/qwenpaw/checkpoints/safe_workspace_fs.py:379-392 | src/qwenpaw/checkpoints/safe_workspace_fs.py:414-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:127 — REDACTED:127-140 | REDACTED:192-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/qwenpaw/plugins/execution/bootstrap.py:459 — src/qwenpaw/plugins/execution/bootstrap.py:459-472 | src/qwenpaw/plugins/execution/bootstrap.py:482-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:329 — REDACTED:329-342 | src/qwenpaw/backup/_utils/safe_swap.py:157-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/qwenpaw/security/skill_scanner/models.py:196 — src/qwenpaw/security/skill_scanner/models.py:196-209 | src/qwenpaw/security/tool_guard/models.py:131-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×13
  • Outbound HTTP without resilience plugins/bundle/qwenpaw-pet/emitter.py:229 — `httpx.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/bundle/qwenpaw-pet/emitter.py:728 — `httpx.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/bundle/qwenpaw-pet/emitter.py:770 — `httpx.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/channel/discord/qwenpaw_channel_discord/platform.py:428 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:489 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/utils.py:45 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience plugins/channel/yuanbao/qwenpaw_channel_yuanbao/auth.py:108 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:796 — `requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:800 — `requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:805 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:76 — `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:162 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/qwenpaw/drivers/credentials/providers.py:83 — `httpx.AsyncClient(` 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×13
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/portability/providers/codex_rollout_reader.py:55 — `codex_non_root_session_kind` is public, takes a document from its caller (line 59) and hands it to `_source_label`, which calls itself at line 55 (`_source_label`) with a piece of `value` (and at line 56) — and nowhere in `_source_label` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_source_label` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/channel_protocol/canonical.py:125 — `canonical_json` is public, takes a document from its caller (line 165) and hands it to `_encode`, which calls itself at line 125 (`_encode`) with a piece of `value` — and nowhere in `_encode` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/app/inbox_trace_store.py:30 — `create_trace` is public, takes a document from its caller (line 67) and hands it to `_to_jsonable`, which calls itself at line 30 (`_to_jsonable`) with a piece of `value` (and at line 32, line 34, line 36) — and nowhere in `_to_jsonable` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_to_jsonable` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/app/chats/query_error_dump.py:23 — `write_query_error_dump` is public, takes a document from its caller (line 48) and hands it to `_safe_json_serialize`, which calls itself at line 23 (`_safe_json_serialize`) with a piece of `obj` (and at line 25) — and nowhere in `_safe_json_serialize` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_safe_json_serialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/agents/tools/run_tool_batch.py:220 — `resolve_step_refs` is public and takes `value: Any` from its caller, and it calls itself at line 220 (`resolve_step_refs`) with a piece of `value` (and at line 224) — and nowhere in `resolve_step_refs` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `resolve_step_refs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/qwenpaw/agents/skill_system/store.py:894 — `write_skill_to_dir` is public, takes a document from its caller (line 1356) and hands it to `_create_files_from_tree`, which calls itself at line 894 (`_create_files_from_tree`) with a piece of `tree` — and nowhere in `_create_files_from_tree` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_create_files_from_tree` 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 plugins/apps/qwenpaw-creator/ui/src/api/creator/projects.ts:242 — `hashProjectValue` is exported, takes a document from its caller (line 268) and hands it to `sortJson`, which calls itself at line 242 (`sortJson`) with a piece of `value` (and at line 247) — and nowhere in `sortJson` 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 `sortJson` 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 plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:114 — `canonical_json_bytes` is public, takes a document from its caller (line 101) and hands it to `normalize_numbers`, which calls itself at line 114 (`normalize_numbers`) with a piece of `obj` (and at line 116) — and nowhere in `normalize_numbers` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normalize_numbers` 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 plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:182 — `diff_json` is public, takes a document from its caller (line 139) and hands it to `visit`, which calls itself at line 182 (`visit`) with a piece of `left` — and nowhere in `visit` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `visit` 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 plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:41 — `canonical_data` is public and takes `value: Any` from its caller, and it calls itself at line 41 (`canonical_data`) with a piece of `value` (and at line 43, line 51) — and nowhere in `canonical_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `canonical_data` 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 plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:171 — `project_document_etag` is public, takes a document from its caller (line 209) and hands it to `_source_document_data`, which calls itself at line 171 (`_source_document_data`) with a piece of `value` (and at line 182, line 188, line 192, line 200) — and nowhere in `_source_document_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_source_document_data` 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 console/src/pages/Chat/headlineFilter.ts:31 — `stripScrollHeadlineTextBlocks` is exported and takes `node: unknown` from its caller, and it calls itself at line 31 (`stripScrollHeadlineTextBlocks`) with a piece of `node` (and at line 48) — and nowhere in `stripScrollHeadlineTextBlocks` 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 `stripScrollHeadlineTextBlocks` 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 console/src/components/Chat/ToolCards/shared/rawToolDisplay.ts:131 — `formatRawToolValue` is exported, takes a document from its caller (line 196) and hands it to `sanitizeForDisplay`, which calls itself at line 131 (`sanitizeForDisplay`) with a piece of `value` (and at line 150) — and nowhere in `sanitizeForDisplay` 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 `sanitizeForDisplay` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D17 · Explicit Debt · TodoComment · ×12
  • TodoComment tests/conftest.py:442 — # TODO: Module-level markers (s_module, a_module, etc.) — 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 tests/contract/providers/test_provider_contract.py:89 — # Example Implementations (TODO: Add real ones) — 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 src/qwenpaw/security/skill_scanner/scan_policy.py:43 — # TODO: add "strict" and "permissive" presets once their YAML files are shipped — 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 src/qwenpaw/sandbox/macos_sandbox.py:47 — # TODO: this remains a heuristic. A robust solution would be to read — 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 src/qwenpaw/providers/capping_formatter.py:898 — # TODO: Remove this workaround after AgentScope formats DashScope — 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 src/qwenpaw/local_models/llamacpp.py:584 — # TODO: add more detailed capability flags — 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 src/qwenpaw/governance/resource_governor.py:417 — # TODO: revisit default when Landlock ABI v4 is mainstream; — 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 src/qwenpaw/agents/model_factory.py:103 — # TODO(AgentScope compatibility): This is a temporary workaround for — 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 src/qwenpaw/agents/model_factory.py:1696 — # TODO: Custom OpenAI formatter subclasses may emit thinking outside — 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 src/qwenpaw/agents/tools/shell.py:1408 — # TODO: Add dedicated support for long-running processes through a managed — 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 src/qwenpaw/_compat/message.py:161 — # TODO: handle ``state`` field on tool_result blocks. — 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 console/src/layouts/constants.ts:80 — // 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.
D29 · Static Analysis (SAST) · REDACTED · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×11
  • Edited copy of a member (10 corresponding lines) plugins/apps/qwenpaw-data/backend/config.py:56 — plugins/apps/qwenpaw-data/backend/config.py:56-65 | plugins/apps/qwenpaw-data/backend/config.py:91-104 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/config.py:961 — plugins/apps/qwenpaw-creator/backend/models/config.py:961-975 | plugins/apps/qwenpaw-creator/backend/models/config.py:2210-2219 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) plugins/channel/matrix/qwenpaw_channel_matrix/state.py:44 — plugins/channel/matrix/qwenpaw_channel_matrix/state.py:44-53 | plugins/channel/matrix/qwenpaw_channel_matrix/state.py:124-138 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/qwenpaw/app/mail/mail_access_control.py:490 — src/qwenpaw/app/mail/mail_access_control.py:490-499 | src/qwenpaw/app/mail/mail_access_control.py:558-567 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/qwenpaw/plugins/provision.py:498 — src/qwenpaw/plugins/provision.py:498-507 | src/qwenpaw/plugins/updates.py:161-170 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:28 — REDACTED:28-37 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:1044-1054 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:109 — plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:109-118 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:141-153 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/qwenpaw/app/channels/access_control.py:561 — src/qwenpaw/app/channels/access_control.py:561-570 | src/qwenpaw/app/mail/mail_access_control.py:941-954 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:82 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:82-92 | plugins/apps/qwenpaw-creator/backend/services/project_files/remote_cache.py:44-53 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/qwenpaw/browser/control_link/cdp_verbs.py:791 — src/qwenpaw/browser/control_link/cdp_verbs.py:791-801 | src/qwenpaw/browser/control_link/chrome/adapter.py:658-667 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3699 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3699-3708 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5555-5565 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×11
  • Duplicated block (20 lines × 2) plugins/apps/agent-kanban/backend/main.py:579 — plugins/apps/agent-kanban/backend/main.py:579-598 | plugins/apps/agent-kanban/backend/main.py:609-628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:815 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:815-834 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:625-644 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (20 lines × 2) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:113 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:113-132 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:130-149 — before extracting anything, compare `plugins/bundle/computer-use/computer_use/transport/unix_socket.py` and `plugins/bundle/computer-use/computer_use/transport/windows_pipe.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/bundle/computer-use/computer_use/transport/unix_socket.py:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:134 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:134-153 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:151-170 — before extracting anything, compare `plugins/bundle/computer-use/computer_use/transport/unix_socket.py` and `plugins/bundle/computer-use/computer_use/transport/windows_pipe.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/bundle/computer-use/computer_use/transport/unix_socket.py:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) plugins/channel/discord/qwenpaw_channel_discord/driver.py:210 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:210-229 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:202-221 — before extracting anything, compare `plugins/channel/discord/qwenpaw_channel_discord/driver.py` and `plugins/channel/slack/qwenpaw_channel_slack/driver.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/discord/qwenpaw_channel_discord/driver.py:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) src/qwenpaw/agents/skill_system/pool_service.py:268 — src/qwenpaw/agents/skill_system/pool_service.py:268-287 | src/qwenpaw/agents/skill_system/workspace_service.py:634-653 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (20 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:104 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:104-123 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:104-123 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) src/qwenpaw/app/channels/access_control.py:445 — src/qwenpaw/app/channels/access_control.py:445-464 | src/qwenpaw/app/channels/access_control.py:479-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) src/qwenpaw/app/routers/tools.py:404 — src/qwenpaw/app/routers/tools.py:404-423 | src/qwenpaw/app/routers/tools.py:512-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) src/qwenpaw/browser/control_link/cdp/adapter.py:248 — src/qwenpaw/browser/control_link/cdp/adapter.py:248-267 | src/qwenpaw/browser/control_link/chrome/adapter.py:312-331 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `owner` to `tuple[str, str]` in one and `OwnerKey` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) src/qwenpaw/modes/goal/helpers.py:79 — src/qwenpaw/modes/goal/helpers.py:79-98 | src/qwenpaw/modes/goal/helpers.py:126-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×11
  • Duplicated block (16 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3008 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3008-3023 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3025-3040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4975 — plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4975-4990 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2755-2770 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4975` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:366 — plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:366-381 | plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:399-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py:366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) plugins/channel/qq/qwenpaw_channel_qq/management.py:81 — plugins/channel/qq/qwenpaw_channel_qq/management.py:81-96 | plugins/channel/wecom/qwenpaw_channel_wecom/management.py:44-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) src/qwenpaw/agents/skill_system/hub.py:1042 — src/qwenpaw/agents/skill_system/hub.py:1042-1057 | src/qwenpaw/agents/skill_system/hub.py:1085-1100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:420 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:420-435 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:420-435 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:826 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:826-841 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:857-872 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:826` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `label` to `str = "Playwright driver"` in one and `str = "sync Playwright driver"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) src/qwenpaw/app/channels/isolated_proxy.py:2157 — src/qwenpaw/app/channels/isolated_proxy.py:2157-2172 | src/qwenpaw/app/channels/isolated_proxy.py:2402-2417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/channels/isolated_proxy.py:2157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:991 — REDACTED:991-1006 | REDACTED:1025-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:991` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/qwenpaw/cli/channels_cmd.py:279 — src/qwenpaw/cli/channels_cmd.py:279-294 | src/qwenpaw/cli/channels_cmd.py:376-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/channels_cmd.py:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `current_config` to `FeishuConfig` in one and `QQConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) REDACTED:379 — REDACTED:379-394 | REDACTED:423-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:379` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×10
  • Edited copy of a member (11 corresponding lines) console/src-tauri/src/backend_download.rs:107 — console/src-tauri/src/backend_download.rs:107-117 | console/src-tauri/src/external_link.rs:138-148 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/qwenpaw/app/channels/access_control.py:171 — src/qwenpaw/app/channels/access_control.py:171-181 | src/qwenpaw/app/mail/mail_access_control.py:295-310 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) plugins/apps/qwenpaw-data/backend/bridge/engine_client.py:110 — plugins/apps/qwenpaw-data/backend/bridge/engine_client.py:110-123 | plugins/apps/qwenpaw-data/backend/bridge/engine_client.py:196-206 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/qwenpaw/app/workspace/workspace_plugins.py:128 — src/qwenpaw/app/workspace/workspace_plugins.py:128-138 | src/qwenpaw/runtime/prompt_manager.py:94-104 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:501 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:501-511 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:514-525 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/qwenpaw/agents/context/visual_compression/pipeline/messages.py:52 — src/qwenpaw/agents/context/visual_compression/pipeline/messages.py:52-62 | src/qwenpaw/agents/utils/media_token_estimate.py:86-99 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) console/src-tauri/src/notification_delivery.rs:264 — console/src-tauri/src/notification_delivery.rs:264-274 | console/src-tauri/src/notification_delivery.rs:276-290 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/minimax_errors.py:57 — plugins/apps/qwenpaw-creator/backend/models/minimax_errors.py:57-70 | plugins/apps/qwenpaw-creator/backend/services/project_files/candidate_normalization.py:71-81 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:530 — plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:530-541 | REDACTED:160-170 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3722 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3722-3735 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:5075-5085 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X3 · Exception handling · Swallowed exception (empty catch) · ×10
  • Swallowed exception (empty catch) src/qwenpaw/utils/io_utils.py:111 — 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) src/qwenpaw/utils/logging.py:127 — 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) src/qwenpaw/tool_calls/_timeout_helper.py:121 — 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) REDACTED:217 — 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) src/qwenpaw/runtime/builtin_commands.py:209 — 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) src/qwenpaw/runtime/builtin_commands.py:630 — 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) src/qwenpaw/runtime/commands/daemon.py:117 — 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) src/qwenpaw/providers/provider_manager.py:176 — 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) src/qwenpaw/portability/adaptation_loop.py:99 — 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) src/qwenpaw/portability/import_conversations.py:146 — 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.
AC1 · Text alternatives · <video> without a captions track · ×9
  • <video> without a captions track REDACTED:16 — 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 plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:358 — 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 plugins/apps/qwenpaw-creator/ui/src/components/agent/FileProjectReviewPanel.tsx:425 — 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 plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintRoughCutStrip.tsx:223 — 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 plugins/apps/qwenpaw-creator/ui/src/components/blueprint/EpisodeOverviewRail.tsx:199 — 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 plugins/apps/qwenpaw-creator/ui/src/pages/HomePage.tsx:730 — 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 plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:1336 — 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 plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:2065 — 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 website/src/components/FeatureDemoGallery.tsx:163 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC2 · Forms & labels · <Select> field component without a label · ×9
  • <Select> field component without a label console/src/components/ConfigFields.tsx:35 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label console/src/pages/Agent/ACP/index.tsx:779 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label console/src/pages/Agent/Checkpoints/index.tsx:412 — 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.
  • <Select> field component without a label console/src/pages/Agent/Checkpoints/index.tsx:422 — 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.
  • <Select> field component without a label console/src/pages/Agent/Checkpoints/index.tsx:545 — 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.
  • <Select> field component without a label console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1499 — 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.
  • <Select> field component without a label console/src/pages/Agent/MCP/components/MCPAccessRuleRows.tsx:255 — 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.
  • <Select> field component without a label console/src/pages/Agent/MCP/components/MCPAccessRuleRows.tsx:275 — 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.
  • <Select> field component without a label console/src/pages/Agent/MCP/components/MCPAccessRuleRows.tsx:302 — 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: ChannelDrawer.tsx ↔ registry.py console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1 — `console/src/pages/Control/Channels/components/ChannelDrawer.tsx` and `src/qwenpaw/app/channels/registry.py` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b113eea1` feat(plugin): support plugin-registered custom channels with schema-d…; `37964247` feat(channel): add WeChat iLink Bot channel (#2260) (at that commit the file was still `src/copaw/app/channels/registry.py`); `f8aef039` fest(channel): add WeCom channel (#1407) (at that commit the file was still `src/copaw/app/channels/registry.py`) — run `git show` on any of them.
  • Change coupling: constants.ts ↔ config.py console/src/pages/Control/Channels/components/constants.ts:1 — `console/src/pages/Control/Channels/components/constants.ts` and `src/qwenpaw/config/config.py` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `981fd049` fix(onebot): bind loopback by default and require token when exposed …; `37964247` feat(channel): add WeChat iLink Bot channel (#2260) (at that commit the file was still `src/copaw/config/config.py`); `f8aef039` fest(channel): add WeCom channel (#1407) (at that commit the file was still `src/copaw/config/config.py`) — run `git show` on any of them.
  • Change coupling: ChannelDrawer.tsx ↔ config.py console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1 — `console/src/pages/Control/Channels/components/ChannelDrawer.tsx` and `src/qwenpaw/config/config.py` change together 63% of the time (41 of the 65 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 41 shared commits counted here, the most recent 3 are `5132d259` feat(feishu): collapsible reasoning panel with opt-in auto-collapse (…; `7f825219` feat(dingtalk): support shared session context in group chats (#7208); `2f621f44` feat(matrix): isolate session and memory per sender in group rooms (#… — run `git show` on any of them.
  • Change coupling: index.tsx ↔ useSkills.ts console/src/pages/Agent/Skills/index.tsx:1 — `console/src/pages/Agent/Skills/index.tsx` and `console/src/pages/Agent/Skills/useSkills.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3baedbd0` feat(skill): improve overwrite behavior, keep conflict only during cr…; `b67e6377` feat(skills): add skill card and list view (#2794); `a64df0ba` Perf: optimize skill list and refresh (#2687) — run `git show` on any of them.
  • Change coupling: RemoteProviderCard.tsx ↔ ModelsSection.tsx console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx:1 — `console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx` and `console/src/pages/Settings/Models/components/sections/ModelsSection.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `6d3ce942` feat: Models Page Overhaul — Provider Aggregation, Unified Card UI & …; `ad297268` refactor(console): Model performance optimization (#4502); `6cf66786` feat(providers): Add lm studio as model provider (#1134) — run `git show` on any of them.
  • Change coupling: ollama_provider.py ↔ openrouter_provider.py src/qwenpaw/providers/ollama_provider.py:1 — `src/qwenpaw/providers/ollama_provider.py` and `src/qwenpaw/providers/openrouter_provider.py` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `abadf54d` fix(providers): honor declared thinking disable wire (#8436); `ba380411` fix: preserve tool call extra content across context lifecycle (#6759); `5fed639e` refactor(providers): rename preserve_thinking to relay_reasoning and … — run `git show` on any of them.
  • Change coupling: useSkills.ts ↔ useSkillPool.tsx console/src/pages/Agent/Skills/useSkills.ts:1 — `console/src/pages/Agent/Skills/useSkills.ts` and `console/src/pages/Settings/SkillPool/useSkillPool.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3baedbd0` feat(skill): improve overwrite behavior, keep conflict only during cr…; `b67e6377` feat(skills): add skill card and list view (#2794) (at that commit the file was still `console/src/pages/Agent/SkillPool/index.tsx`); `a64df0ba` Perf: optimize skill list and refresh (#2687) (at that commit the file was still `console/src/pages/Agent/SkillPool/index.tsx`) — run `git show` on any of them.
  • Change coupling: LocalModelManageModal.tsx ↔ llamacpp.py console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:1 — `console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx` and `src/qwenpaw/local_models/llamacpp.py` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e9892842` feat(local-models): install Piccolo runtimes and select model source …; `da6ce850` feat(models): run local Piccolo with bidirectional candidate scoring …; `6103d1ee` Feat(Local Model): Supports configuring server ports and monitoring s… — run `git show` on any of them.
  • Change coupling: LocalModelManageModal.tsx ↔ RemoteModelManageModal.tsx console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:1 — `console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx` and `console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `666cca53` feat(console): adapt Settings-Models page for mobile view (#5397); `0913d7b0` Feat(Provider): Optimize QwenPaw Local and OpenRouter Provider (#3604); `6a0d9bec` refactor(console): improve provider model management modal for capabi… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×9
  • Edited copy of a member (21 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:558 — plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:558-579 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:599-619 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:300 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:300-320 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:304-324 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/qwenpaw/agents/context/scroll/manager.py:1144 — src/qwenpaw/agents/context/scroll/manager.py:1144-1166 | src/qwenpaw/loop/gates/completion.py:122-142 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/qwenpaw/app/routers/workspace.py:393 — src/qwenpaw/app/routers/workspace.py:393-413 | src/qwenpaw/app/routers/workspace.py:452-474 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:522 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:522-542 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:802-827 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/qwenpaw/agents/tools/agent_management.py:354 — src/qwenpaw/agents/tools/agent_management.py:354-374 | src/qwenpaw/agents/tools/agent_management.py:383-406 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:167 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:167-187 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:185-208 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/qwenpaw/security/tool_guard/safety_checks.py:731 — src/qwenpaw/security/tool_guard/safety_checks.py:731-751 | src/qwenpaw/security/tool_guard/safety_checks.py:759-783 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:194 — src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:194-219 | src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:838-858 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×9
  • Edited copy of a member (15 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/config.py:132 — plugins/apps/qwenpaw-creator/backend/models/config.py:132-146 | plugins/apps/qwenpaw-creator/backend/models/config.py:154-170 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:2472 — plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:2472-2488 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:2738-2752 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:447 — plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:447-461 | plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:2053-2081 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:53 — REDACTED:53-67 | REDACTED:78-111 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/qwenpaw/agents/acp/service.py:459 — src/qwenpaw/agents/acp/service.py:459-474 | src/qwenpaw/agents/acp/service.py:478-492 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/qwenpaw/app/channels/access_control.py:226 — src/qwenpaw/app/channels/access_control.py:226-248 | src/qwenpaw/app/channels/access_control.py:399-413 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/qwenpaw/providers/gemini_provider.py:261 — src/qwenpaw/providers/gemini_provider.py:261-285 | src/qwenpaw/providers/gemini_provider.py:288-302 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:259 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:259-273 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:390-404 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/config.py:1301 — plugins/apps/qwenpaw-creator/backend/models/config.py:1301-1315 | plugins/apps/qwenpaw-creator/backend/models/config.py:1700-1725 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×9
  • Edited copy of a member (14 corresponding lines) src/qwenpaw/plugins/dependency_recovery.py:43 — src/qwenpaw/plugins/dependency_recovery.py:43-58 | src/qwenpaw/plugins/dependency_transaction.py:98-111 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/qwenpaw/app/channels/access_control.py:279 — src/qwenpaw/app/channels/access_control.py:279-292 | src/qwenpaw/app/channels/access_control.py:361-374 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:269 — packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:269-286 | REDACTED:1593-1606 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/qwenpaw/pawapp/context.py:502 — src/qwenpaw/pawapp/context.py:502-518 | src/qwenpaw/pawapp/context.py:540-553 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/qwenpaw/governance/detectors.py:678 — src/qwenpaw/governance/detectors.py:678-691 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:359-374 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:219 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:219-233 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:237-250 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:94 — REDACTED:94-107 | REDACTED:115-128 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) plugins/apps/qwenpaw-data/backend/context_gateway.py:86 — plugins/apps/qwenpaw-data/backend/context_gateway.py:86-99 | plugins/apps/qwenpaw-data/backend/engine_gateway.py:72-86 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) plugins/channel/sip/qwenpaw_channel_sip/runtime.py:95 — plugins/channel/sip/qwenpaw_channel_sip/runtime.py:95-108 | src/qwenpaw/plugins/install_lock.py:217-230 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×9
  • Edited copy of a member (12 corresponding lines) src/qwenpaw/agents/model_factory.py:789 — src/qwenpaw/agents/model_factory.py:789-800 | src/qwenpaw/agents/model_factory.py:804-815 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:265 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:265-276 | plugins/apps/qwenpaw-creator/backend/services/run_review/feedback.py:37-50 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/connection.py:116 — plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/connection.py:116-129 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:149-160 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/qwenpaw/providers/provider.py:799 — src/qwenpaw/providers/provider.py:799-810 | src/qwenpaw/security/skill_scanner/scan_policy.py:318-334 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/qwenpaw/app/routers/token_usage.py:54 — src/qwenpaw/app/routers/token_usage.py:54-65 | src/qwenpaw/app/routers/token_usage.py:95-106 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/qwenpaw/app/channels/access_control.py:314 — src/qwenpaw/app/channels/access_control.py:314-325 | src/qwenpaw/app/mail/mail_access_control.py:880-893 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) plugins/bundle/chrome/api/routes.py:76 — plugins/bundle/chrome/api/routes.py:76-87 | src/qwenpaw/browser/control_link/chrome/ws_handler.py:84-98 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:224 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:224-236 | plugins/channel/voice/qwenpaw_channel_voice/platform.py:356-367 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:489 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:489-500 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:506-525 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X1 · Async correctness · Task from `loop.create_task` is not kept · ×9
  • Task from `loop.create_task` is not kept src/qwenpaw/providers/provider_manager.py:438 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept src/qwenpaw/agents/acp/service.py:471 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept src/qwenpaw/agents/acp/service.py:490 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept src/qwenpaw/agents/acp/service.py:504 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:577 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:578 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:639 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept plugins/bundle/computer-use/computer_use/transport/unix_socket.py:286 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `loop.create_task` is not kept plugins/bundle/computer-use/computer_use/transport/unix_socket.py:291 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×8
  • Edited copy of a member (24 corresponding lines) src/qwenpaw/app/mail/mail_access_control.py:457 — src/qwenpaw/app/mail/mail_access_control.py:457-480 | src/qwenpaw/app/mail/mail_access_control.py:520-548 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/qwenpaw/providers/provider_manager_persistence.py:920 — src/qwenpaw/providers/provider_manager_persistence.py:920-951 | src/qwenpaw/providers/provider_persistence.py:55-78 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) plugins/apps/agent-kanban/backend/main.py:1029 — plugins/apps/agent-kanban/backend/main.py:1029-1057 | plugins/apps/agent-kanban/backend/main.py:1062-1085 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:652 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:652-675 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:683-710 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:818 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:818-841 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:849-872 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:713 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:713-739 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:769-792 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:696 — REDACTED:696-720 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:701-724 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:186 — REDACTED:186-218 | REDACTED:227-250 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×8
  • Edited copy of a member (17 corresponding lines) plugins/harness/qoder/event_mapper.py:249 — plugins/harness/qoder/event_mapper.py:249-265 | src/qwenpaw/portability/providers/qoder_sessions.py:550-566 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:235 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:235-255 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:225-241 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) console/src-tauri/src/computer_use_server/app_identity.rs:79 — console/src-tauri/src/computer_use_server/app_identity.rs:79-95 | console/src-tauri/src/computer_use_server/app_identity.rs:98-127 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) console/src-tauri/src/computer_use_server/platform_windows/input.rs:416 — console/src-tauri/src/computer_use_server/platform_windows/input.rs:416-432 | console/src-tauri/src/computer_use_server/platform_windows/input.rs:434-450 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/qwenpaw/governance/detectors.py:137 — src/qwenpaw/governance/detectors.py:137-153 | src/qwenpaw/security/tool_guard/guardians/file_guardian.py:132-154 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/qwenpaw/governance/generalize.py:91 — src/qwenpaw/governance/generalize.py:91-114 | src/qwenpaw/governance/policy.py:132-148 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/qwenpaw/app/routers/mail_access_control.py:407 — src/qwenpaw/app/routers/mail_access_control.py:407-423 | src/qwenpaw/app/routers/mail_access_control.py:490-506 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) scripts/pack-tauri/stage_node_runtime.py:33 — scripts/pack-tauri/stage_node_runtime.py:33-49 | scripts/pack-tauri/stage_python_runtime.py:44-60 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×8
  • Edited copy of a member (5 corresponding lines) plugins/channel/discord/qwenpaw_channel_discord/platform.py:385 — plugins/channel/discord/qwenpaw_channel_discord/platform.py:385-389 | plugins/channel/slack/qwenpaw_channel_slack/platform.py:406-413 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:81 — plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:81-85 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:812-821 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:1214 — plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:1214-1220 | plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:337-341 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/qwenpaw/cli/app_cmd.py:25 — src/qwenpaw/cli/app_cmd.py:25-29 | src/qwenpaw/cli/process_utils.py:205-209 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:81 — plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:81-86 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:99-103 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/qwenpaw/browser/control_link/cdp/adapter.py:658 — src/qwenpaw/browser/control_link/cdp/adapter.py:658-663 | src/qwenpaw/browser/control_link/playwright/adapter.py:629-633 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) plugins/bundle/omp_workflows/ralph/gate.py:151 — plugins/bundle/omp_workflows/ralph/gate.py:151-155 | src/qwenpaw/modes/mission/state.py:259-263 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/qwenpaw/providers/model_capability_cache.py:71 — src/qwenpaw/providers/model_capability_cache.py:71-75 | src/qwenpaw/token_usage/manager.py:415-420 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×8
  • Duplicated block (23 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3068 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3068-3090 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4843-4865 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3068` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4841` calls `str`, `get` and `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3067` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (23 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3787 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3787-3809 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4266-4290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:73 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:73-95 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:89-111 — before extracting anything, compare `plugins/bundle/computer-use/computer_use/transport/unix_socket.py` and `plugins/bundle/computer-use/computer_use/transport/windows_pipe.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) plugins/memory/openviking/backend/manager.py:75 — plugins/memory/openviking/backend/manager.py:75-97 | plugins/memory/powercontext/backend/manager.py:70-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:65 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:65-87 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:65-87 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) src/qwenpaw/drivers/handlers/mcp_stateful_client.py:928 — src/qwenpaw/drivers/handlers/mcp_stateful_client.py:928-950 | src/qwenpaw/drivers/handlers/mcp_stateful_client.py:1031-1053 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) src/qwenpaw/market/providers/modelscope.py:115 — src/qwenpaw/market/providers/modelscope.py:115-137 | src/qwenpaw/market/providers/qwenpaw.py:109-131 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) src/qwenpaw/plugins/dependency_upgrade.py:536 — src/qwenpaw/plugins/dependency_upgrade.py:536-558 | src/qwenpaw/plugins/dependency_upgrade.py:864-886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×8
  • Low cohesion: ChatPage (LCOM4 16) e2e/pages/chat_page.py:22 — ChatPage's methods fall into 16 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 16 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: _ModelCodeValidator (LCOM4 11) REDACTED:602 — _ModelCodeValidator's methods fall into 11 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 11 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: PluginContext (LCOM4 7) src/qwenpaw/plugins/sdk.py:75 — PluginContext's methods fall into 7 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 7 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: QwenPawAgent (LCOM4 5) src/qwenpaw/agents/react_agent.py:235 — QwenPawAgent's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SafeJSONSession (LCOM4 5) src/qwenpaw/app/chats/session.py:205 — SafeJSONSession's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OpenAIChatModelCompat (LCOM4 5) src/qwenpaw/providers/openai_chat_model_compat.py:713 — OpenAIChatModelCompat's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PluginRegistry (LCOM4 4) src/qwenpaw/plugins/registry.py:142 — PluginRegistry'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: CappingFormatterMixin (LCOM4 4) src/qwenpaw/providers/capping_formatter.py:243 — CappingFormatterMixin'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.
D2 · Cognitive Complexity · ModelConfigModal.ModelConfigModal · ×7
  • ModelConfigModal.ModelConfigModal::handleProtocolChange (cognitive 36) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2086 — ModelConfigModal.ModelConfigModal::handleProtocolChange has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), error handling 1 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::renderFields (cognitive 35) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2163 — ModelConfigModal.ModelConfigModal::renderFields has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 10 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::protocolsFor (cognitive 33) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1955 — ModelConfigModal.ModelConfigModal::protocolsFor has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 7 (28 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::getModelOptions, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::renderCard (cognitive 32) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3142 — ModelConfigModal.ModelConfigModal::renderCard has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 13 (16 pts), boolean chains 15, if/else 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. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::getPresetForType (cognitive 27) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1984 — ModelConfigModal.ModelConfigModal::getPresetForType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 2 (5 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. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getModelOptions, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::getModelOptions (cognitive 23) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2037 — ModelConfigModal.ModelConfigModal::getModelOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (6 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • ModelConfigModal.ModelConfigModal::renderGroundingCard (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2526 — ModelConfigModal.ModelConfigModal::renderGroundingCard has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 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. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×7
  • Edited copy of a member (19 corresponding lines) src/qwenpaw/cli/skills_cmd.py:457 — src/qwenpaw/cli/skills_cmd.py:457-482 | src/qwenpaw/cli/skills_cmd.py:738-788 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/qwenpaw/agents/middlewares.py:676 — src/qwenpaw/agents/middlewares.py:676-701 | src/qwenpaw/agents/middlewares.py:710-728 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:654 — console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:654-672 | console/src-tauri/src/computer_use_server/platform_windows/uia.rs:551-576 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/qwenpaw/app/routers/portability_imports.py:167 — src/qwenpaw/app/routers/portability_imports.py:167-185 | src/qwenpaw/app/routers/portability_imports.py:194-212 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:738 — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:738-756 | plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:456-474 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) plugins/harness/_shared/io_helpers.py:8 — plugins/harness/_shared/io_helpers.py:8-26 | src/qwenpaw/utils/io_utils.py:96-114 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1787 — src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1787-1809 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:2683-2701 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
  • Members sharing a duplicated core (4 members, 50+ identical tokens) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2989 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2989-3143 | plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3434-3532 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4569-4705 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4768-4934 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:465 — REDACTED:465-478 | src/qwenpaw/app/channels/base.py:2243-2288 | src/qwenpaw/app/channels/console/channel.py:743-757 | src/qwenpaw/app/channels/renderer.py:533-559 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:35 — src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:35-203 | src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:517-565 | src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py:35-203 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:517-565 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3128 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3128-3178 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3186-3242 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3966-4040 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4314-4375 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/qwenpaw/providers/anthropic_provider.py:570 — src/qwenpaw/providers/anthropic_provider.py:570-646 | src/qwenpaw/providers/gemini_provider.py:456-515 | src/qwenpaw/providers/gemini_provider.py:522-600 | src/qwenpaw/providers/openai_provider.py:667-764 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) scripts/cleanup_windows_sandbox.py:136 — scripts/cleanup_windows_sandbox.py:136-257 | scripts/cleanup_windows_sandbox.py:297-446 | REDACTED:1077-1242 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1180-1319 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/qwenpaw/sandbox/bubblewrap_sandbox.py:191 — src/qwenpaw/sandbox/bubblewrap_sandbox.py:191-269 | REDACTED:703-810 | src/qwenpaw/sandbox/local_sandbox.py:191-273 | src/qwenpaw/sandbox/macos_sandbox.py:275-353 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×7
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/app/routers/skills.py:712 — src/qwenpaw/app/routers/skills.py:712-734 | src/qwenpaw/app/routers/skills.py:775-797 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/app/routers/skills.py:1311 — src/qwenpaw/app/routers/skills.py:1311-1338 | src/qwenpaw/app/routers/skills.py:2325-2347 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/governance/detectors.py:652 — src/qwenpaw/governance/detectors.py:652-674 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:275-307 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/governance/detectors.py:761 — src/qwenpaw/governance/detectors.py:761-783 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:417-453 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/agents/utils/message_request_normalizer.py:291 — src/qwenpaw/agents/utils/message_request_normalizer.py:291-313 | src/qwenpaw/agents/utils/message_request_normalizer.py:317-346 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/channel_protocol/models.py:1488 — src/qwenpaw/channel_protocol/models.py:1488-1518 | src/qwenpaw/channel_protocol/models.py:1539-1561 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src/qwenpaw/governance/tool_adapter.py:125 — src/qwenpaw/governance/tool_adapter.py:125-147 | src/qwenpaw/runtime/tool_guard.py:38-61 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:422 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:422-437 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py:91-110 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:360 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:360-375 | plugins/apps/qwenpaw-creator/backend/services/project_files/script_import.py:444-476 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/qwenpaw/governance/detectors.py:633 — src/qwenpaw/governance/detectors.py:633-648 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:247-269 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/qwenpaw/checkpoints/safe_workspace_fs.py:298 — src/qwenpaw/checkpoints/safe_workspace_fs.py:298-316 | src/qwenpaw/checkpoints/safe_workspace_fs.py:324-339 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:236 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:236-253 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:253-268 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) plugins/bundle/omp_workflows/autopilot/gate.py:197 — plugins/bundle/omp_workflows/autopilot/gate.py:197-212 | plugins/bundle/omp_workflows/team/gate.py:182-197 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:626 — REDACTED:626-641 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:645-667 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×7
  • Edited copy of a member (4 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:707 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:707-710 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:2448-2451 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) console/src-tauri/src/notification_delivery.rs:103 — console/src-tauri/src/notification_delivery.rs:103-106 | console/src-tauri/src/notification_delivery/windows.rs:146-149 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:91 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:91-94 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:91-94 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:315 — plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:315-318 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/field_blocks.py:61-64 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/qwenpaw/browser/control_link/cdp/adapter.py:163 — src/qwenpaw/browser/control_link/cdp/adapter.py:163-166 | src/qwenpaw/browser/control_link/chrome/adapter.py:117-120 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/qwenpaw/plugins/_testing_http.py:151 — src/qwenpaw/plugins/_testing_http.py:151-154 | src/qwenpaw/plugins/apps.py:328-331 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/qwenpaw/agents/tools/agent_management.py:63 — src/qwenpaw/agents/tools/agent_management.py:63-66 | src/qwenpaw/cli/http.py:17-22 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×7
  • Duplicated block (19 lines × 2) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:78 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:78-96 | plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:81-99 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:649 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:649-667 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:671-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:649` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) REDACTED:1615 — REDACTED:1615-1633 | REDACTED:1667-1686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) src/qwenpaw/agents/model_factory.py:276 — src/qwenpaw/agents/model_factory.py:276-294 | src/qwenpaw/agents/model_factory.py:599-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) src/qwenpaw/agents/skill_system/hub.py:1728 — src/qwenpaw/agents/skill_system/hub.py:1728-1746 | src/qwenpaw/agents/skill_system/hub.py:1782-1800 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) REDACTED:646 — REDACTED:646-664 | REDACTED:732-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:646` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:752` calls `cleanup_preparation_source` and `REDACTED:665` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) scripts/cleanup_windows_sandbox.py:483 — scripts/cleanup_windows_sandbox.py:483-501 | REDACTED:2574-2595 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
X12 · Unreachable branch · Statement is unreachable · ×7
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/input.rs:471 — `if foreground_matches(hwnd) { return Ok(()); }` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 465) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/uia.rs:526 — `let element = observation.elements.get(element_id).ok_or(( "element_not_found…` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 520) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/wgc.rs:82 — `if unsafe { IsIconic(hwnd).as_bool() }` follows `{ return Err(format !("invalid hwnd: {}", args.hwnd)); }` (line 79) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/window.rs:178 — `let mut title = [ 0_u16; 512 ];` follows `{ return None; }` (line 175) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/window.rs:248 — `unsafe { PostMessageW(Some(hwnd), WM_CLOSE, WPARAM(0), LPARAM(0)) }.map_err(|…` follows `{ return Err(( "window_not_found", "Target window no longer exists.".to_strin…` (line 242) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_windows/window.rs:254 — `thread::sleep(Duration::from_millis(CLOSE_POLL_INTERVAL_MS));` follows `{ return Ok(json !({ "closed" : true })); }` (line 251) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it console/src-tauri/src/computer_use_server/platform_macos/capture.rs:238 — `let filter = unsafe { SCContentFilter::initWithDesktopIndependentWindow(SCCon…` follows `{ let _ = sender.send(Err("The selected window is not on the active desktop."…` (line 231) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×6
  • Modal dialog does not manage focus console/src/os/Launcher.tsx:65 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus console/src/os/MissionControl.tsx:95 — 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 console/src/os/WallpaperPicker.tsx:24 — 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 console/src/pages/Chat/ModelSelector/ModelPickerPopover.tsx:62 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus console/src/pages/Coding/TabbedEditor.tsx:1158 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus console/src/pages/Market/Community/ImageLightbox.tsx:38 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×6
  • Edited copy of a member (26 corresponding lines) src/qwenpaw/app/routers/community.py:518 — src/qwenpaw/app/routers/community.py:518-553 | src/qwenpaw/app/routers/community.py:734-759 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) src/qwenpaw/checkpoints/safe_workspace_fs.py:363 — src/qwenpaw/checkpoints/safe_workspace_fs.py:363-392 | src/qwenpaw/checkpoints/safe_workspace_fs.py:402-427 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) src/qwenpaw/app/_app.py:873 — src/qwenpaw/app/_app.py:873-901 | src/qwenpaw/utils/console_static.py:14-39 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:424 — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:424-449 | plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:278-304 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) src/qwenpaw/runtime/commands/control/approval_handler.py:445 — src/qwenpaw/runtime/commands/control/approval_handler.py:445-470 | src/qwenpaw/runtime/commands/control/approval_handler.py:487-513 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) scripts/pack/generate_plugin_metadata.py:93 — scripts/pack/generate_plugin_metadata.py:93-118 | scripts/pack/generate_plugin_metadata.py:133-162 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×6
  • Edited copy of a member (32 corresponding lines) src/qwenpaw/providers/gemini_provider.py:391 — src/qwenpaw/providers/gemini_provider.py:391-422 | src/qwenpaw/providers/ollama_provider.py:85-117 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) src/qwenpaw/governance/detectors.py:563 — src/qwenpaw/governance/detectors.py:563-594 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:119-158 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) src/qwenpaw/agents/fork_project.py:1234 — src/qwenpaw/agents/fork_project.py:1234-1283 | src/qwenpaw/agents/fork_project.py:1295-1326 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/video_model.py:288 — plugins/apps/qwenpaw-creator/backend/models/video_model.py:288-328 | plugins/apps/qwenpaw-creator/backend/models/video_model.py:339-370 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) src/qwenpaw/app/routers/auth.py:246 — src/qwenpaw/app/routers/auth.py:246-289 | src/qwenpaw/app/routers/auth.py:294-325 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) src/qwenpaw/security/secret_store.py:170 — src/qwenpaw/security/secret_store.py:170-207 | src/qwenpaw/security/secret_store.py:211-242 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×6
  • Edited copy of a member (18 corresponding lines) src/qwenpaw/agent_stats/service.py:115 — src/qwenpaw/agent_stats/service.py:115-132 | src/qwenpaw/agent_stats/service.py:136-155 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/qwenpaw/app/routers/skills.py:1414 — src/qwenpaw/app/routers/skills.py:1414-1437 | src/qwenpaw/app/routers/skills.py:1512-1529 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:1073 — console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:1073-1090 | console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs:1092-1112 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/qwenpaw/governance/detectors.py:161 — src/qwenpaw/governance/detectors.py:161-178 | src/qwenpaw/security/tool_guard/guardians/file_guardian.py:379-404 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/qwenpaw/providers/provider_manager_persistence.py:671 — src/qwenpaw/providers/provider_manager_persistence.py:671-689 | src/qwenpaw/providers/provider_manager_persistence.py:696-713 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/qwenpaw/app/chats/manager.py:412 — src/qwenpaw/app/chats/manager.py:412-429 | src/qwenpaw/app/chats/manager.py:642-659 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×6
  • Edited copy of a member (8 corresponding lines) src/qwenpaw/cli/doctor_connectivity.py:76 — src/qwenpaw/cli/doctor_connectivity.py:76-83 | src/qwenpaw/cli/doctor_connectivity.py:91-98 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/qwenpaw/providers/openai_provider.py:268 — src/qwenpaw/providers/openai_provider.py:268-275 | src/qwenpaw/providers/openrouter_provider.py:266-285 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:34 — plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:34-41 | plugins/apps/qwenpaw-creator/backend/services/project_files/review_bookkeeping.py:47-54 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/qwenpaw/app/agent_config_watcher.py:39 — src/qwenpaw/app/agent_config_watcher.py:39-48 | src/qwenpaw/config/config.py:161-168 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/qwenpaw/agents/tools/agent_management.py:194 — src/qwenpaw/agents/tools/agent_management.py:194-201 | src/qwenpaw/app/routers/console.py:1000-1007 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:118 — plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:118-126 | plugins/channel/sip/qwenpaw_channel_sip/driver.py:61-68 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×6
  • Duplicated block (22 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2536 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2536-2557 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4041-4062 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2536` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (22 lines × 2) plugins/tool/wan27/wan27_tool.py:615 — plugins/tool/wan27/wan27_tool.py:615-636 | plugins/tool/wan27/wan27_tool.py:908-929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:473 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:473-494 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:473-494 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py:16 — src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py:16-37 | src/qwenpaw/agents/skills/make-skill-zh/scripts/init_draft.py:16-37 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/init_draft.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) src/qwenpaw/app/chats/utils.py:435 — src/qwenpaw/app/chats/utils.py:435-456 | src/qwenpaw/app/chats/utils.py:506-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/chats/utils.py:435` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) src/qwenpaw/portability/providers/codex.py:679 — src/qwenpaw/portability/providers/codex.py:679-700 | src/qwenpaw/portability/providers/qoder.py:193-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8212 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8212-8232 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8501-8521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:602 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:602-622 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:474-494 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `job` to `SourceObservationJob` in one and `SourceVideoReadJob` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1875 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1875-1895 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/manual_edit_store.py:419-439 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:127 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:127-147 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:127-147 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) src/qwenpaw/cli/channels_cmd.py:144 — src/qwenpaw/cli/channels_cmd.py:144-164 | src/qwenpaw/cli/channels_cmd.py:414-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/channels_cmd.py:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `current_config` to `DiscordConfig` in one and `TelegramConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21 lines × 2) REDACTED:1009 — REDACTED:1009-1029 | REDACTED:1189-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:1030` calls `warning` and `REDACTED:1210` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×6
  • Duplicated block (11–12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:494 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:494-504 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:558-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–12 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:825 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:825-835 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:925-936 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) src/qwenpaw/cli/doctor_fix_runner.py:403 — src/qwenpaw/cli/doctor_fix_runner.py:403-414 | src/qwenpaw/cli/doctor_fix_runner.py:442-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/cli/doctor_fix_runner.py:415` calls `exists` and `src/qwenpaw/cli/doctor_fix_runner.py:453` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) src/qwenpaw/drivers/credentials/store.py:132 — src/qwenpaw/drivers/credentials/store.py:132-143 | src/qwenpaw/drivers/credentials/store.py:154-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) src/qwenpaw/governance/detectors.py:711 — src/qwenpaw/governance/detectors.py:711-721 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:334-345 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/governance/detectors.py:711` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–12 lines × 2) src/qwenpaw/providers/retry_chat_model.py:882 — src/qwenpaw/providers/retry_chat_model.py:882-892 | src/qwenpaw/providers/retry_chat_model.py:960-971 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · ModelConfigModal.ModelConfigModal · ×5
  • ModelConfigModal.ModelConfigModal::renderCard (cyclomatic 44) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3142 — ModelConfigModal.ModelConfigModal::renderCard has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::handleProtocolChange, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ModelConfigModal.ModelConfigModal::renderGroundingCard (cyclomatic 36) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2526 — ModelConfigModal.ModelConfigModal::renderGroundingCard has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::handleProtocolChange, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ModelConfigModal.ModelConfigModal::renderFields (cyclomatic 25) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2163 — ModelConfigModal.ModelConfigModal::renderFields has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::handleProtocolChange, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ModelConfigModal.ModelConfigModal::getPresetForType (cyclomatic 21) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1984 — ModelConfigModal.ModelConfigModal::getPresetForType has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::handleProtocolChange, ModelConfigModal.ModelConfigModal::renderFields, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ModelConfigModal.ModelConfigModal::handleProtocolChange (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2086 — ModelConfigModal.ModelConfigModal::handleProtocolChange has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::renderFields, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×5
  • Edited copy of a member (37 corresponding lines) plugins/memory/openviking/backend/manager.py:61 — plugins/memory/openviking/backend/manager.py:61-97 | plugins/memory/powercontext/backend/manager.py:49-92 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:781 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:781-817 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:666-705 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3634 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3634-3670 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3949-3992 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) src/qwenpaw/app/approvals/service.py:575 — src/qwenpaw/app/approvals/service.py:575-611 | src/qwenpaw/app/approvals/service.py:640-677 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) src/qwenpaw/app/chats/session.py:316 — src/qwenpaw/app/chats/session.py:316-352 | src/qwenpaw/app/chats/session.py:421-473 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×5
  • Edited copy of a member (29 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:946 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:946-975 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1113-1141 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py:87 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py:87-115 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py:121-153 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) console/src-tauri/src/computer_use_server/platform_macos/input.rs:236 — console/src-tauri/src/computer_use_server/platform_macos/input.rs:236-264 | console/src-tauri/src/computer_use_server/platform_windows/input.rs:108-137 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) src/qwenpaw/app/app_services/_builtin_tool_commands.py:64 — src/qwenpaw/app/app_services/_builtin_tool_commands.py:64-92 | src/qwenpaw/app/app_services/_builtin_tool_commands.py:100-128 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3565 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3565-3593 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3599-3628 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×5
  • Edited copy of a member (22 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:546 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:546-567 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:946-976 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/qwenpaw/plugins/loader.py:4845 — src/qwenpaw/plugins/loader.py:4845-4869 | src/qwenpaw/plugins/loader.py:4915-4936 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/qwenpaw/browser/control_link/cdp/adapter.py:246 — src/qwenpaw/browser/control_link/cdp/adapter.py:246-267 | src/qwenpaw/browser/control_link/chrome/adapter.py:307-331 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/qwenpaw/runtime/prompt_manager.py:114 — src/qwenpaw/runtime/prompt_manager.py:114-135 | src/qwenpaw/runtime/prompt_manager.py:138-161 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/qwenpaw/app/channels/command_registry.py:285 — src/qwenpaw/app/channels/command_registry.py:285-306 | src/qwenpaw/runtime/commands/control/__init__.py:133-162 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×5
  • Edited copy of a member (13 corresponding lines) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:104 — plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:104-118 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:85-97 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/qwenpaw/app/driver_config_service.py:169 — src/qwenpaw/app/driver_config_service.py:169-188 | src/qwenpaw/app/driver_config_service.py:218-230 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/qwenpaw/app/routers/workspace.py:172 — src/qwenpaw/app/routers/workspace.py:172-184 | src/qwenpaw/app/routers/workspace.py:1178-1194 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/qwenpaw/agents/skill_system/hub.py:1248 — src/qwenpaw/agents/skill_system/hub.py:1248-1261 | src/qwenpaw/agents/skill_system/hub.py:1270-1282 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:224 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:224-236 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/notification_store.py:117-133 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×5
  • Edited copy of a member (6 corresponding lines) src/qwenpaw/app/channels/access_control.py:416 — src/qwenpaw/app/channels/access_control.py:416-421 | src/qwenpaw/app/mail/mail_access_control.py:632-638 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) plugins/bundle/omp_workflows/shared/mode_base.py:122 — plugins/bundle/omp_workflows/shared/mode_base.py:122-128 | src/qwenpaw/modes/custom_loop/mode.py:29-34 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) plugins/channel/onebot/qwenpaw_channel_onebot/codec.py:18 — plugins/channel/onebot/qwenpaw_channel_onebot/codec.py:18-23 | plugins/channel/sip/qwenpaw_channel_sip/runtime.py:31-37 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/qwenpaw/local_models/llamacpp.py:945 — src/qwenpaw/local_models/llamacpp.py:945-950 | src/qwenpaw/local_models/model_manager.py:759-765 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) scripts/pack/generate_oss_metadata.py:32 — scripts/pack/generate_oss_metadata.py:32-37 | scripts/pack/generate_plugin_metadata.py:210-215 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×5
  • Edited copy of a member (3 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:107 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:107-111 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:109-111 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/qwenpaw/runtime/builder.py:994 — src/qwenpaw/runtime/builder.py:994-996 | src/qwenpaw/runtime/prompt_contributors.py:453-456 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/qwenpaw/app/routers/mcp_oauth.py:110 — src/qwenpaw/app/routers/mcp_oauth.py:110-112 | src/qwenpaw/providers/oauth/base.py:105-107 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:194 — plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:194-196 | plugins/channel/mqtt/qwenpaw_channel_mqtt/platform.py:75-77 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/qwenpaw/app/channels/access_control.py:266 — src/qwenpaw/app/channels/access_control.py:266-268 | src/qwenpaw/app/mail/mail_access_control.py:434-436 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×5
  • Duplicated block (32 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:635 — plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:635-666 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:44-75 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py` and `plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (32 lines × 2) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:525 — plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:525-556 | plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:586-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:498 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:498-529 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:498-529 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 2) src/qwenpaw/hub/control_app.py:1270 — src/qwenpaw/hub/control_app.py:1270-1301 | src/qwenpaw/hub/control_app.py:1303-1334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (32 lines × 2) src/qwenpaw/runtime/commands/control/approval_handler.py:161 — src/qwenpaw/runtime/commands/control/approval_handler.py:161-192 | src/qwenpaw/runtime/commands/control/approval_handler.py:234-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/runtime/commands/control/approval_handler.py:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×5
  • Duplicated block (24 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:786 — plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:786-809 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:206-229 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py` and `plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:786` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3570 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3570-3593 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3920-3943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1533 — plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1533-1561 | plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:1327-1350 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (24 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/native_cli.py:11 — src/qwenpaw/agents/skills/make-skill-en/scripts/native_cli.py:11-34 | src/qwenpaw/agents/skills/make-skill-zh/scripts/native_cli.py:11-34 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/native_cli.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/native_cli.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (24 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2637 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2637-2660 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2664-2687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×5
  • Duplicated block (18 lines × 2) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:178 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:178-195 | plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:205-222 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1881 — plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1881-1898 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1936-1953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `raw` to `Mapping[str, Any]` in one and `Mapping[str, Any] | None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2440 — plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2440-2457 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2472-2489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2440` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) src/qwenpaw/providers/retry_chat_model.py:733 — src/qwenpaw/providers/retry_chat_model.py:733-750 | src/qwenpaw/providers/retry_chat_model.py:823-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/providers/retry_chat_model.py:733` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) scripts/startup_profile/tracer.py:53 — scripts/startup_profile/tracer.py:53-70 | scripts/startup_profile/tracer.py:89-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/startup_profile/tracer.py:88` calls `get` and `scripts/startup_profile/tracer.py:50` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×5
  • Duplicated block (12–13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:522 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:522-533 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:548-560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12–13 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:556 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:556-567 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:812-824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:812` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:119 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:119-130 | plugins/channel/voice/qwenpaw_channel_voice/platform.py:244-256 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/voice/qwenpaw_channel_voice/platform.py:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12–13 lines × 2) src/qwenpaw/agents/middlewares.py:689 — src/qwenpaw/agents/middlewares.py:689-701 | src/qwenpaw/agents/middlewares.py:717-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12–13 lines × 2) src/qwenpaw/governance/detectors.py:680 — src/qwenpaw/governance/detectors.py:680-691 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:362-374 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC4 · Keyboard semantics · Anchor without href · ×4
  • Anchor without href REDACTED:482 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href REDACTED:529 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href REDACTED:598 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href plugins/bundle/cloudpaw/ui/src/index.ts:1783 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×4
  • Edited copy of a member (28 corresponding lines) src/qwenpaw/agents/context/scroll/memoryspace.py:1446 — src/qwenpaw/agents/context/scroll/memoryspace.py:1446-1490 | src/qwenpaw/agents/context/scroll/memoryspace.py:1501-1532 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) src/qwenpaw/drivers/adapters/mcp_binding.py:235 — src/qwenpaw/drivers/adapters/mcp_binding.py:235-268 | src/qwenpaw/drivers/adapters/mcp_binding.py:277-304 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:103 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:103-130 | plugins/channel/voice/qwenpaw_channel_voice/platform.py:227-256 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3600 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3600-3627 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5209-5237 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×4
  • Edited copy of a member (47 corresponding lines) src/qwenpaw/agents/skill_system/hub.py:1700 — src/qwenpaw/agents/skill_system/hub.py:1700-1746 | src/qwenpaw/agents/skill_system/hub.py:1753-1800 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1551 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1551-1610 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1696-1742 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) src/qwenpaw/agents/model_factory.py:254 — src/qwenpaw/agents/model_factory.py:254-300 | src/qwenpaw/agents/model_factory.py:571-623 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) src/qwenpaw/agents/tools/file_io.py:303 — src/qwenpaw/agents/tools/file_io.py:303-356 | src/qwenpaw/agents/tools/file_io.py:515-561 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×4
  • Edited copy of a member (35 corresponding lines) src/qwenpaw/market/providers/modelscope.py:100 — src/qwenpaw/market/providers/modelscope.py:100-137 | src/qwenpaw/market/providers/qwenpaw.py:97-131 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1461 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1461-1495 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1509-1559 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/s2v_model.py:167 — plugins/apps/qwenpaw-creator/backend/models/s2v_model.py:167-219 | plugins/apps/qwenpaw-creator/backend/models/tts_model.py:118-152 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) src/qwenpaw/governance/detectors.py:695 — src/qwenpaw/governance/detectors.py:695-729 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:311-355 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×4
  • Edited copy of a member (30 corresponding lines) src/qwenpaw/app/routers/skills.py:1349 — src/qwenpaw/app/routers/skills.py:1349-1384 | src/qwenpaw/app/routers/skills.py:1446-1475 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) REDACTED:254 — REDACTED:254-287 | REDACTED:354-383 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:205 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:205-234 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:208-243 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/object_grounding.py:197 — plugins/apps/qwenpaw-creator/backend/services/object_grounding.py:197-228 | plugins/apps/qwenpaw-creator/backend/services/object_grounding.py:348-377 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×4
  • Edited copy of a member (31 corresponding lines) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:606 — plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:606-636 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:640-670 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3636 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3636-3667 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:5031-5061 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:569 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:569-599 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:439-471 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:470 — plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:470-500 | plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:708-739 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×4
  • Edited copy of a member (25 corresponding lines) src/qwenpaw/governance/detectors.py:733 — src/qwenpaw/governance/detectors.py:733-757 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:378-413 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) src/qwenpaw/channel_protocol/models.py:844 — src/qwenpaw/channel_protocol/models.py:844-868 | src/qwenpaw/channel_protocol/models.py:893-925 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2530 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2530-2554 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:638-663 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) plugins/bundle/qwenpaw-pet/router.py:69 — plugins/bundle/qwenpaw-pet/router.py:69-93 | plugins/bundle/qwenpaw-pet/router.py:158-182 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 7+ corresponding lines) plugins/apps/qwenpaw-creator/backend/models/config.py:672 — plugins/apps/qwenpaw-creator/backend/models/config.py:672-678 | plugins/apps/qwenpaw-creator/backend/models/config.py:745-753 | plugins/apps/qwenpaw-creator/backend/models/config.py:1226-1238 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/qwenpaw/app/routers/git.py:393 — src/qwenpaw/app/routers/git.py:393-403 | src/qwenpaw/app/routers/git.py:449-455 | src/qwenpaw/app/routers/git.py:460-472 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/qwenpaw/channel_protocol/models.py:161 — src/qwenpaw/channel_protocol/models.py:161-174 | src/qwenpaw/channel_protocol/models.py:713-720 | src/qwenpaw/plugins/execution/models.py:351-357 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) console/src-tauri/src/backend/runtime.rs:179 — console/src-tauri/src/backend/runtime.rs:179-185 | console/src-tauri/src/updates/coordination.rs:104-110 | console/src-tauri/src/updates/coordination.rs:112-119 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×4
  • Duplicated block (27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:491 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:491-517 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:361-387 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2466 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2466-2492 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2298-2324 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:123 — plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:123-149 | plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:490-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (27 lines × 2) src/qwenpaw/agents/tools/agent_management.py:710 — src/qwenpaw/agents/tools/agent_management.py:710-736 | src/qwenpaw/agents/tools/agent_management.py:823-849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3053 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3053-3077 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4639-4663 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3053` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (25 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3964 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3964-3989 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4266-4290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) src/qwenpaw/agents/skill_system/hub.py:1700 — src/qwenpaw/agents/skill_system/hub.py:1700-1724 | src/qwenpaw/agents/skill_system/hub.py:1754-1778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) src/qwenpaw/app/routers/approval.py:101 — src/qwenpaw/app/routers/approval.py:101-125 | src/qwenpaw/app/routers/approval.py:191-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/routers/approval.py:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×4
  • Duplicated block (13–14 lines × 2) REDACTED:670 — REDACTED:670-682 | REDACTED:1044-1057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) src/qwenpaw/app/channels/base.py:900 — src/qwenpaw/app/channels/base.py:900-913 | src/qwenpaw/app/channels/base.py:1557-1569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) src/qwenpaw/app/chats/api.py:213 — src/qwenpaw/app/chats/api.py:213-225 | src/qwenpaw/app/chats/api.py:244-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) src/qwenpaw/cli/doctor_cmd.py:599 — src/qwenpaw/cli/doctor_cmd.py:599-612 | src/qwenpaw/cli/doctor_cmd.py:634-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark console/index.html: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 plugins/apps/qwenpaw-data/ui/public/data-console/index.html: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 plugins/bundle/chrome/assets/extensions/chrome/popup/popup.html:2 — 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 · qwenpaw_desktop · ×3
  • qwenpaw_desktop::computer_use_server::dispatch::dispatch_request (cyclomatic 42) console/src-tauri/src/computer_use_server/dispatch.rs:128 — qwenpaw_desktop::computer_use_server::dispatch::dispatch_request has cyclomatic complexity 42 (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.
  • qwenpaw_desktop::backend::runtime::connect (cyclomatic 20) console/src-tauri/src/backend/runtime.rs:187 — qwenpaw_desktop::backend::runtime::connect 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.
  • qwenpaw_desktop::notifications::poll_console (cyclomatic 17) console/src-tauri/src/notifications.rs:483 — qwenpaw_desktop::notifications::poll_console 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×3
  • Edited copy of a member (36 corresponding lines) plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:168 — plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:168-212 | plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax_sglang.py:123-170 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) src/qwenpaw/providers/provider_manager_persistence.py:168 — src/qwenpaw/providers/provider_manager_persistence.py:168-203 | src/qwenpaw/providers/provider_manager_persistence.py:460-499 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) src/qwenpaw/agents/skill_system/hub.py:2329 — src/qwenpaw/agents/skill_system/hub.py:2329-2380 | src/qwenpaw/agents/skill_system/hub.py:2391-2426 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×3
  • Edited copy of a member (40 corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3078 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3078-3119 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3852-3891 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) src/qwenpaw/app/routers/agents.py:1921 — src/qwenpaw/app/routers/agents.py:1921-1960 | src/qwenpaw/app/routers/agents.py:1973-2026 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) src/qwenpaw/modes/goal/helpers.py:71 — src/qwenpaw/modes/goal/helpers.py:71-110 | src/qwenpaw/modes/goal/helpers.py:116-156 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) REDACTED:502 — REDACTED:502-528 | REDACTED:554-586 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) src/qwenpaw/app/channels/access_control.py:445 — src/qwenpaw/app/channels/access_control.py:445-471 | src/qwenpaw/app/channels/access_control.py:479-505 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:440 — plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:440-466 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:510-544 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 17+ corresponding lines) plugins/channel/imessage/qwenpaw_channel_imessage/driver.py:32 — plugins/channel/imessage/qwenpaw_channel_imessage/driver.py:32-53 | plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:31-47 | plugins/channel/mqtt/qwenpaw_channel_mqtt/driver.py:26-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:492 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:492-508 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:664-680 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1001-1017 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:567 — plugins/apps/qwenpaw-creator/backend/api/model_routes.py:567-583 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:587-603 | plugins/apps/qwenpaw-creator/backend/models/config.py:310-327 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 8+ corresponding lines) plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:81 — plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:81-94 | plugins/channel/mqtt/qwenpaw_channel_mqtt/driver.py:79-87 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:94-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) plugins/bundle/chrome/extension_setup.py:527 — plugins/bundle/chrome/extension_setup.py:527-535 | src/qwenpaw/browser/control_link/chrome/ws_handler.py:55-62 | src/qwenpaw/plugins/updates.py:129-138 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) REDACTED:59 — REDACTED:59-72 | src/qwenpaw/app/channels/management.py:83-90 | src/qwenpaw/app/channels/qrcode_sessions.py:135-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 4+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:420 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:420-423 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:304-307 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:442-446 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1129 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1129-1132 | src/qwenpaw/local_models/llamacpp.py:780-783 | src/qwenpaw/utils/port.py:100-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) plugins/apps/qwenpaw-creator/backend/schemas/projects.py:47 — plugins/apps/qwenpaw-creator/backend/schemas/projects.py:47-50 | plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:107-110 | src/qwenpaw/portability/compatibility.py:103-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×3
  • Duplicated block (43 lines × 2) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:744 — plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:744-786 | plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1133-1175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (43 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:533 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:533-575 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:533-575 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (43 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:523 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:523-565 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:523-565 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×3
  • Duplicated block (36 lines × 2) plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:172 — plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:172-207 | plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax_sglang.py:127-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (36 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:155 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:155-190 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:155-190 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (36 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2601 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2601-2636 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4051-4086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×3
  • Duplicated block (35 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:799 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:799-833 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1468-1502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:799` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (35 lines × 2) src/qwenpaw/agents/skill_system/pool_service.py:678 — src/qwenpaw/agents/skill_system/pool_service.py:678-712 | src/qwenpaw/agents/skill_system/workspace_service.py:468-502 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/skill_system/pool_service.py:678` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (35 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:44 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:44-78 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:44-78 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×3
  • Duplicated block (29 lines × 2) plugins/tool/qwen-image/qwen_image_tool.py:142 — plugins/tool/qwen-image/qwen_image_tool.py:142-170 | plugins/tool/wan27/wan27_tool.py:115-143 — `plugins/tool/qwen-image/qwen_image_tool.py` and `plugins/tool/wan27/wan27_tool.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (29 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:439 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:439-467 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:439-467 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (29 lines × 2) src/qwenpaw/runtime/commands/control/approval_handler.py:195 — src/qwenpaw/runtime/commands/control/approval_handler.py:195-223 | src/qwenpaw/runtime/commands/control/approval_handler.py:267-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/runtime/commands/control/approval_handler.py:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×3
  • Duplicated block (28 lines × 2) src/qwenpaw/agents/skill_system/workspace_service.py:507 — src/qwenpaw/agents/skill_system/workspace_service.py:507-534 | src/qwenpaw/agents/skill_system/workspace_service.py:577-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/skill_system/workspace_service.py:507` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/agents/skill_system/workspace_service.py:605` calls `pop` and `src/qwenpaw/agents/skill_system/workspace_service.py:536` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (28 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:361 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:361-388 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:361-388 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (28 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:186 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:186-213 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:186-213 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4904 — plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4904-4929 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5211-5236 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (26 lines × 2) REDACTED:116 — REDACTED:116-141 | REDACTED:190-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) src/qwenpaw/governance/tool_adapter.py:850 — src/qwenpaw/governance/tool_adapter.py:850-883 | src/qwenpaw/runtime/tool_guard.py:450-475 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/governance/tool_adapter.py:850` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×3
  • Duplicated block (23–25 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6618 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6618-6642 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6666-6688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6618` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–25 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3823 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3823-3845 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3918-3942 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23–25 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3097 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3097-3119 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3867-3891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3867` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×3
  • Duplicated block (20–21 lines × 2) REDACTED:86 — REDACTED:86-106 | REDACTED:173-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20–21 lines × 2) src/qwenpaw/app/routers/auth.py:246 — src/qwenpaw/app/routers/auth.py:246-266 | src/qwenpaw/app/routers/auth.py:294-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20–21 lines × 2) src/qwenpaw/governance/tool_adapter.py:128 — src/qwenpaw/governance/tool_adapter.py:128-147 | src/qwenpaw/runtime/tool_guard.py:41-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×3
  • Duplicated block (20 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3825 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3825-3846 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4036-4055 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4308-4333 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 3) plugins/tool/wan27/wan27_tool.py:318 — plugins/tool/wan27/wan27_tool.py:318-337 | plugins/tool/wan27/wan27_tool.py:620-639 | plugins/tool/wan27/wan27_tool.py:913-932 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 3) src/qwenpaw/app/chats/utils.py:436 — src/qwenpaw/app/chats/utils.py:436-455 | src/qwenpaw/app/chats/utils.py:507-526 | src/qwenpaw/app/chats/utils.py:537-556 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) REDACTED:417 — REDACTED:417-434 | plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:436-454 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:417` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) plugins/tool/qwen-image/qwen_image_tool.py:111 — plugins/tool/qwen-image/qwen_image_tool.py:111-129 | plugins/tool/wan27/wan27_tool.py:87-104 — `plugins/tool/qwen-image/qwen_image_tool.py` and `plugins/tool/wan27/wan27_tool.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (18–19 lines × 2) src/qwenpaw/hub/control_app.py:1322 — src/qwenpaw/hub/control_app.py:1322-1339 | src/qwenpaw/hub/control_app.py:1347-1365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/hub/control_app.py:1322` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×3
  • Duplicated block (17–18 lines × 2) plugins/harness/_shared/io_helpers.py:10 — plugins/harness/_shared/io_helpers.py:10-26 | src/qwenpaw/utils/io_utils.py:97-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17–18 lines × 2) scripts/cleanup_windows_sandbox.py:680 — scripts/cleanup_windows_sandbox.py:680-697 | REDACTED:2809-2825 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17–18 lines × 2) scripts/pack/generate_plugin_metadata.py:737 — scripts/pack/generate_plugin_metadata.py:737-754 | scripts/pack/generate_plugin_metadata.py:794-810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3393 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3393-3406 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4812-4825 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5031-5044 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3393` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5045` calls `str`, `get` and `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3407` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) REDACTED:88 — REDACTED:88-101 | REDACTED:143-156 | REDACTED:174-187 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) src/qwenpaw/cli/doctor_cmd.py:513 — src/qwenpaw/cli/doctor_cmd.py:513-526 | src/qwenpaw/cli/doctor_cmd.py:530-543 | src/qwenpaw/cli/doctor_cmd.py:547-560 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/doctor_cmd.py:513` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×3
  • Duplicated block (12–14 lines × 2) src/qwenpaw/cli/skills_cmd.py:463 — src/qwenpaw/cli/skills_cmd.py:463-474 | src/qwenpaw/cli/skills_cmd.py:762-775 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12–14 lines × 2) src/qwenpaw/plugins/archive.py:19 — src/qwenpaw/plugins/archive.py:19-30 | src/qwenpaw/plugins/wheel_additions.py:105-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/plugins/archive.py:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–14 lines × 2) console/src-tauri/src/computer_use_server/platform_macos/input.rs:888 — console/src-tauri/src/computer_use_server/platform_macos/input.rs:888-899 | console/src-tauri/src/computer_use_server/platform_macos/window.rs:142-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `console/src-tauri/src/computer_use_server/platform_macos/input.rs:888` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) plugins/channel/qq/qwenpaw_channel_qq/driver.py:242 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:242-251 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:165-174 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:419-428 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/telegram/qwenpaw_channel_telegram/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3081 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3081-3090 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3128-3137 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3852-3861 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3078` calls `strip`, `lower`, `index` and `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3127` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) src/qwenpaw/app/routers/auth.py:193 — src/qwenpaw/app/routers/auth.py:193-202 | src/qwenpaw/app/routers/auth.py:257-266 | src/qwenpaw/app/routers/auth.py:304-313 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) plugins/bundle/cloudpaw/a2a_mode.py:32 — plugins/bundle/cloudpaw/a2a_mode.py:32-39 | REDACTED:107-114 | plugins/bundle/cloudpaw/tools/a2a_config_helper.py:44-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) plugins/channel/qq/qwenpaw_channel_qq/cards/context.py:23 — plugins/channel/qq/qwenpaw_channel_qq/cards/context.py:23-30 | plugins/channel/telegram/qwenpaw_channel_telegram/cards/context.py:23-30 | plugins/channel/wecom/qwenpaw_channel_wecom/cards/context.py:19-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) REDACTED:2970 — REDACTED:2970-2977 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:122-129 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:157-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) REDACTED:465 — REDACTED:465-472 | src/qwenpaw/app/channels/console/channel.py:743-750 | src/qwenpaw/app/channels/renderer.py:533-538 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `parts` to `List[OutgoingContentPart]` in one and `List[_OutgoingPart]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) src/qwenpaw/agents/skill_system/hub.py:1035 — src/qwenpaw/agents/skill_system/hub.py:1035-1040 | src/qwenpaw/agents/skill_system/hub.py:1104-1113 | src/qwenpaw/agents/skill_system/hub.py:1125-1130 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:2215 — plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:2215-2220 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:760-765 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:645-650 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
R6 · Tooling · This package's lint script runs in no CI job · ×3
  • This package's lint script runs in no CI job plugins/bundle/chrome/frontend/package.json:8 — The package in `plugins/bundle/chrome/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/chrome/frontend` (or the workspace's task runner).
  • This package's lint script runs in no CI job plugins/bundle/computer-use/frontend/package.json:8 — The package in `plugins/bundle/computer-use/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/computer-use/frontend` (or the workspace's task runner).
  • This package's lint script runs in no CI job plugins/bundle/qwenpaw-pet/frontend/package.json:8 — The package in `plugins/bundle/qwenpaw-pet/frontend` declares the lint script `format:check` (`tsc --noEmit && prettier --check .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run format:check` in `plugins/bundle/qwenpaw-pet/frontend` (or the workspace's task runner).
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×3
  • JavaScript dependencies are not locked plugins/harness/codex/frontend/package.json:9 — plugins/harness/codex/frontend/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked plugins/harness/qoder/frontend/package.json:9 — plugins/harness/qoder/frontend/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked src/qwenpaw/plugins/frontend/package.json:22 — src/qwenpaw/plugins/frontend/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
AC2 · Forms & labels · <Slider> field component without a label · ×2
  • <Slider> field component without a label console/src/components/interaction/NumberSlider.tsx:29 — 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 console/src/features/thinking/ThinkingControl.tsx:288 — 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.
AC2 · Forms & labels · <Segmented> field component without a label · ×2
  • <Segmented> field component without a label console/src/pages/Agent/ACP/index.tsx:690 — 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.
  • <Segmented> field component without a label console/src/pages/Agent/MCP/components/MCPAccessPolicySegmented.tsx:45 — 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.
D1 · Cyclomatic Complexity · create_plan.normalize_plan (cyclomatic 28) · ×2
  • create_plan.normalize_plan (cyclomatic 28) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:193 — create_plan.normalize_plan has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • create_plan.normalize_plan (cyclomatic 28) src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:193 — create_plan.normalize_plan has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChannelDrawer.ChannelDrawer · ×2
  • ChannelDrawer.ChannelDrawer::prepareSave (cyclomatic 22) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1992 — ChannelDrawer.ChannelDrawer::prepareSave has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (ChannelDrawer.ChannelDrawer, ChannelDrawer.ChannelDrawer::prepareSave::save) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • ChannelDrawer.ChannelDrawer::prepareSave::save (cyclomatic 16) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:2076 — ChannelDrawer.ChannelDrawer::prepareSave::save has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ChannelDrawer.ChannelDrawer, ChannelDrawer.ChannelDrawer::prepareSave) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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. This is NOT this file's highest cyclomatic complexity: ChannelDrawer.ChannelDrawer::renderKnownChannelFields (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · validate_skill.validate_draft (cyclomatic 20) · ×2
  • validate_skill.validate_draft (cyclomatic 20) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:409 — validate_skill.validate_draft 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.
  • validate_skill.validate_draft (cyclomatic 20) src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:409 — validate_skill.validate_draft 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 · validate_skill._validate_batch (cyclomatic 17) · ×2
  • validate_skill._validate_batch (cyclomatic 17) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:287 — validate_skill._validate_batch 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.
  • validate_skill._validate_batch (cyclomatic 17) src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:287 — validate_skill._validate_batch 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 · publish_skill.main (cyclomatic 16) · ×2
  • publish_skill.main (cyclomatic 16) src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:34 — publish_skill.main 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.
  • publish_skill.main (cyclomatic 16) src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py:34 — publish_skill.main 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.
D2 · Cognitive Complexity · index.CronJobsPage · ×2
  • index.CronJobsPage::handleSubmit (cognitive 40) console/src/pages/Control/CronJobs/index.tsx:392 — index.CronJobsPage::handleSubmit has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 13, error handling 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.CronJobsPage::handleEdit) 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.CronJobsPage::handleEdit (cognitive 16) console/src/pages/Control/CronJobs/index.tsx:263 — index.CronJobsPage::handleEdit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, 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. This shape REPEATS in the file: one other method here (index.CronJobsPage::handleSubmit) 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 · validate_skill.validate_draft (cognitive 30) · ×2
  • validate_skill.validate_draft (cognitive 30) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:409 — validate_skill.validate_draft has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3 (7 pts), boolean chains 4, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • validate_skill.validate_draft (cognitive 30) src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:409 — validate_skill.validate_draft has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3 (7 pts), boolean chains 4, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create_plan.normalize_plan (cognitive 28) · ×2
  • create_plan.normalize_plan (cognitive 28) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:193 — create_plan.normalize_plan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7, loops 3, ternaries 2 (3 pts) (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.
  • create_plan.normalize_plan (cognitive 28) src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:193 — create_plan.normalize_plan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7, loops 3, ternaries 2 (3 pts) (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 · validate_skill._validate_batch (cognitive 24) · ×2
  • validate_skill._validate_batch (cognitive 24) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:287 — validate_skill._validate_batch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 2 (3 pts), ternaries 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.
  • validate_skill._validate_batch (cognitive 24) src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:287 — validate_skill._validate_batch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 2 (3 pts), ternaries 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 · index.ModelSelector · ×2
  • index.ModelSelector::renderProviderModels (cognitive 22) console/src/pages/Chat/ModelSelector/index.tsx:687 — index.ModelSelector::renderProviderModels has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 18, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (index.ModelSelector, index.ModelSelector::renderProTab) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.ModelSelector::renderProTab (cognitive 16) console/src/pages/Chat/ModelSelector/index.tsx:1061 — index.ModelSelector::renderProTab has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (index.ModelSelector, index.ModelSelector::renderProviderModels) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.PetControlPage · ×2
  • index.PetControlPage::onDropFiles (cognitive 20) plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:305 — index.PetControlPage::onDropFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (index.PetControlPage, index.PetControlPage::startDesktop) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.PetControlPage::startDesktop (cognitive 18) plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:237 — index.PetControlPage::startDesktop has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), error handling 1 (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. This shape REPEATS in the file: 2 other methods here (index.PetControlPage, index.PetControlPage::onDropFiles) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · publish_skill.main (cognitive 16) · ×2
  • publish_skill.main (cognitive 16) src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:34 — publish_skill.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • publish_skill.main (cognitive 16) src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py:34 — publish_skill.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: provider_manager.py → ProviderConfigModal.tsx, providerIcon.ts, ollama_provider.py src/qwenpaw/providers/provider_manager.py — `src/qwenpaw/providers/provider_manager.py` changes together with 3 other files — `console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx`, `console/src/pages/Settings/Models/components/providerIcon.ts`, `src/qwenpaw/providers/ollama_provider.py` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: ReactAgentCard.tsx → agent.ts, useAgentConfig.tsx, config.py console/src/pages/Agent/Config/components/ReactAgentCard.tsx — `console/src/pages/Agent/Config/components/ReactAgentCard.tsx` changes together with 3 other files — `console/src/api/types/agent.ts`, `console/src/pages/Agent/Config/useAgentConfig.tsx`, `src/qwenpaw/config/config.py` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1255 — plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1255-1281 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1288-1337 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1344-1362 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1369-1387 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1394-1469 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1478-1553 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:97 — plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:97-108 | plugins/apps/qwenpaw-creator/backend/services/render_review/protocol.py:210-221 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:282-332 | plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:315-326 | plugins/apps/qwenpaw-creator/backend/services/run_review/script_review.py:66-77 | plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:205-216 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (80 corresponding lines) · ×2
  • Edited copy of a member (80 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:815 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:815-894 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:624-726 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (80 corresponding lines) src/qwenpaw/providers/openai_provider.py:812 — src/qwenpaw/providers/openai_provider.py:812-891 | src/qwenpaw/providers/openai_response_provider.py:331-414 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (79 corresponding lines) · ×2
  • Edited copy of a member (79 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:788 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:788-866 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1454-1540 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (79 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1301 — plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1301-1393 | plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1718-1796 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×2
  • Edited copy of a member (54 corresponding lines) plugins/harness/qoder/event_mapper.py:185 — plugins/harness/qoder/event_mapper.py:185-238 | src/qwenpaw/portability/providers/qoder_sessions.py:474-527 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (54 corresponding lines) src/qwenpaw/plugins/loader.py:1780 — src/qwenpaw/plugins/loader.py:1780-1833 | src/qwenpaw/plugins/loader.py:5241-5298 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×2
  • Edited copy of a member (63 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:98 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:98-160 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:114-178 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (63 corresponding lines) src/qwenpaw/agents/react_agent.py:1773 — src/qwenpaw/agents/react_agent.py:1773-1835 | src/qwenpaw/agents/utils/message_request_normalizer.py:409-486 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4051 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4051-4108 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4119-4185 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) src/qwenpaw/drivers/handlers/mcp_stateful_client.py:893 — src/qwenpaw/drivers/handlers/mcp_stateful_client.py:893-950 | src/qwenpaw/drivers/handlers/mcp_stateful_client.py:987-1053 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:434 — plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:434-471 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:792-830 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) src/qwenpaw/app/routers/tools.py:279 — src/qwenpaw/app/routers/tools.py:279-316 | src/qwenpaw/app/routers/tools.py:325-363 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×2
  • Edited copy of a member (34 corresponding lines) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:547 — plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:547-607 | plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:615-648 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) scripts/cleanup_windows_sandbox.py:520 — scripts/cleanup_windows_sandbox.py:520-553 | REDACTED:2604-2640 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) REDACTED:102 — REDACTED:102-143 | REDACTED:147-208 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:638 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:638-679 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:510-555 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×2
  • Edited copy of a member (52 corresponding lines) src/qwenpaw/providers/anthropic_provider.py:254 — src/qwenpaw/providers/anthropic_provider.py:254-314 | src/qwenpaw/providers/gemini_provider.py:309-360 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (52 corresponding lines) src/qwenpaw/agents/tools/web_search.py:138 — src/qwenpaw/agents/tools/web_search.py:138-189 | src/qwenpaw/agents/tools/web_search.py:203-263 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 16+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:264 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:264-290 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:393-411 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:424-442 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:526-541 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 16+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:205 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:205-220 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:1838-1858 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/manual_edit_store.py:370-390 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:2289-2309 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×2
  • Edited copy of a member (49 corresponding lines) plugins/harness/codex/discovery.py:98 — plugins/harness/codex/discovery.py:98-153 | plugins/harness/qoder/discovery.py:96-144 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:122 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:122-170 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:215-270 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×2
  • Edited copy of a member (39 corresponding lines) src/qwenpaw/runtime/builtin_commands.py:33 — src/qwenpaw/runtime/builtin_commands.py:33-71 | src/qwenpaw/runtime/builtin_commands.py:75-136 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) plugins/bundle/computer-use/computer_use/transport/unix_socket.py:53 — plugins/bundle/computer-use/computer_use/transport/unix_socket.py:53-95 | plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:73-111 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×2
  • Edited copy of a member (43 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3544 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3544-3590 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4852-4894 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:267 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:267-309 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:321-363 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) plugins/apps/qwenpaw-creator/backend/api/project_routes.py:214 — plugins/apps/qwenpaw-creator/backend/api/project_routes.py:214-251 | plugins/apps/qwenpaw-creator/backend/api/project_routes.py:263-295 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) src/qwenpaw/agents/skill_system/pool_service.py:374 — src/qwenpaw/agents/skill_system/pool_service.py:374-406 | src/qwenpaw/agents/skill_system/workspace_service.py:926-965 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) src/qwenpaw/agents/skill_system/pool_service.py:170 — src/qwenpaw/agents/skill_system/pool_service.py:170-186 | src/qwenpaw/agents/skill_system/workspace_service.py:182-194 | src/qwenpaw/agents/skill_system/workspace_service.py:197-218 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/notification_store.py:274 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/notification_store.py:274-289 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/notification_store.py:353-376 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/notification_store.py:400-412 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 10+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:235 — plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:235-247 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:232-245 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/manual_edit_store.py:116-129 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:169-178 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) plugins/channel/discord/qwenpaw_channel_discord/driver.py:49 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:49-58 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:46-56 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:50-61 | plugins/channel/wechat/qwenpaw_channel_wechat/driver.py:56-67 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) src/qwenpaw/app/routers/skills.py:1876 — src/qwenpaw/app/routers/skills.py:1876-1886 | src/qwenpaw/app/routers/skills.py:1891-1901 | src/qwenpaw/app/routers/skills.py:2429-2446 | src/qwenpaw/app/routers/skills.py:2454-2471 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) src/qwenpaw/app/routers/workspace.py:146 — src/qwenpaw/app/routers/workspace.py:146-159 | src/qwenpaw/app/routers/workspace.py:198-208 | src/qwenpaw/app/routers/workspace.py:1150-1164 | src/qwenpaw/app/routers/workspace.py:1209-1224 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 9+ corresponding lines) src/qwenpaw/cli/chats_cmd.py:95 — src/qwenpaw/cli/chats_cmd.py:95-111 | src/qwenpaw/cli/chats_cmd.py:257-275 | src/qwenpaw/cli/cron_cmd.py:86-94 | src/qwenpaw/cli/cron_cmd.py:970-978 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) src/qwenpaw/app/routers/skills.py:2244 — src/qwenpaw/app/routers/skills.py:2244-2252 | src/qwenpaw/app/routers/skills.py:2356-2367 | src/qwenpaw/app/routers/skills.py:2376-2387 | src/qwenpaw/app/routers/skills.py:2396-2407 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 3+ corresponding lines) src/qwenpaw/cli/tui/app.py:1461 — src/qwenpaw/cli/tui/app.py:1461-1463 | src/qwenpaw/runtime/commands/control/checkpoint_handler.py:91-93 | src/qwenpaw/security/tool_guard/guardians/file_guardian.py:227-230 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) REDACTED:305 — REDACTED:305-310 | plugins/harness/codex/app_server.py:319-321 | src/qwenpaw/app/channels/base.py:1721-1723 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (45–46 lines × 2) · ×2
  • Duplicated block (45–46 lines × 2) plugins/bundle/omp_workflows/autopilot/gate.py:118 — plugins/bundle/omp_workflows/autopilot/gate.py:118-163 | plugins/bundle/omp_workflows/team/gate.py:115-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (45–46 lines × 2) REDACTED:995 — REDACTED:995-1040 | REDACTED:1168-1212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (38–42 lines × 2) · ×2
  • Duplicated block (38–42 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1020 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1020-1061 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:1341-1378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (38–42 lines × 2) REDACTED:1882 — REDACTED:1882-1923 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1874-1911 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:1924` calls `_PROCESS_INFORMATION`, `_ensure_privileges` and `src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1912` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×2
  • Duplicated block (39 lines × 2) plugins/tool/qwen-image/qwen_image_tool.py:66 — plugins/tool/qwen-image/qwen_image_tool.py:66-104 | plugins/tool/wan27/wan27_tool.py:43-81 — `plugins/tool/qwen-image/qwen_image_tool.py` and `plugins/tool/wan27/wan27_tool.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (39 lines × 2) src/qwenpaw/cli/channels_cmd.py:167 — src/qwenpaw/cli/channels_cmd.py:167-205 | src/qwenpaw/cli/channels_cmd.py:456-494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `current_config` to `DiscordConfig` in one and `TelegramConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×2
  • Duplicated block (26–27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:638 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:638-663 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:510-536 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `job` to `SourceObservationJob` in one and `SourceVideoReadJob` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (26–27 lines × 2) src/qwenpaw/app/routers/agents.py:1491 — src/qwenpaw/app/routers/agents.py:1491-1517 | src/qwenpaw/app/routers/agents.py:1550-1575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–27 lines × 2) · ×2
  • Duplicated block (21–27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4034 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4034-4054 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4306-4332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21–27 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:231 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:231-251 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:291-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×2
  • Duplicated block (25–26 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2724 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2724-2748 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2844-2869 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25–26 lines × 2) src/qwenpaw/providers/retry_chat_model.py:979 — src/qwenpaw/providers/retry_chat_model.py:979-1004 | src/qwenpaw/providers/retry_chat_model.py:1126-1150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–26 lines × 2) · ×2
  • Duplicated block (22–26 lines × 2) plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:112 — plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:112-137 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:136-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (22–26 lines × 2) REDACTED:1894 — REDACTED:1894-1919 | REDACTED:1939-1960 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1894` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×2
  • Duplicated block (24–25 lines × 2) src/qwenpaw/agents/context/scroll/memoryspace.py:1466 — src/qwenpaw/agents/context/scroll/memoryspace.py:1466-1490 | src/qwenpaw/agents/context/scroll/memoryspace.py:1509-1532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24–25 lines × 2) src/qwenpaw/providers/anthropic_provider.py:290 — src/qwenpaw/providers/anthropic_provider.py:290-313 | src/qwenpaw/providers/gemini_provider.py:333-357 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/providers/gemini_provider.py:333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–22 lines × 3) · ×2
  • Duplicated block (19–22 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2996 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2996-3017 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4573-4594 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4772-4790 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2996` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–22 lines × 3) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2437 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2437-2458 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3973-3993 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4132-4150 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3995` calls `_get_root` and `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4152` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21–22 lines × 3) · ×2
  • Duplicated block (21–22 lines × 3) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2738 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2738-2758 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3000-3021 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3932-3952 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3000` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2737` calls `evaluate` and `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3000` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21–22 lines × 3) src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1048 — src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1048-1068 | REDACTED:2453-2474 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:2408-2428 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1048` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×2
  • Duplicated block (17–19 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1017 — plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1017-1033 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:646-663 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:518-536 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `job` to `SourceMemoryBuildJob` in one and `SourceObservationJob` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17–19 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3569 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3569-3585 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4873-4889 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4984-5002 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3569` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×2
  • Duplicated block (18 lines × 3) src/qwenpaw/agents/tools/file_search.py:475 — src/qwenpaw/agents/tools/file_search.py:475-492 | src/qwenpaw/agents/tools/file_search.py:500-517 | src/qwenpaw/agents/tools/file_search.py:531-548 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/agents/tools/file_search.py:520` calls `popleft` and `src/qwenpaw/agents/tools/file_search.py:494` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 3) src/qwenpaw/browser/control_link/cdp/adapter.py:249 — src/qwenpaw/browser/control_link/cdp/adapter.py:249-266 | src/qwenpaw/browser/control_link/chrome/adapter.py:313-330 | src/qwenpaw/browser/control_link/playwright/adapter.py:231-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×2
  • Duplicated block (16–18 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:235 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:235-252 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:278-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–18 lines × 2) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:358 — plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:358-375 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:115-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×2
  • Duplicated block (13–17 lines × 2) plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:636 — plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:636-652 | plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:1007-1019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:636` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–17 lines × 2) src/qwenpaw/market/providers/modelscope.py:145 — src/qwenpaw/market/providers/modelscope.py:145-161 | src/qwenpaw/market/providers/qwenpaw.py:139-151 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:178 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:178-194 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:138-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16–17 lines × 2) src/qwenpaw/sandbox/bubblewrap_sandbox.py:219 — src/qwenpaw/sandbox/bubblewrap_sandbox.py:219-234 | REDACTED:750-766 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/sandbox/bubblewrap_sandbox.py:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×2
  • Duplicated block (15–16 lines × 4) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3164 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3164-3178 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3228-3242 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4026-4040 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4360-4375 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4360` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15–16 lines × 4) src/qwenpaw/app/routers/agents.py:1488 — src/qwenpaw/app/routers/agents.py:1488-1503 | src/qwenpaw/app/routers/agents.py:1547-1561 | src/qwenpaw/app/routers/agents.py:1603-1618 | src/qwenpaw/app/routers/agents.py:1648-1663 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) REDACTED:261 — REDACTED:261-276 | REDACTED:360-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:103 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:103-117 | plugins/channel/voice/qwenpaw_channel_voice/platform.py:227-242 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/voice/qwenpaw_channel_voice/platform.py:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×2
  • Duplicated block (11–14 lines × 2) src/qwenpaw/governance/detectors.py:512 — src/qwenpaw/governance/detectors.py:512-522 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:77-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–14 lines × 2) src/qwenpaw/runtime/builtin_commands.py:42 — src/qwenpaw/runtime/builtin_commands.py:42-52 | src/qwenpaw/runtime/builtin_commands.py:104-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/runtime/builtin_commands.py:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×2
  • Duplicated block (12–13 lines × 4) src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:35 — src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:35-47 | src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:517-528 | src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py:35-47 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:517-528 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 4) src/qwenpaw/cli/doctor_cmd.py:511 — src/qwenpaw/cli/doctor_cmd.py:511-522 | src/qwenpaw/cli/doctor_cmd.py:528-539 | src/qwenpaw/cli/doctor_cmd.py:545-556 | src/qwenpaw/cli/doctor_cmd.py:668-680 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/doctor_cmd.py:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) src/qwenpaw/agents/context/scroll/memoryspace.py:1463 — src/qwenpaw/agents/context/scroll/memoryspace.py:1463-1474 | src/qwenpaw/agents/context/scroll/memoryspace.py:1506-1517 | src/qwenpaw/agents/context/scroll/memoryspace.py:1550-1561 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) src/qwenpaw/app/routers/config.py:434 — src/qwenpaw/app/routers/config.py:434-445 | src/qwenpaw/app/routers/config.py:694-705 | src/qwenpaw/app/routers/config.py:747-758 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:828 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:828-838 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:638-648 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:750-760 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2726 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2726-2736 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2986-2998 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3920-3930 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2986` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) plugins/apps/qwenpaw-creator/backend/models/text_model.py:205 — plugins/apps/qwenpaw-creator/backend/models/text_model.py:205-212 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:583-591 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:583` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:247 — plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:247-254 | plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:352-360 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) REDACTED:652 — REDACTED:652-656 | REDACTED:738-742 | REDACTED:803-807 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:69 — plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:69-73 | plugins/channel/sip/qwenpaw_channel_sip/driver.py:54-58 | plugins/channel/voice/qwenpaw_channel_voice/driver.py:74-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×2
  • Duplicated block (5 lines × 4) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:73 — plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:73-77 | plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:27-31 | plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:432-436 | plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:19-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 4) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:662 — plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:662-666 | plugins/apps/qwenpaw-data/scripts/verify-data-console.py:52-56 | scripts/pack/verify_desktop_artifacts.py:36-40 | src/qwenpaw/plugins/provision.py:97-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) plugins/channel/imessage/qwenpaw_channel_imessage/driver.py:94 — plugins/channel/imessage/qwenpaw_channel_imessage/driver.py:94-101 | plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:109-116 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:104-111 | plugins/channel/wechat/qwenpaw_channel_wechat/driver.py:117-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 4) src/qwenpaw/channel_protocol/models.py:871 — src/qwenpaw/channel_protocol/models.py:871-879 | src/qwenpaw/plugins/execution/models.py:143-150 | src/qwenpaw/plugins/execution/models.py:171-179 | src/qwenpaw/plugins/execution/models.py:209-216 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
P12 · CI test-gate honesty · Tests run only outside the merge gate · ×2
  • Tests run only outside the merge gate REDACTED:71 — `npm --prefix plugins/bundle/qwenpaw-openui/frontend test` is the only CI command that runs 27 test(s) in 5 file(s) (e.g. `plugins/bundle/qwenpaw-openui/frontend/test/OpenUIBlock.test.tsx`, `plugins/bundle/qwenpaw-openui/frontend/test/build.test.ts`), and the workflow runs only on release, workflow_dispatch — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
  • Tests run only outside the merge gate REDACTED:441 — `npm --prefix plugins/bundle/qwenpaw-openui/frontend test` is the only CI command that runs 27 test(s) in 5 file(s) (e.g. `plugins/bundle/qwenpaw-openui/frontend/test/OpenUIBlock.test.tsx`, `plugins/bundle/qwenpaw-openui/frontend/test/build.test.ts`), and the workflow runs only on workflow_dispatch — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
R10 · Code Duplication · Duplicated block with local edits (52 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (52 matched lines × 2 locations) console/src/pages/Chat/HostBubbles.tsx:326 — console/src/pages/Chat/HostBubbles.tsx:326 · console/src/pages/Chat/HostBubbles.tsx:402 — the two spans are one implementation copied and then locally edited — 293 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (52 matched lines × 2 locations) console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:339 — console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:339 · console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:293 — the two spans are one implementation copied and then locally edited — 345 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 (43 lines × 2 locations) · ×2
  • Duplicated block (43 lines × 2 locations) console/src/pages/Agent/Config/components/AgentLoopCard.tsx:156 — console/src/pages/Agent/Config/components/AgentLoopCard.tsx:156 · console/src/pages/Agent/Config/components/AgentLoopCard.tsx:737 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (43 lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2642 — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2642 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3398 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (42 matched lines × 2 locations) console/src/os/MissionControl.tsx:29 — console/src/os/MissionControl.tsx:29 · console/src/os/SpacesPanel.tsx:24 — the two spans are one implementation copied and then locally edited — 386 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (42 matched lines × 2 locations) console/src/pages/Agent/Skills/index.tsx:100 — console/src/pages/Agent/Skills/index.tsx:100 · console/src/pages/Agent/Tools/index.tsx:228 — the two spans are one implementation copied and then locally edited — 285 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.
X1 · Async correctness · Task from `asyncio.ensure_future` is not kept · ×2
  • Task from `asyncio.ensure_future` is not kept src/qwenpaw/app/crons/manager.py:843 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.ensure_future` is not kept plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:294 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×2
  • Untrusted text written into markup unescaped REDACTED:215 — `result.html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:142 — `html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:153 — 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 · <FolderInput> field component without a label · ×1
  • <FolderInput> field component without a label console/src/components/SessionItem/index.tsx:255 — 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 website/src/pages/Downloads/index.tsx:214 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D1 · Cyclomatic Complexity · index.ChatPage (cyclomatic 534) · ×1
  • index.ChatPage (cyclomatic 534) console/src/pages/Chat/index.tsx:1219 — index.ChatPage has cyclomatic complexity 534 (threshold 15). Of this number, 41 points are the body's own statements and 493 belong to 86 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 · PostComposer.PostComposer (cyclomatic 171) · ×1
  • PostComposer.PostComposer (cyclomatic 171) REDACTED:149 — PostComposer.PostComposer has cyclomatic complexity 171 (threshold 15). Of this number, 58 points are the body's own statements and 113 belong to 35 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 · SessionProjectDirectory.SessionProjectDirectory (cyclomatic 163) · ×1
  • SessionProjectDirectory.SessionProjectDirectory (cyclomatic 163) console/src/features/project-directory/SessionProjectDirectory.tsx:114 — SessionProjectDirectory.SessionProjectDirectory has cyclomatic complexity 163 (threshold 15). Of this number, 67 points are the body's own statements and 96 belong to 29 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 · creatorSessionStore.useCreatorSessionStore.ingestEvents (cyclomatic 160) · ×1
  • creatorSessionStore.useCreatorSessionStore.ingestEvents (cyclomatic 160) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1143 — creatorSessionStore.useCreatorSessionStore.ingestEvents has cyclomatic complexity 160 (threshold 15). Most of this is not in the body itself: 2 of the 160 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1165, 1145, 1147, …). 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 · TabbedEditor.TabbedEditor (cyclomatic 157) · ×1
  • TabbedEditor.TabbedEditor (cyclomatic 157) console/src/pages/Coding/TabbedEditor.tsx:185 — TabbedEditor.TabbedEditor has cyclomatic complexity 157 (threshold 15). Of this number, 43 points are the body's own statements and 114 belong to 44 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 · work_graph.derive_work_graph (cyclomatic 148) · ×1
  • work_graph.derive_work_graph (cyclomatic 148) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:669 — work_graph.derive_work_graph has cyclomatic complexity 148 (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 · ElementDetail.ElementDetail (cyclomatic 144) · ×1
  • ElementDetail.ElementDetail (cyclomatic 144) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:322 — ElementDetail.ElementDetail has cyclomatic complexity 144 (threshold 15). Of this number, 84 points are the body's own statements and 60 belong to 30 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 · AssetsPage.AssetsPage (cyclomatic 139) · ×1
  • AssetsPage.AssetsPage (cyclomatic 139) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1457 — AssetsPage.AssetsPage has cyclomatic complexity 139 (threshold 15). Of this number, 25 points are the body's own statements and 114 belong to 29 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 · pipeline.ground_prompt_context (cyclomatic 135) · ×1
  • pipeline.ground_prompt_context (cyclomatic 135) plugins/apps/qwenpaw-creator/backend/services/web_grounding/pipeline.py:94 — pipeline.ground_prompt_context has cyclomatic complexity 135 (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 · TimelineCanvas.TimelineCanvas (cyclomatic 135) · ×1
  • TimelineCanvas.TimelineCanvas (cyclomatic 135) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:120 — TimelineCanvas.TimelineCanvas has cyclomatic complexity 135 (threshold 15). Of this number, 46 points are the body's own statements and 89 belong to 27 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 · video_model.submit_video_task (cyclomatic 124) · ×1
  • video_model.submit_video_task (cyclomatic 124) plugins/apps/qwenpaw-creator/backend/models/video_model.py:604 — video_model.submit_video_task has cyclomatic complexity 124 (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 · LocalModelManageModal.LocalModelManageModal (cyclomatic 124) · ×1
  • LocalModelManageModal.LocalModelManageModal (cyclomatic 124) console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:126 — LocalModelManageModal.LocalModelManageModal has cyclomatic complexity 124 (threshold 15). Of this number, 28 points are the body's own statements and 96 belong to 41 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 · FilesWorkspace.FilesWorkspace (cyclomatic 123) · ×1
  • FilesWorkspace.FilesWorkspace (cyclomatic 123) console/src/features/files-workspace/FilesWorkspace.tsx:65 — FilesWorkspace.FilesWorkspace has cyclomatic complexity 123 (threshold 15). Of this number, 26 points are the body's own statements and 97 belong to 23 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 · FilesDrawer.FilesDrawer (cyclomatic 113) · ×1
  • FilesDrawer.FilesDrawer (cyclomatic 113) console/src/features/files-workspace/FilesDrawer.tsx:74 — FilesDrawer.FilesDrawer has cyclomatic complexity 113 (threshold 15). Of this number, 56 points are the body's own statements and 57 belong to 16 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 · PostAssistance.PostAssistance (cyclomatic 113) · ×1
  • PostAssistance.PostAssistance (cyclomatic 113) console/src/pages/CommunityFeedback/PostAssistance.tsx:58 — PostAssistance.PostAssistance has cyclomatic complexity 113 (threshold 15). Of this number, 46 points are the body's own statements and 67 belong to 31 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 · ProviderImportService._apply (cyclomatic 107) · ×1
  • ProviderImportService._apply (cyclomatic 107) src/qwenpaw/portability/importer.py:144 — ProviderImportService._apply has cyclomatic complexity 107 (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.InboxPage (cyclomatic 106) · ×1
  • index.InboxPage (cyclomatic 106) console/src/pages/Inbox/index.tsx:161 — index.InboxPage has cyclomatic complexity 106 (threshold 15). Of this number, 44 points are the body's own statements and 62 belong to 29 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 · SidebarSessionList.SidebarSessionList (cyclomatic 102) · ×1
  • SidebarSessionList.SidebarSessionList (cyclomatic 102) console/src/layouts/SidebarSessionList.tsx:274 — SidebarSessionList.SidebarSessionList has cyclomatic complexity 102 (threshold 15). Of this number, 29 points are the body's own statements and 73 belong to 31 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.HubPage (cyclomatic 99) · ×1
  • index.HubPage (cyclomatic 99) console/src/pages/Hub/index.tsx:76 — index.HubPage has cyclomatic complexity 99 (threshold 15). Of this number, 37 points are the body's own statements and 62 belong to 18 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.ImportWorkflow (cyclomatic 99) · ×1
  • index.ImportWorkflow (cyclomatic 99) console/src/pages/Import/index.tsx:189 — index.ImportWorkflow has cyclomatic complexity 99 (threshold 15). Of this number, 55 points are the body's own statements and 44 belong to 29 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.SettingsCenter (cyclomatic 98) · ×1
  • index.SettingsCenter (cyclomatic 98) console/src/pages/SettingsCenter/index.tsx:346 — index.SettingsCenter has cyclomatic complexity 98 (threshold 15). Of this number, 33 points are the body's own statements and 65 belong to 23 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 · creatorMessagePresentation.toolCallPresentations (cyclomatic 95) · ×1
  • creatorMessagePresentation.toolCallPresentations (cyclomatic 95) REDACTED:923 — creatorMessagePresentation.toolCallPresentations has cyclomatic complexity 95 (threshold 15). Most of this is not in the body itself: 1 of the 95 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 1030, a function literal at line 953, a function literal at line 1178, …). 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 · agentProgressModel.buildAgentProgressModel (cyclomatic 92) · ×1
  • agentProgressModel.buildAgentProgressModel (cyclomatic 92) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:262 — agentProgressModel.buildAgentProgressModel has cyclomatic complexity 92 (threshold 15). Of this number, 80 points are the body's own statements and 12 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 · KanbanBoard (cyclomatic 92) · ×1
  • KanbanBoard (cyclomatic 92) REDACTED:1037 — KanbanBoard has cyclomatic complexity 92 (threshold 15). Most of this is not in the body itself: 12 of the 92 points are its own statements and the rest belongs to 69 function items inside it that branch (moveIssue, subscribeStream::onmessage, onRun, …). 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 · R2VWorkbenchPage.WorkbenchSurface (cyclomatic 91) · ×1
  • R2VWorkbenchPage.WorkbenchSurface (cyclomatic 91) plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284 — R2VWorkbenchPage.WorkbenchSurface has cyclomatic complexity 91 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (R2VWorkbenchPage.WorkbenchSurface::regenerateNode) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TimelineLivePreview.TimelineLivePreview (cyclomatic 89) · ×1
  • TimelineLivePreview.TimelineLivePreview (cyclomatic 89) REDACTED:533 — TimelineLivePreview.TimelineLivePreview has cyclomatic complexity 89 (threshold 15). Most of this is not in the body itself: 14 of the 89 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 678, 904, 795, …). 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.Evaluation (cyclomatic 89) · ×1
  • index.Evaluation (cyclomatic 89) website/src/pages/Evaluation/index.tsx:45 — index.Evaluation has cyclomatic complexity 89 (threshold 15). Of this number, 35 points are the body's own statements and 54 belong to 16 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 · AgentDock.AgentDock (cyclomatic 88) · ×1
  • AgentDock.AgentDock (cyclomatic 88) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136 — AgentDock.AgentDock has cyclomatic complexity 88 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (AgentDock.AgentDock::submit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · FileCreatorAgentRuntime._drive_subagent_inner (cyclomatic 87) · ×1
  • FileCreatorAgentRuntime._drive_subagent_inner (cyclomatic 87) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5809 — FileCreatorAgentRuntime._drive_subagent_inner has cyclomatic complexity 87 (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 · IssueCard (cyclomatic 87) · ×1
  • IssueCard (cyclomatic 87) REDACTED:248 — IssueCard has cyclomatic complexity 87 (threshold 15). Of this number, 70 points are the body's own statements and 17 belong to 23 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 · AgentScopeAgentChatClient.complete (cyclomatic 86) · ×1
  • AgentScopeAgentChatClient.complete (cyclomatic 86) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:870 — AgentScopeAgentChatClient.complete has cyclomatic complexity 86 (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.CommunityPage (cyclomatic 83) · ×1
  • index.CommunityPage (cyclomatic 83) console/src/pages/Market/Community/index.tsx:103 — index.CommunityPage has cyclomatic complexity 83 (threshold 15). Of this number, 33 points are the body's own statements and 50 belong to 19 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 · ThinkingControl.ThinkingControl (cyclomatic 82) · ×1
  • ThinkingControl.ThinkingControl (cyclomatic 82) console/src/features/thinking/ThinkingControl.tsx:15 — ThinkingControl.ThinkingControl has cyclomatic complexity 82 (threshold 15). Of this number, 48 points are the body's own statements and 34 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InboundDecoder._on_message (cyclomatic 81) · ×1
  • InboundDecoder._on_message (cyclomatic 81) REDACTED:40 — InboundDecoder._on_message has cyclomatic complexity 81 (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 · RemoteModelManageModal.RemoteModelManageModal (cyclomatic 81) · ×1
  • RemoteModelManageModal.RemoteModelManageModal (cyclomatic 81) console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx:43 — RemoteModelManageModal.RemoteModelManageModal has cyclomatic complexity 81 (threshold 15). Of this number, 22 points are the body's own statements and 59 belong to 20 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.ModelsPage (cyclomatic 80) · ×1
  • index.ModelsPage (cyclomatic 80) console/src/pages/Settings/Models/index.tsx:47 — index.ModelsPage has cyclomatic complexity 80 (threshold 15). Of this number, 27 points are the body's own statements and 53 belong to 17 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 · compliance.check_plugin (cyclomatic 79) · ×1
  • compliance.check_plugin (cyclomatic 79) src/qwenpaw/plugins/compliance.py:243 — compliance.check_plugin has cyclomatic complexity 79 (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 · PostDetail.PostDetail (cyclomatic 79) · ×1
  • PostDetail.PostDetail (cyclomatic 79) console/src/pages/Market/Community/PostDetail.tsx:54 — PostDetail.PostDetail has cyclomatic complexity 79 (threshold 15). Of this number, 45 points are the body's own statements and 34 belong to 15 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 · FileCreatorAgentRuntime._model_loop (cyclomatic 78) · ×1
  • FileCreatorAgentRuntime._model_loop (cyclomatic 78) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3243 — FileCreatorAgentRuntime._model_loop has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doctor_cmd.run_doctor_checks (cyclomatic 78) · ×1
  • doctor_cmd.run_doctor_checks (cyclomatic 78) src/qwenpaw/cli/doctor_cmd.py:436 — doctor_cmd.run_doctor_checks has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatSenderTabsPanel.ChatSenderTabsPanel (cyclomatic 76) · ×1
  • ChatSenderTabsPanel.ChatSenderTabsPanel (cyclomatic 76) console/src/pages/Chat/components/ChatSenderTabsPanel.tsx:45 — ChatSenderTabsPanel.ChatSenderTabsPanel has cyclomatic complexity 76 (threshold 15). Of this number, 49 points are the body's own statements and 27 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 · utils.agentscope_msg_to_message (cyclomatic 75) · ×1
  • utils.agentscope_msg_to_message (cyclomatic 75) src/qwenpaw/app/chats/utils.py:635 — utils.agentscope_msg_to_message has cyclomatic complexity 75 (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 · motion_design._validated_design (cyclomatic 74) · ×1
  • motion_design._validated_design (cyclomatic 74) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:593 — motion_design._validated_design has cyclomatic complexity 74 (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 · BrowserUseCard.getBrowserTitle (cyclomatic 74) · ×1
  • BrowserUseCard.getBrowserTitle (cyclomatic 74) console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:105 — BrowserUseCard.getBrowserTitle has cyclomatic complexity 74 (threshold 15). Of this number, 26 points are the body's own statements and 48 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 · BackgroundTaskPanel.BackgroundTaskPanel (cyclomatic 74) · ×1
  • BackgroundTaskPanel.BackgroundTaskPanel (cyclomatic 74) console/src/pages/Chat/components/BackgroundTaskPanel.tsx:61 — BackgroundTaskPanel.BackgroundTaskPanel has cyclomatic complexity 74 (threshold 15). Of this number, 43 points are the body's own statements and 31 belong to 12 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 · JobDrawer.JobDrawer (cyclomatic 74) · ×1
  • JobDrawer.JobDrawer (cyclomatic 74) console/src/pages/Control/CronJobs/components/JobDrawer.tsx:70 — JobDrawer.JobDrawer has cyclomatic complexity 74 (threshold 15). Of this number, 17 points are the body's own statements and 57 belong to 25 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 · SkillsConfigPane.SkillsConfigPane (cyclomatic 74) · ×1
  • SkillsConfigPane.SkillsConfigPane (cyclomatic 74) plugins/apps/qwenpaw-creator/ui/src/components/creator/SkillsConfigPane.tsx:62 — SkillsConfigPane.SkillsConfigPane has cyclomatic complexity 74 (threshold 15). Of this number, 33 points are the body's own statements and 41 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 · DockableSidebar.DockableSidebar (cyclomatic 72) · ×1
  • DockableSidebar.DockableSidebar (cyclomatic 72) console/src/layouts/DockableSidebar.tsx:25 — DockableSidebar.DockableSidebar has cyclomatic complexity 72 (threshold 15). Of this number, 31 points are the body's own statements and 41 belong to 11 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 · MemoryGraphView.MemoryGraphView (cyclomatic 72) · ×1
  • MemoryGraphView.MemoryGraphView (cyclomatic 72) REDACTED:701 — MemoryGraphView.MemoryGraphView has cyclomatic complexity 72 (threshold 15). Of this number, 22 points are the body's own statements and 50 belong to 20 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 · MentionInput.MentionInput (cyclomatic 72) · ×1
  • MentionInput.MentionInput (cyclomatic 72) plugins/apps/qwenpaw-creator/ui/src/components/agent/MentionInput.tsx:173 — MentionInput.MentionInput has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 3 of the 72 points are its own statements and the rest belongs to 21 function items inside it that branch (handleKeyDown, fragmentFromClipboard, detectQuery, …). 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 · doctor_checks.enabled_channel_notes (cyclomatic 71) · ×1
  • doctor_checks.enabled_channel_notes (cyclomatic 71) src/qwenpaw/cli/doctor_checks.py:777 — doctor_checks.enabled_channel_notes has cyclomatic complexity 71 (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 · AppMarket.AppMarket (cyclomatic 71) · ×1
  • AppMarket.AppMarket (cyclomatic 71) console/src/pages/AppCenter/AppMarket.tsx:124 — AppMarket.AppMarket has cyclomatic complexity 71 (threshold 15). Of this number, 21 points are the body's own statements and 50 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.AgentSelector (cyclomatic 70) · ×1
  • index.AgentSelector (cyclomatic 70) console/src/components/AgentSelector/index.tsx:35 — index.AgentSelector has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 14 of the 70 points are its own statements and the rest belongs to 17 function items inside it that branch (renderAgentDetails, renderToggleButton, handleToggleAgent, …). 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 · browser_control.browser (cyclomatic 69) · ×1
  • browser_control.browser (cyclomatic 69) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5056 — browser_control.browser has cyclomatic complexity 69 (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 · AccessControlDrawer.AccessControlDrawer (cyclomatic 69) · ×1
  • AccessControlDrawer.AccessControlDrawer (cyclomatic 69) console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:51 — AccessControlDrawer.AccessControlDrawer has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 8 of the 69 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 139, handleAdd, handleBatchRemove, …). 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 · OrganizationModels.OrganizationModels (cyclomatic 69) · ×1
  • OrganizationModels.OrganizationModels (cyclomatic 69) console/src/pages/Hub/governance/OrganizationModels.tsx:47 — OrganizationModels.OrganizationModels has cyclomatic complexity 69 (threshold 15). Of this number, 27 points are the body's own statements and 42 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileSpecialistToolRegistry.invoke (cyclomatic 68) · ×1
  • FileSpecialistToolRegistry.invoke (cyclomatic 68) plugins/apps/qwenpaw-creator/backend/services/specialist_tools.py:1266 — FileSpecialistToolRegistry.invoke has cyclomatic complexity 68 (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 · EmbeddingModelCard.EmbeddingModelCard (cyclomatic 68) · ×1
  • EmbeddingModelCard.EmbeddingModelCard (cyclomatic 68) console/src/pages/Agent/Config/components/EmbeddingModelCard.tsx:44 — EmbeddingModelCard.EmbeddingModelCard has cyclomatic complexity 68 (threshold 15). Of this number, 51 points are the body's own statements and 17 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 · index.CommunitySettings (cyclomatic 67) · ×1
  • index.CommunitySettings (cyclomatic 67) console/src/pages/Settings/Community/index.tsx:28 — index.CommunitySettings has cyclomatic complexity 67 (threshold 15). Of this number, 37 points are the body's own statements and 30 belong to 11 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.Docs (cyclomatic 67) · ×1
  • index.Docs (cyclomatic 67) website/src/pages/Docs/index.tsx:27 — index.Docs has cyclomatic complexity 67 (threshold 15). Of this number, 18 points are the body's own statements and 49 belong to 20 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · image_execution._resolve_request (cyclomatic 66) · ×1
  • image_execution._resolve_request (cyclomatic 66) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:977 — image_execution._resolve_request has cyclomatic complexity 66 (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 · ProjectCommitBoundary.commit (cyclomatic 65) · ×1
  • ProjectCommitBoundary.commit (cyclomatic 65) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:408 — ProjectCommitBoundary.commit has cyclomatic complexity 65 (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 · DingTalkTransport._send_media_part_via_webhook (cyclomatic 65) · ×1
  • DingTalkTransport._send_media_part_via_webhook (cyclomatic 65) REDACTED:883 — DingTalkTransport._send_media_part_via_webhook has cyclomatic complexity 65 (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 · SourceMediaAnalysisService.commit_agent_intelligence (cyclomatic 63) · ×1
  • SourceMediaAnalysisService.commit_agent_intelligence (cyclomatic 63) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:843 — SourceMediaAnalysisService.commit_agent_intelligence has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · channel_config_compat.normalize_channel_config (cyclomatic 63) · ×1
  • channel_config_compat.normalize_channel_config (cyclomatic 63) src/qwenpaw/config/channel_config_compat.py:30 — channel_config_compat.normalize_channel_config has cyclomatic complexity 63 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · fileProjectReviewPresentation.fileReviewPresentation (cyclomatic 62) · ×1
  • fileProjectReviewPresentation.fileReviewPresentation (cyclomatic 62) plugins/apps/qwenpaw-creator/ui/src/lib/fileProjectReviewPresentation.ts:127 — fileProjectReviewPresentation.fileReviewPresentation has cyclomatic complexity 62 (threshold 15). Of this number, 55 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Envelope.translate_event (cyclomatic 61) · ×1
  • Envelope.translate_event (cyclomatic 61) src/qwenpaw/runtime/envelope.py:196 — Envelope.translate_event has cyclomatic complexity 61 (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.SessionItem (cyclomatic 61) · ×1
  • index.SessionItem (cyclomatic 61) console/src/components/SessionItem/index.tsx:69 — index.SessionItem has cyclomatic complexity 61 (threshold 15). Of this number, 36 points are the body's own statements and 25 belong to 12 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 · doctor_fix_runner._plan_fixes (cyclomatic 60) · ×1
  • doctor_fix_runner._plan_fixes (cyclomatic 60) src/qwenpaw/cli/doctor_fix_runner.py:278 — doctor_fix_runner._plan_fixes has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionThinking.SessionThinking (cyclomatic 60) · ×1
  • SessionThinking.SessionThinking (cyclomatic 60) console/src/features/thinking/SessionThinking.tsx:30 — SessionThinking.SessionThinking has cyclomatic complexity 60 (threshold 15). Of this number, 25 points are the body's own statements and 35 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 · ResourceReportModal.ResourceReportModal (cyclomatic 57) · ×1
  • ResourceReportModal.ResourceReportModal (cyclomatic 57) console/src/pages/CommunityFeedback/ResourceReportModal.tsx:30 — ResourceReportModal.ResourceReportModal has cyclomatic complexity 57 (threshold 15). Of this number, 23 points are the body's own statements and 34 belong to 10 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 · agentLiveStatus.deriveAgentLiveStatus (cyclomatic 57) · ×1
  • agentLiveStatus.deriveAgentLiveStatus (cyclomatic 57) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:400 — agentLiveStatus.deriveAgentLiveStatus has cyclomatic complexity 57 (threshold 15). Of this number, 55 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 · ConsoleChannel.stream_one (cyclomatic 56) · ×1
  • ConsoleChannel.stream_one (cyclomatic 56) src/qwenpaw/app/channels/console/channel.py:372 — ConsoleChannel.stream_one has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppBrand.AppBrand (cyclomatic 56) · ×1
  • AppBrand.AppBrand (cyclomatic 56) console/src/layouts/AppBrand.tsx:68 — AppBrand.AppBrand has cyclomatic complexity 56 (threshold 15). Of this number, 38 points are the body's own statements and 18 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ToolCardShell.ToolCardShell (cyclomatic 56) · ×1
  • ToolCardShell.ToolCardShell (cyclomatic 56) console/src/components/Chat/ToolCards/shared/ToolCardShell.tsx:61 — ToolCardShell.ToolCardShell has cyclomatic complexity 56 (threshold 15). Of this number, 39 points are the body's own statements and 17 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 · ReMeLightMemoryCard.ReMeLightMemoryCard (cyclomatic 56) · ×1
  • ReMeLightMemoryCard.ReMeLightMemoryCard (cyclomatic 56) console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:27 — ReMeLightMemoryCard.ReMeLightMemoryCard has cyclomatic complexity 56 (threshold 15). Of this number, 32 points are the body's own statements and 24 belong to 12 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 · Project._validate_graph (cyclomatic 55) · ×1
  • Project._validate_graph (cyclomatic 55) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:1482 — Project._validate_graph has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · init_cmd.init_cmd (cyclomatic 55) · ×1
  • init_cmd.init_cmd (cyclomatic 55) src/qwenpaw/cli/init_cmd.py:216 — init_cmd.init_cmd has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependency_transaction.apply_operation (cyclomatic 55) · ×1
  • dependency_transaction.apply_operation (cyclomatic 55) src/qwenpaw/plugins/dependency_transaction.py:1119 — dependency_transaction.apply_operation has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model_resolution.resolve_model_info (cyclomatic 55) · ×1
  • model_resolution.resolve_model_info (cyclomatic 55) src/qwenpaw/providers/model_resolution.py:22 — model_resolution.resolve_model_info has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Provider.update_model_config (cyclomatic 54) · ×1
  • Provider.update_model_config (cyclomatic 54) src/qwenpaw/providers/provider.py:1137 — Provider.update_model_config has cyclomatic complexity 54 (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 · DesktopOS.DesktopOS (cyclomatic 54) · ×1
  • DesktopOS.DesktopOS (cyclomatic 54) console/src/os/DesktopOS.tsx:73 — DesktopOS.DesktopOS has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 9 of the 54 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 453, a function literal at line 150, a function literal at line 198, …). 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.ChromeSetupPage (cyclomatic 54) · ×1
  • index.ChromeSetupPage (cyclomatic 54) plugins/bundle/chrome/frontend/src/index.tsx:885 — index.ChromeSetupPage has cyclomatic complexity 54 (threshold 15). Of this number, 24 points are the body's own statements and 30 belong to 12 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 · Chart.Chart (cyclomatic 54) · ×1
  • Chart.Chart (cyclomatic 54) website/src/pages/Evaluation/Chart.tsx:16 — Chart.Chart has cyclomatic complexity 54 (threshold 15). Of this number, 26 points are the body's own statements and 28 belong to 13 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 · PluginLoader._unload_plugin_reserved (cyclomatic 53) · ×1
  • PluginLoader._unload_plugin_reserved (cyclomatic 53) src/qwenpaw/plugins/loader.py:4427 — PluginLoader._unload_plugin_reserved has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QwenPawAgent._reasoning (cyclomatic 52) · ×1
  • QwenPawAgent._reasoning (cyclomatic 52) src/qwenpaw/agents/react_agent.py:1177 — QwenPawAgent._reasoning has cyclomatic complexity 52 (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.MCPPage (cyclomatic 52) · ×1
  • index.MCPPage (cyclomatic 52) console/src/pages/Agent/MCP/index.tsx:78 — index.MCPPage has cyclomatic complexity 52 (threshold 15). Of this number, 17 points are the body's own statements and 35 belong to 7 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 · native_media.source_intelligence_content_parts (cyclomatic 51) · ×1
  • native_media.source_intelligence_content_parts (cyclomatic 51) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:260 — native_media.source_intelligence_content_parts has cyclomatic complexity 51 (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 · browser_control._action_batch (cyclomatic 51) · ×1
  • browser_control._action_batch (cyclomatic 51) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4507 — browser_control._action_batch has cyclomatic complexity 51 (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 · WindowFrame.WindowFrame (cyclomatic 51) · ×1
  • WindowFrame.WindowFrame (cyclomatic 51) console/src/os/WindowFrame.tsx:135 — WindowFrame.WindowFrame has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 12 of the 51 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 312, 356, 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.
D1 · Cyclomatic Complexity · AgentDock.ToolCallCard (cyclomatic 51) · ×1
  • AgentDock.ToolCallCard (cyclomatic 51) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:760 — AgentDock.ToolCallCard has cyclomatic complexity 51 (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 · DingTalkTransport.send_content_parts (cyclomatic 50) · ×1
  • DingTalkTransport.send_content_parts (cyclomatic 50) REDACTED:1215 — DingTalkTransport.send_content_parts has cyclomatic complexity 50 (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 · PluginLoader._reload_plugin_transaction (cyclomatic 50) · ×1
  • PluginLoader._reload_plugin_transaction (cyclomatic 50) src/qwenpaw/plugins/loader.py:2681 — PluginLoader._reload_plugin_transaction has cyclomatic complexity 50 (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 · useSettingsSearchTarget.useSettingsSearchTarget (cyclomatic 50) · ×1
  • useSettingsSearchTarget.useSettingsSearchTarget (cyclomatic 50) console/src/pages/SettingsCenter/useSettingsSearchTarget.ts:5 — useSettingsSearchTarget.useSettingsSearchTarget has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 1 of the 50 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 44, 10, 90, …). 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 · codex_schedules._normalise_task (cyclomatic 49) · ×1
  • codex_schedules._normalise_task (cyclomatic 49) src/qwenpaw/portability/providers/codex_schedules.py:339 — codex_schedules._normalise_task has cyclomatic complexity 49 (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 · MemoryGraphView.applyGraphVisualState (cyclomatic 49) · ×1
  • MemoryGraphView.applyGraphVisualState (cyclomatic 49) REDACTED:464 — MemoryGraphView.applyGraphVisualState has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 2 of the 49 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 473, a function literal at line 554, a function literal at line 536, …). 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 · MarketPluginList.MarketPluginList (cyclomatic 49) · ×1
  • MarketPluginList.MarketPluginList (cyclomatic 49) console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:108 — MarketPluginList.MarketPluginList has cyclomatic complexity 49 (threshold 15). Of this number, 21 points are the body's own statements and 28 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RestoreBackupModal.RestoreBackupModal (cyclomatic 49) · ×1
  • RestoreBackupModal.RestoreBackupModal (cyclomatic 49) console/src/pages/Settings/Backups/restore/RestoreBackupModal.tsx:68 — RestoreBackupModal.RestoreBackupModal has cyclomatic complexity 49 (threshold 15). Of this number, 24 points are the body's own statements and 25 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 · ProjectLayout.ProjectLayout (cyclomatic 49) · ×1
  • ProjectLayout.ProjectLayout (cyclomatic 49) plugins/apps/qwenpaw-creator/ui/src/components/layout/ProjectLayout.tsx:142 — ProjectLayout.ProjectLayout has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 3 of the 49 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 218, 326, 386, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · events.translate_frames (cyclomatic 48) · ×1
  • events.translate_frames (cyclomatic 48) plugins/apps/qwenpaw-data/backend/bridge/events.py:210 — events.translate_frames has cyclomatic complexity 48 (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 · CodexMigrationProvider._inventory (cyclomatic 48) · ×1
  • CodexMigrationProvider._inventory (cyclomatic 48) src/qwenpaw/portability/providers/codex.py:130 — CodexMigrationProvider._inventory has cyclomatic complexity 48 (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 · ChannelDrawer.ChannelDrawer (cyclomatic 48) · ×1
  • ChannelDrawer.ChannelDrawer (cyclomatic 48) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183 — ChannelDrawer.ChannelDrawer has cyclomatic complexity 48 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (ChannelDrawer.ChannelDrawer::prepareSave, ChannelDrawer.ChannelDrawer::prepareSave::save) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.ToolsPage (cyclomatic 48) · ×1
  • index.ToolsPage (cyclomatic 48) console/src/pages/Agent/Tools/index.tsx:164 — index.ToolsPage has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 14 of the 48 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 350, a function literal at line 363, a function literal at line 204, …). 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 · MessageRenderer._message_to_presented_parts (cyclomatic 47) · ×1
  • MessageRenderer._message_to_presented_parts (cyclomatic 47) src/qwenpaw/app/channels/renderer.py:189 — MessageRenderer._message_to_presented_parts has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DependencyUpgradeManager._collect_consumers (cyclomatic 47) · ×1
  • DependencyUpgradeManager._collect_consumers (cyclomatic 47) src/qwenpaw/plugins/dependency_upgrade.py:830 — DependencyUpgradeManager._collect_consumers has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DecisionTray.DecisionTray (cyclomatic 47) · ×1
  • DecisionTray.DecisionTray (cyclomatic 47) plugins/apps/qwenpaw-creator/ui/src/components/agent/DecisionTray.tsx:77 — DecisionTray.DecisionTray has cyclomatic complexity 47 (threshold 15). Of this number, 29 points are the body's own statements and 18 belong to 13 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 · AssetsPage.assetItems (cyclomatic 47) · ×1
  • AssetsPage.assetItems (cyclomatic 47) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:303 — AssetsPage.assetItems has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 466, 413, 532, …). 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 · PendingApprovalsDrawer.PendingApprovalsDrawer (cyclomatic 46) · ×1
  • PendingApprovalsDrawer.PendingApprovalsDrawer (cyclomatic 46) console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:60 — PendingApprovalsDrawer.PendingApprovalsDrawer has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 125, handleAction, handleBatchAction, …). 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.CheckpointsPage (cyclomatic 46) · ×1
  • index.CheckpointsPage (cyclomatic 46) console/src/pages/Agent/Checkpoints/index.tsx:51 — index.CheckpointsPage has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 15 of the 46 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 82, runGc, a function literal at line 143, …). 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.ChatSearchPanel (cyclomatic 46) · ×1
  • index.ChatSearchPanel (cyclomatic 46) console/src/pages/Chat/components/ChatSearchPanel/index.tsx:60 — index.ChatSearchPanel has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 10 of the 46 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 112, 98, 195, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AgentModal.AgentModal (cyclomatic 46) · ×1
  • AgentModal.AgentModal (cyclomatic 46) console/src/pages/Settings/Agents/components/AgentModal.tsx:81 — AgentModal.AgentModal has cyclomatic complexity 46 (threshold 15). Of this number, 33 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ModelConfigEditor.ModelConfigEditor (cyclomatic 46) · ×1
  • ModelConfigEditor.ModelConfigEditor (cyclomatic 46) console/src/pages/Settings/Models/components/modals/ModelConfigEditor.tsx:35 — ModelConfigEditor.ModelConfigEditor has cyclomatic complexity 46 (threshold 15). Of this number, 17 points are the body's own statements and 29 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · vlm_model.chat_completion (cyclomatic 45) · ×1
  • vlm_model.chat_completion (cyclomatic 45) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:775 — vlm_model.chat_completion has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · source_intelligence.validated_source_analysis_versions (cyclomatic 45) · ×1
  • source_intelligence.validated_source_analysis_versions (cyclomatic 45) plugins/apps/qwenpaw-creator/backend/services/validators/source_intelligence.py:18 — source_intelligence.validated_source_analysis_versions has cyclomatic complexity 45 (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 · DingTalkChannelHandler.process (cyclomatic 45) · ×1
  • DingTalkChannelHandler.process (cyclomatic 45) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:390 — DingTalkChannelHandler.process has cyclomatic complexity 45 (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 · ToolCallControlPopover.OffloadBanner (cyclomatic 45) · ×1
  • ToolCallControlPopover.OffloadBanner (cyclomatic 45) console/src/components/Chat/ToolCards/shared/ToolCallControlPopover.tsx:79 — ToolCallControlPopover.OffloadBanner has cyclomatic complexity 45 (threshold 15). Of this number, 25 points are the body's own statements and 20 belong to 7 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 · SkillDrawer.SkillDrawer (cyclomatic 45) · ×1
  • SkillDrawer.SkillDrawer (cyclomatic 45) console/src/pages/Agent/Skills/components/SkillDrawer.tsx:53 — SkillDrawer.SkillDrawer has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 14 of the 45 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 77, a function literal at line 99, handleOptimize, …). 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 · AgentProgressOverview.AgentProgressOverview (cyclomatic 45) · ×1
  • AgentProgressOverview.AgentProgressOverview (cyclomatic 45) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentProgressOverview.tsx:214 — AgentProgressOverview.AgentProgressOverview has cyclomatic complexity 45 (threshold 15). Of this number, 24 points are the body's own statements and 21 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · creatorMessagePresentation.actionEnvelopeFromText (cyclomatic 45) · ×1
  • creatorMessagePresentation.actionEnvelopeFromText (cyclomatic 45) REDACTED:307 — creatorMessagePresentation.actionEnvelopeFromText has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · motion_design.design_motion_overlays (cyclomatic 44) · ×1
  • motion_design.design_motion_overlays (cyclomatic 44) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1636 — motion_design.design_motion_overlays has cyclomatic complexity 44 (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 · shell._execute_subprocess_sync (cyclomatic 44) · ×1
  • shell._execute_subprocess_sync (cyclomatic 44) src/qwenpaw/agents/tools/shell.py:704 — shell._execute_subprocess_sync has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependency_transaction.prepare_payload (cyclomatic 44) · ×1
  • dependency_transaction.prepare_payload (cyclomatic 44) src/qwenpaw/plugins/dependency_transaction.py:296 — dependency_transaction.prepare_payload has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.AppCenterPage (cyclomatic 44) · ×1
  • index.AppCenterPage (cyclomatic 44) console/src/pages/AppCenter/index.tsx:77 — index.AppCenterPage has cyclomatic complexity 44 (threshold 15). Of this number, 17 points are the body's own statements and 27 belong to 15 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 · MessageQueuePanel.MessageQueuePanel (cyclomatic 44) · ×1
  • MessageQueuePanel.MessageQueuePanel (cyclomatic 44) console/src/pages/Chat/components/MessageQueuePanel.tsx:40 — MessageQueuePanel.MessageQueuePanel has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 13 of the 44 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 256, 96, 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 · BlueprintScriptPanel.BlueprintScriptPanel (cyclomatic 44) · ×1
  • BlueprintScriptPanel.BlueprintScriptPanel (cyclomatic 44) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintScriptPanel.tsx:252 — BlueprintScriptPanel.BlueprintScriptPanel has cyclomatic complexity 44 (threshold 15). Of this number, 25 points are the body's own statements and 19 belong to 11 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 · SessionActions.SessionActions (cyclomatic 43) · ×1
  • SessionActions.SessionActions (cyclomatic 43) console/src/components/SessionItem/SessionActions.tsx:31 — SessionActions.SessionActions has cyclomatic complexity 43 (threshold 15). Of this number, 21 points are the body's own statements and 22 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 · TerminalDock.Dock (cyclomatic 43) · ×1
  • TerminalDock.Dock (cyclomatic 43) console/src/features/terminal/TerminalDock.tsx:112 — TerminalDock.Dock has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 192, run, a function literal at line 255, …). 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.ChatHeaderTitle (cyclomatic 43) · ×1
  • index.ChatHeaderTitle (cyclomatic 43) console/src/pages/Chat/components/ChatHeaderTitle/index.tsx:17 — index.ChatHeaderTitle has cyclomatic complexity 43 (threshold 15). Of this number, 18 points are the body's own statements and 25 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settingsSearch.settingsSearchTarget (cyclomatic 43) · ×1
  • settingsSearch.settingsSearchTarget (cyclomatic 43) console/src/pages/SettingsCenter/settingsSearch.ts:386 — settingsSearch.settingsSearchTarget has cyclomatic complexity 43 (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 · BlueprintPrepDrawer.BlueprintPrepDrawer (cyclomatic 43) · ×1
  • BlueprintPrepDrawer.BlueprintPrepDrawer (cyclomatic 43) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:670 — BlueprintPrepDrawer.BlueprintPrepDrawer 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 11 function literals inside it that branch (lines 733, 772, 875, …). 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 · model_routes.test_model_connection (cyclomatic 42) · ×1
  • model_routes.test_model_connection (cyclomatic 42) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2830 — model_routes.test_model_connection has cyclomatic complexity 42 (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 · FileCreatorAgentRuntime._queue_yolo_completion_resume (cyclomatic 42) · ×1
  • FileCreatorAgentRuntime._queue_yolo_completion_resume (cyclomatic 42) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8170 — FileCreatorAgentRuntime._queue_yolo_completion_resume has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · r2v_execution._resolve_request (cyclomatic 42) · ×1
  • r2v_execution._resolve_request (cyclomatic 42) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:1271 — r2v_execution._resolve_request has cyclomatic complexity 42 (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 · PluginLoader._load_plugin_from_path_unlocked (cyclomatic 42) · ×1
  • PluginLoader._load_plugin_from_path_unlocked (cyclomatic 42) src/qwenpaw/plugins/loader.py:3845 — PluginLoader._load_plugin_from_path_unlocked has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runtime.run (cyclomatic 42) · ×1
  • Runtime.run (cyclomatic 42) src/qwenpaw/runtime/runtime.py:54 — Runtime.run has cyclomatic complexity 42 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ApprovalCard.ApprovalCard (cyclomatic 42) · ×1
  • ApprovalCard.ApprovalCard (cyclomatic 42) console/src/components/ApprovalCard/ApprovalCard.tsx:39 — ApprovalCard.ApprovalCard has cyclomatic complexity 42 (threshold 15). Of this number, 29 points are the body's own statements and 13 belong to 7 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.TokenUsagePage (cyclomatic 42) · ×1
  • index.TokenUsagePage (cyclomatic 42) console/src/pages/Settings/TokenUsage/index.tsx:33 — index.TokenUsagePage has cyclomatic complexity 42 (threshold 15). Of this number, 17 points are the body's own statements and 25 belong to 10 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 · BlueprintStructureArea.SingleBoard (cyclomatic 42) · ×1
  • BlueprintStructureArea.SingleBoard (cyclomatic 42) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintStructureArea.tsx:135 — BlueprintStructureArea.SingleBoard has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 146, 382, 206, …). 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 · PlanPage.PlanPage (cyclomatic 42) · ×1
  • PlanPage.PlanPage (cyclomatic 42) plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:40 — PlanPage.PlanPage has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (PlanPage.PlanPage::applyElementDraft) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.Downloads (cyclomatic 42) · ×1
  • index.Downloads (cyclomatic 42) website/src/pages/Downloads/index.tsx:67 — index.Downloads has cyclomatic complexity 42 (threshold 15). Of this number, 22 points are the body's own statements and 20 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 · FfmpegLocalMediaRunner._apply_overlay (cyclomatic 41) · ×1
  • FfmpegLocalMediaRunner._apply_overlay (cyclomatic 41) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1420 — FfmpegLocalMediaRunner._apply_overlay has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectCommitRecoveryCoordinator._finalize_runtime (cyclomatic 41) · ×1
  • ProjectCommitRecoveryCoordinator._finalize_runtime (cyclomatic 41) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:983 — ProjectCommitRecoveryCoordinator._finalize_runtime has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependencies._read_installed_metadata (cyclomatic 41) · ×1
  • dependencies._read_installed_metadata (cyclomatic 41) src/qwenpaw/plugins/execution/dependencies.py:629 — dependencies._read_installed_metadata has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · api.eventsForApp (cyclomatic 41) · ×1
  • api.eventsForApp (cyclomatic 41) console/src/plugins/pawapp-sdk/api.ts:228 — api.eventsForApp has cyclomatic complexity 41 (threshold 15). Of this number, 22 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useToolCallControl.useToolCallControl (cyclomatic 41) · ×1
  • useToolCallControl.useToolCallControl (cyclomatic 41) console/src/hooks/useToolCallControl.ts:41 — useToolCallControl.useToolCallControl has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 5 of the 41 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 234, 311, 355, …). 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 · RunToolBatchCard.extractMediaFromBlocks (cyclomatic 41) · ×1
  • RunToolBatchCard.extractMediaFromBlocks (cyclomatic 41) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:222 — RunToolBatchCard.extractMediaFromBlocks has cyclomatic complexity 41 (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.startBackgroundQueue (cyclomatic 41) · ×1
  • index.startBackgroundQueue (cyclomatic 41) console/src/pages/Chat/index.tsx:388 — index.startBackgroundQueue has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 4 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 409, 559). 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 · HubModelIdentityFields.HubModelIdentityFields (cyclomatic 41) · ×1
  • HubModelIdentityFields.HubModelIdentityFields (cyclomatic 41) console/src/pages/Hub/governance/HubModelIdentityFields.tsx:20 — HubModelIdentityFields.HubModelIdentityFields has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 10 of the 41 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 152, 75, 54, …). 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 · WorkGraphScheduler._prepare_changed_prompts (cyclomatic 40) · ×1
  • WorkGraphScheduler._prepare_changed_prompts (cyclomatic 40) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:852 — WorkGraphScheduler._prepare_changed_prompts has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · manage_prd.manage_prd (cyclomatic 40) · ×1
  • manage_prd.manage_prd (cyclomatic 40) plugins/bundle/cloudpaw/tools/manage_prd.py:254 — manage_prd.manage_prd has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync.sync_sessions_to_history (cyclomatic 40) · ×1
  • sync.sync_sessions_to_history (cyclomatic 40) src/qwenpaw/agents/context/scroll/sync.py:577 — sync.sync_sessions_to_history has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doctor_fix_runner.run_doctor_fix (cyclomatic 40) · ×1
  • doctor_fix_runner.run_doctor_fix (cyclomatic 40) src/qwenpaw/cli/doctor_fix_runner.py:687 — doctor_fix_runner.run_doctor_fix has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GovernancePolicy.evaluate (cyclomatic 40) · ×1
  • GovernancePolicy.evaluate (cyclomatic 40) src/qwenpaw/governance/policy.py:702 — GovernancePolicy.evaluate has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLoader._load_plugin_unlocked (cyclomatic 40) · ×1
  • PluginLoader._load_plugin_unlocked (cyclomatic 40) src/qwenpaw/plugins/loader.py:2121 — PluginLoader._load_plugin_unlocked has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qoder_sessions.read_qoder_transcript (cyclomatic 40) · ×1
  • qoder_sessions.read_qoder_transcript (cyclomatic 40) src/qwenpaw/portability/providers/qoder_sessions.py:333 — qoder_sessions.read_qoder_transcript has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Dock.Dock (cyclomatic 40) · ×1
  • Dock.Dock (cyclomatic 40) console/src/os/Dock.tsx:26 — Dock.Dock has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 4 of the 40 points are its own statements and the rest belongs to 8 function items inside it that branch (renderApp, handlePointerMove, handlePointerEnd, …). 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 · MCPAccessModal.MCPAccessModal (cyclomatic 40) · ×1
  • MCPAccessModal.MCPAccessModal (cyclomatic 40) console/src/pages/Agent/MCP/components/MCPAccessModal.tsx:44 — MCPAccessModal.MCPAccessModal has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 6 of the 40 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 68, handleSave, a function literal at line 223, …). 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 · UserManagement.UserManagement (cyclomatic 40) · ×1
  • UserManagement.UserManagement (cyclomatic 40) console/src/pages/Hub/governance/UserManagement.tsx:56 — UserManagement.UserManagement has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 236, a function literal at line 109, saveBudget, …). 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 · MailAccessControlDrawer.MailAccessControlDrawer (cyclomatic 40) · ×1
  • MailAccessControlDrawer.MailAccessControlDrawer (cyclomatic 40) console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:85 — MailAccessControlDrawer.MailAccessControlDrawer has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 3 of the 40 points are its own statements and the rest belongs to 21 function items inside it that branch (handleAddToList, a function literal at line 241, handleBatchRemove, …). 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 · ExecutionAuthorizationCard.ExecutionAuthorizationCard (cyclomatic 40) · ×1
  • ExecutionAuthorizationCard.ExecutionAuthorizationCard (cyclomatic 40) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:292 — ExecutionAuthorizationCard.ExecutionAuthorizationCard has cyclomatic complexity 40 (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 (ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · fileProjectReviewStore.useFileProjectReviewStore.decide (cyclomatic 40) · ×1
  • fileProjectReviewStore.useFileProjectReviewStore.decide (cyclomatic 40) plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:317 — fileProjectReviewStore.useFileProjectReviewStore.decide has cyclomatic complexity 40 (threshold 15). Of this number, 25 points are the body's own statements and 15 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 · main._execute_run (cyclomatic 39) · ×1
  • main._execute_run (cyclomatic 39) plugins/apps/agent-kanban/backend/main.py:497 — main._execute_run has cyclomatic complexity 39 (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 · browser_control._action_start (cyclomatic 39) · ×1
  • browser_control._action_start (cyclomatic 39) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1806 — browser_control._action_start has cyclomatic complexity 39 (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 · AppStore.AppStore (cyclomatic 39) · ×1
  • AppStore.AppStore (cyclomatic 39) console/src/os/AppStore.tsx:58 — AppStore.AppStore has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 11 of the 39 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 383, a function literal at line 286, a function literal at line 211, …). 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.ModelSelector (cyclomatic 39) · ×1
  • index.ModelSelector (cyclomatic 39) console/src/pages/Chat/ModelSelector/index.tsx:107 — index.ModelSelector has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.ModelSelector::renderProviderModels) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · NotificationSettings.NotificationSettings (cyclomatic 39) · ×1
  • NotificationSettings.NotificationSettings (cyclomatic 39) console/src/notifications/NotificationSettings.tsx:54 — NotificationSettings.NotificationSettings has cyclomatic complexity 39 (threshold 15). Of this number, 22 points are the body's own statements and 17 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.HeartbeatPage (cyclomatic 39) · ×1
  • index.HeartbeatPage (cyclomatic 39) console/src/pages/Control/Heartbeat/index.tsx:69 — index.HeartbeatPage has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 11 of the 39 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 85, a function literal at line 150, onFinish, …). 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.EnvironmentsPage (cyclomatic 39) · ×1
  • index.EnvironmentsPage (cyclomatic 39) console/src/pages/Settings/Environments/index.tsx:75 — index.EnvironmentsPage has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 9 function items inside it that branch (saveEditor, executeRemove, a function literal at line 194, …). 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 · useSkillPool.useSkillPool.handleBroadcast (cyclomatic 39) · ×1
  • useSkillPool.useSkillPool.handleBroadcast (cyclomatic 39) console/src/pages/Settings/SkillPool/useSkillPool.tsx:556 — useSkillPool.useSkillPool.handleBroadcast has cyclomatic complexity 39 (threshold 15). Of this number, 22 points are the body's own statements and 17 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 · AgentEventFeed.AgentEventFeed (cyclomatic 39) · ×1
  • AgentEventFeed.AgentEventFeed (cyclomatic 39) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:320 — AgentEventFeed.AgentEventFeed has cyclomatic complexity 39 (threshold 15). Of this number, 19 points are the body's own statements and 20 belong to 8 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 · HomePage.HomePage (cyclomatic 39) · ×1
  • HomePage.HomePage (cyclomatic 39) plugins/apps/qwenpaw-creator/ui/src/pages/HomePage.tsx:234 — HomePage.HomePage has cyclomatic complexity 39 (threshold 15). Of this number, 16 points are the body's own statements and 23 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · projectSnapshotStore.useProjectSnapshotStore.pollOnce (cyclomatic 39) · ×1
  • projectSnapshotStore.useProjectSnapshotStore.pollOnce (cyclomatic 39) plugins/apps/qwenpaw-creator/ui/src/store/projectSnapshotStore.ts:173 — projectSnapshotStore.useProjectSnapshotStore.pollOnce has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 194, 191, 297, …). 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 · vidu.build_submit_request (cyclomatic 38) · ×1
  • vidu.build_submit_request (cyclomatic 38) plugins/apps/qwenpaw-creator/backend/models/video_backends/vidu.py:88 — vidu.build_submit_request has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProjectCommitRecoveryCoordinator._load_inputs (cyclomatic 38) · ×1
  • ProjectCommitRecoveryCoordinator._load_inputs (cyclomatic 38) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:530 — ProjectCommitRecoveryCoordinator._load_inputs has cyclomatic complexity 38 (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 · tool_adapter._policy_tool_check_permissions (cyclomatic 38) · ×1
  • tool_adapter._policy_tool_check_permissions (cyclomatic 38) src/qwenpaw/governance/tool_adapter.py:282 — tool_adapter._policy_tool_check_permissions has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · messageQueueStore.useMessageQueueStore (cyclomatic 38) · ×1
  • messageQueueStore.useMessageQueueStore (cyclomatic 38) console/src/stores/messageQueueStore.ts:486 — messageQueueStore.useMessageQueueStore 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 14 function literals inside it that branch (lines 492, 613, 722, …). 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 · RunToolBatchCard.collectRawBlocks (cyclomatic 38) · ×1
  • RunToolBatchCard.collectRawBlocks (cyclomatic 38) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:54 — RunToolBatchCard.collectRawBlocks has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · LoopModeSelector.LoopModeSelector (cyclomatic 38) · ×1
  • LoopModeSelector.LoopModeSelector (cyclomatic 38) console/src/components/LoopInput/LoopModeSelector.tsx:60 — LoopModeSelector.LoopModeSelector has cyclomatic complexity 38 (threshold 15). Of this number, 25 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.LoginPage (cyclomatic 38) · ×1
  • index.LoginPage (cyclomatic 38) console/src/pages/Login/index.tsx:20 — index.LoginPage has cyclomatic complexity 38 (threshold 15). Of this number, 22 points are the body's own statements and 16 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dependencyUpgrade.followUpgrade (cyclomatic 38) · ×1
  • dependencyUpgrade.followUpgrade (cyclomatic 38) console/src/pages/Settings/PluginManager/dependencyUpgrade.tsx:123 — dependencyUpgrade.followUpgrade has cyclomatic complexity 38 (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 · ModelConfigModal.ModelConfigModal (cyclomatic 38) · ×1
  • ModelConfigModal.ModelConfigModal (cyclomatic 38) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1012 — ModelConfigModal.ModelConfigModal has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::handleProtocolChange, ModelConfigModal.ModelConfigModal::renderFields, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TimelineLivePreview.MotionOverlayLayer (cyclomatic 38) · ×1
  • TimelineLivePreview.MotionOverlayLayer (cyclomatic 38) REDACTED:340 — TimelineLivePreview.MotionOverlayLayer has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TimelineSnapshotPanel.TimelineSnapshotPanel (cyclomatic 38) · ×1
  • TimelineSnapshotPanel.TimelineSnapshotPanel (cyclomatic 38) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSnapshotPanel.tsx:48 — TimelineSnapshotPanel.TimelineSnapshotPanel has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 241, snapshotTitle, createSnapshot, …). 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 · FfmpegLocalMediaRunner._mix_audio_tracks (cyclomatic 37) · ×1
  • FfmpegLocalMediaRunner._mix_audio_tracks (cyclomatic 37) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:723 — FfmpegLocalMediaRunner._mix_audio_tracks has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dispatch._native_request (cyclomatic 37) · ×1
  • dispatch._native_request (cyclomatic 37) plugins/bundle/computer-use/computer_use/dispatch.py:424 — dispatch._native_request has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatrixPlatform._on_room_encrypted_media_event (cyclomatic 37) · ×1
  • MatrixPlatform._on_room_encrypted_media_event (cyclomatic 37) REDACTED:2037 — MatrixPlatform._on_room_encrypted_media_event has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_tool_batch._run_steps (cyclomatic 37) · ×1
  • run_tool_batch._run_steps (cyclomatic 37) src/qwenpaw/agents/tools/run_tool_batch.py:693 — run_tool_batch._run_steps has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tool_adapter._ask_user_approval (cyclomatic 37) · ×1
  • tool_adapter._ask_user_approval (cyclomatic 37) src/qwenpaw/governance/tool_adapter.py:671 — tool_adapter._ask_user_approval has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · external_state.discover_qoder_plugins (cyclomatic 37) · ×1
  • external_state.discover_qoder_plugins (cyclomatic 37) src/qwenpaw/portability/providers/external_state.py:881 — external_state.discover_qoder_plugins has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QoderMigrationProvider.inventory (cyclomatic 37) · ×1
  • QoderMigrationProvider.inventory (cyclomatic 37) src/qwenpaw/portability/providers/qoder.py:74 — QoderMigrationProvider.inventory has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DurationWheel.DurationColumn (cyclomatic 37) · ×1
  • DurationWheel.DurationColumn (cyclomatic 37) console/src/components/interaction/DurationWheel.tsx:9 — DurationWheel.DurationColumn has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 8 function items inside it that branch (finishDrag, a function literal at line 177, a function literal at line 36, …). 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 · GitPanel.GitPanel (cyclomatic 37) · ×1
  • GitPanel.GitPanel (cyclomatic 37) console/src/pages/Coding/GitPanel.tsx:66 — GitPanel.GitPanel has cyclomatic complexity 37 (threshold 15). Of this number, 17 points are the body's own statements and 20 belong to 11 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · model_routes._probe_payload (cyclomatic 36) · ×1
  • model_routes._probe_payload (cyclomatic 36) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2647 — model_routes._probe_payload has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · document_reader._read_document_sync (cyclomatic 36) · ×1
  • document_reader._read_document_sync (cyclomatic 36) plugins/apps/qwenpaw-creator/backend/services/document_reader.py:123 — document_reader._read_document_sync has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileCreatorAgentRuntime._promote_grounding_visuals_sync (cyclomatic 36) · ×1
  • FileCreatorAgentRuntime._promote_grounding_visuals_sync (cyclomatic 36) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5139 — FileCreatorAgentRuntime._promote_grounding_visuals_sync has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileImageExecutionService.execute (cyclomatic 36) · ×1
  • FileImageExecutionService.execute (cyclomatic 36) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1865 — FileImageExecutionService.execute has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodexBackend._convert_notification (cyclomatic 36) · ×1
  • CodexBackend._convert_notification (cyclomatic 36) plugins/harness/codex/adapter.py:977 — CodexBackend._convert_notification has cyclomatic complexity 36 (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 · BaseChannel._stream_with_tracker (cyclomatic 36) · ×1
  • BaseChannel._stream_with_tracker (cyclomatic 36) src/qwenpaw/app/channels/base.py:888 — BaseChannel._stream_with_tracker has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PawApp._dispatch (cyclomatic 36) · ×1
  • PawApp._dispatch (cyclomatic 36) src/qwenpaw/cli/tui/app.py:931 — PawApp._dispatch has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackendExecution._produce (cyclomatic 36) · ×1
  • BackendExecution._produce (cyclomatic 36) src/qwenpaw/runtime/backends/execution.py:467 — BackendExecution._produce has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.ConsolePollService (cyclomatic 36) · ×1
  • index.ConsolePollService (cyclomatic 36) console/src/components/ConsolePollService/index.tsx:30 — index.ConsolePollService has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 73, 118, 206, …). 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 · MCPOAuthSection.MCPOAuthSection (cyclomatic 36) · ×1
  • MCPOAuthSection.MCPOAuthSection (cyclomatic 36) console/src/pages/Agent/MCP/components/MCPOAuthSection.tsx:50 — MCPOAuthSection.MCPOAuthSection has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body's own statements and 12 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 · index.SettingsPanel (cyclomatic 36) · ×1
  • index.SettingsPanel (cyclomatic 36) console/src/pages/Hub/index.tsx:1311 — index.SettingsPanel has cyclomatic complexity 36 (threshold 15). Of this number, 29 points are the body's own statements and 7 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 · SelectionToolbar.SelectionToolbar (cyclomatic 36) · ×1
  • SelectionToolbar.SelectionToolbar (cyclomatic 36) plugins/apps/qwenpaw-creator/ui/src/components/agent/SelectionToolbar.tsx:78 — SelectionToolbar.SelectionToolbar has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 87, 174, 222, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · FileCreatorAgentRuntime._reconcile_project (cyclomatic 35) · ×1
  • FileCreatorAgentRuntime._reconcile_project (cyclomatic 35) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:2463 — FileCreatorAgentRuntime._reconcile_project has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrollContextManager.compress (cyclomatic 35) · ×1
  • ScrollContextManager.compress (cyclomatic 35) src/qwenpaw/agents/context/scroll/manager.py:465 — ScrollContextManager.compress has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · browser_control._action_click (cyclomatic 35) · ×1
  • browser_control._action_click (cyclomatic 35) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2402 — browser_control._action_click has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · file_search._walk_and_grep (cyclomatic 35) · ×1
  • file_search._walk_and_grep (cyclomatic 35) src/qwenpaw/agents/tools/file_search.py:384 — file_search._walk_and_grep has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLoader._acquire_dependency_wheels (cyclomatic 35) · ×1
  • PluginLoader._acquire_dependency_wheels (cyclomatic 35) src/qwenpaw/plugins/loader.py:1326 — PluginLoader._acquire_dependency_wheels has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sidebar.Sidebar (cyclomatic 35) · ×1
  • Sidebar.Sidebar (cyclomatic 35) console/src/layouts/Sidebar.tsx:119 — Sidebar.Sidebar has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Sidebar.Sidebar::handleUpdateProfile) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.CronJobsPage · ×1
  • index.CronJobsPage::handleSubmit (cyclomatic 35) console/src/pages/Control/CronJobs/index.tsx:392 — index.CronJobsPage::handleSubmit has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · monitor.installStartupMonitor (cyclomatic 35) · ×1
  • monitor.installStartupMonitor (cyclomatic 35) console/src/startup/monitor.ts:45 — monitor.installStartupMonitor has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (fail, onError, showFailure, …). 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 · FileProjectReviewPanel.FileProjectReviewPanel (cyclomatic 35) · ×1
  • FileProjectReviewPanel.FileProjectReviewPanel (cyclomatic 35) plugins/apps/qwenpaw-creator/ui/src/components/agent/FileProjectReviewPanel.tsx:115 — FileProjectReviewPanel.FileProjectReviewPanel has cyclomatic complexity 35 (threshold 15). Of this number, 16 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · reviewFocus.useReviewFieldFocus (cyclomatic 35) · ×1
  • reviewFocus.useReviewFieldFocus (cyclomatic 35) plugins/apps/qwenpaw-creator/ui/src/routing/reviewFocus.ts:222 — reviewFocus.useReviewFieldFocus has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 349, 366, 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 · model_routes._validate_section_connectivity (cyclomatic 34) · ×1
  • model_routes._validate_section_connectivity (cyclomatic 34) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:938 — model_routes._validate_section_connectivity has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · edit_impact._apply_element_path (cyclomatic 34) · ×1
  • edit_impact._apply_element_path (cyclomatic 34) plugins/apps/qwenpaw-creator/backend/services/project_files/edit_impact.py:357 — edit_impact._apply_element_path has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DataBridgeMiddleware.on_reply (cyclomatic 34) · ×1
  • DataBridgeMiddleware.on_reply (cyclomatic 34) plugins/apps/qwenpaw-data/backend/bridge/middleware.py:123 — DataBridgeMiddleware.on_reply has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DiscordPlatform._on_message (cyclomatic 34) · ×1
  • DiscordPlatform._on_message (cyclomatic 34) plugins/channel/discord/qwenpaw_channel_discord/platform.py:158 — DiscordPlatform._on_message has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · migration._do_migrate_legacy_skills (cyclomatic 34) · ×1
  • migration._do_migrate_legacy_skills (cyclomatic 34) src/qwenpaw/app/migration.py:339 — migration._do_migrate_legacy_skills has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalize.normalize_update (cyclomatic 34) · ×1
  • normalize.normalize_update (cyclomatic 34) src/qwenpaw/cli/tui/normalize.py:217 — normalize.normalize_update has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · channel_env.read_channel_env (cyclomatic 34) · ×1
  • channel_env.read_channel_env (cyclomatic 34) src/qwenpaw/config/channel_env.py:7 — channel_env.read_channel_env has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenAIChatModelCompat._parse_stream_response (cyclomatic 34) · ×1
  • OpenAIChatModelCompat._parse_stream_response (cyclomatic 34) src/qwenpaw/providers/openai_chat_model_compat.py:968 — OpenAIChatModelCompat._parse_stream_response has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Discussion.AnswerCard (cyclomatic 34) · ×1
  • Discussion.AnswerCard (cyclomatic 34) console/src/pages/Market/Community/Discussion.tsx:837 — Discussion.AnswerCard has cyclomatic complexity 34 (threshold 15). Of this number, 17 points are the body's own statements and 17 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 · OfficialPluginList.OfficialPluginList (cyclomatic 34) · ×1
  • OfficialPluginList.OfficialPluginList (cyclomatic 34) console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:59 — OfficialPluginList.OfficialPluginList has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (renderInstallButton, a function literal at line 100, renderUninstallButton, …). 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 · Post.BlogPost (cyclomatic 34) · ×1
  • Post.BlogPost (cyclomatic 34) website/src/pages/Blog/Post.tsx:61 — Post.BlogPost has cyclomatic complexity 34 (threshold 15). Of this number, 16 points are the body's own statements and 18 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 · FileCreatorAgentRuntime._invoke_specialist_tool (cyclomatic 33) · ×1
  • FileCreatorAgentRuntime._invoke_specialist_tool (cyclomatic 33) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6861 — FileCreatorAgentRuntime._invoke_specialist_tool has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verification.verify_visual_grounding_with_vlm (cyclomatic 33) · ×1
  • verification.verify_visual_grounding_with_vlm (cyclomatic 33) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:182 — verification.verify_visual_grounding_with_vlm has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent_management._spawn_forked_subagent (cyclomatic 33) · ×1
  • agent_management._spawn_forked_subagent (cyclomatic 33) src/qwenpaw/agents/tools/agent_management.py:1601 — agent_management._spawn_forked_subagent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLifecycle._update_config_transaction (cyclomatic 33) · ×1
  • PluginLifecycle._update_config_transaction (cyclomatic 33) src/qwenpaw/plugins/lifecycle.py:759 — PluginLifecycle._update_config_transaction has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wheel_additions.validate_additions (cyclomatic 33) · ×1
  • wheel_additions.validate_additions (cyclomatic 33) src/qwenpaw/plugins/wheel_additions.py:469 — wheel_additions.validate_additions has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · task.createPawTaskWithScope (cyclomatic 33) · ×1
  • task.createPawTaskWithScope (cyclomatic 33) console/src/plugins/pawapp-sdk/task.ts:18 — task.createPawTaskWithScope has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 87, emit, finalize, …). 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 · osNotifyStore.useOsNotify (cyclomatic 33) · ×1
  • osNotifyStore.useOsNotify (cyclomatic 33) console/src/os/osNotifyStore.ts:77 — osNotifyStore.useOsNotify has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 87, 197, 193, …). 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 · FilesNavigator.FilesNavigator (cyclomatic 33) · ×1
  • FilesNavigator.FilesNavigator (cyclomatic 33) console/src/features/files-workspace/FilesNavigator.tsx:511 — FilesNavigator.FilesNavigator has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (FilesNavigator.FilesNavigator::handleTreeKeyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · QuoteSelection.QuoteSelection (cyclomatic 33) · ×1
  • QuoteSelection.QuoteSelection (cyclomatic 33) console/src/pages/Chat/QuoteSelection.tsx:13 — QuoteSelection.QuoteSelection has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 36, a function literal at line 103, quote, …). 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 · model_routes._assemble_model_config (cyclomatic 32) · ×1
  • model_routes._assemble_model_config (cyclomatic 32) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:363 — model_routes._assemble_model_config 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 · informal_launch_template.render_informal_launch_caption (cyclomatic 32) · ×1
  • informal_launch_template.render_informal_launch_caption (cyclomatic 32) plugins/apps/qwenpaw-creator/backend/services/media_files/informal_launch_template.py:361 — informal_launch_template.render_informal_launch_caption 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 · SourceMediaAnalysisService._prepare_sync (cyclomatic 32) · ×1
  • SourceMediaAnalysisService._prepare_sync (cyclomatic 32) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:1703 — SourceMediaAnalysisService._prepare_sync 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 · model_factory._fixup_media_list (cyclomatic 32) · ×1
  • model_factory._fixup_media_list (cyclomatic 32) src/qwenpaw/agents/model_factory.py:1509 — model_factory._fixup_media_list 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 · cdp_tree._text_by_backend (cyclomatic 32) · ×1
  • cdp_tree._text_by_backend (cyclomatic 32) src/qwenpaw/browser/control_link/cdp_tree.py:37 — cdp_tree._text_by_backend 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 · DependencyUpgradeManager.stage (cyclomatic 32) · ×1
  • DependencyUpgradeManager.stage (cyclomatic 32) src/qwenpaw/plugins/dependency_upgrade.py:1642 — DependencyUpgradeManager.stage 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 · compatibility_testing._validate_plugin_api_calls (cyclomatic 32) · ×1
  • compatibility_testing._validate_plugin_api_calls (cyclomatic 32) src/qwenpaw/portability/compatibility_testing.py:367 — compatibility_testing._validate_plugin_api_calls 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 · MemoryTagsNavigator.MemoryTagsNavigator (cyclomatic 32) · ×1
  • MemoryTagsNavigator.MemoryTagsNavigator (cyclomatic 32) console/src/features/files-workspace/MemoryTagsNavigator.tsx:29 — MemoryTagsNavigator.MemoryTagsNavigator has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 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 · index.useMessageHistoryNavigation (cyclomatic 32) · ×1
  • index.useMessageHistoryNavigation (cyclomatic 32) console/src/pages/Chat/index.tsx:992 — index.useMessageHistoryNavigation has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 1063, a function literal at line 1004, findMessageInDirection, …). 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 · parseCron.parseCron (cyclomatic 32) · ×1
  • parseCron.parseCron (cyclomatic 32) console/src/pages/Control/CronJobs/components/parseCron.ts:63 — parseCron.parseCron 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 · useCronJobs.useCronJobs.getDisplayErrorMessage (cyclomatic 32) · ×1
  • useCronJobs.useCronJobs.getDisplayErrorMessage (cyclomatic 32) console/src/pages/Control/CronJobs/useCronJobs.ts:73 — useCronJobs.useCronJobs.getDisplayErrorMessage has cyclomatic complexity 32 (threshold 15). Of this number, 24 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 · ArticleTocCard.ArticleToc (cyclomatic 32) · ×1
  • ArticleTocCard.ArticleToc (cyclomatic 32) console/src/pages/Market/Community/ArticleTocCard.tsx:21 — ArticleTocCard.ArticleToc has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 55, revealActive, a function literal at line 126, …). 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 · WorksForYou.WorksForYou (cyclomatic 32) · ×1
  • WorksForYou.WorksForYou (cyclomatic 32) website/src/pages/Home/components/WorksForYou.tsx:83 — WorksForYou.WorksForYou has cyclomatic complexity 32 (threshold 15). 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 items inside it that branch (a function literal at line 290, a function literal at line 164, a function literal at line 143, …). 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 · ProjectCommitRecoveryCoordinator._recover_entry (cyclomatic 31) · ×1
  • ProjectCommitRecoveryCoordinator._recover_entry (cyclomatic 31) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:286 — ProjectCommitRecoveryCoordinator._recover_entry has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlackEventHandler._handle_event (cyclomatic 31) · ×1
  • SlackEventHandler._handle_event (cyclomatic 31) plugins/channel/slack/qwenpaw_channel_slack/handler.py:144 — SlackEventHandler._handle_event 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 · DependencySnapshot.from_mapping (cyclomatic 31) · ×1
  • DependencySnapshot.from_mapping (cyclomatic 31) src/qwenpaw/plugins/execution/dependencies.py:95 — DependencySnapshot.from_mapping has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qoder_schedules._normalize_task (cyclomatic 31) · ×1
  • qoder_schedules._normalize_task (cyclomatic 31) src/qwenpaw/portability/providers/qoder_schedules.py:274 — qoder_schedules._normalize_task 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 · qoder_plugin_adapter.discover_qoder_custom_skill_adapter (cyclomatic 31) · ×1
  • qoder_plugin_adapter.discover_qoder_custom_skill_adapter (cyclomatic 31) src/qwenpaw/portability/qoder_plugin_adapter.py:70 — qoder_plugin_adapter.discover_qoder_custom_skill_adapter has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rule_guardian._extract_rm_targets (cyclomatic 31) · ×1
  • rule_guardian._extract_rm_targets (cyclomatic 31) src/qwenpaw/security/tool_guard/guardians/rule_guardian.py:209 — rule_guardian._extract_rm_targets has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSkills.useSkills.importFromHub (cyclomatic 31) · ×1
  • useSkills.useSkills.importFromHub (cyclomatic 31) console/src/pages/Agent/Skills/useSkills.ts:360 — useSkills.useSkills.importFromHub has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentEventFeed.EventCard (cyclomatic 31) · ×1
  • AgentEventFeed.EventCard (cyclomatic 31) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:167 — AgentEventFeed.EventCard has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlueprintPrepDrawer.VisualDetail (cyclomatic 31) · ×1
  • BlueprintPrepDrawer.VisualDetail (cyclomatic 31) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:93 — BlueprintPrepDrawer.VisualDetail has cyclomatic complexity 31 (threshold 15). Of this number, 20 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · source_intelligence.parse_source_intelligence_files (cyclomatic 30) · ×1
  • source_intelligence.parse_source_intelligence_files (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:475 — source_intelligence.parse_source_intelligence_files 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 · local_execution._timeline_execution (cyclomatic 30) · ×1
  • local_execution._timeline_execution (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3082 — local_execution._timeline_execution 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 · motion_overlay.prepare_motion_layer (cyclomatic 30) · ×1
  • motion_overlay.prepare_motion_layer (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1708 — motion_overlay.prepare_motion_layer 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 · FileR2VExecutionService._drive_until_idle (cyclomatic 30) · ×1
  • FileR2VExecutionService._drive_until_idle (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3029 — FileR2VExecutionService._drive_until_idle 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 · status_projection.build_agent_status_bar (cyclomatic 30) · ×1
  • status_projection.build_agent_status_bar (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py:248 — status_projection.build_agent_status_bar has cyclomatic complexity 30 (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 · search.search_visual_refs (cyclomatic 30) · ×1
  • search.search_visual_refs (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/search.py:386 — search.search_visual_refs 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 · visual_jobs._expand_visual_query_jobs (cyclomatic 30) · ×1
  • visual_jobs._expand_visual_query_jobs (cyclomatic 30) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:448 — visual_jobs._expand_visual_query_jobs 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 · build_example_archive._materialize_remote_source_clips (cyclomatic 30) · ×1
  • build_example_archive._materialize_remote_source_clips (cyclomatic 30) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:223 — build_example_archive._materialize_remote_source_clips 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 · fork_project.forks_merged_into_head (cyclomatic 30) · ×1
  • fork_project.forks_merged_into_head (cyclomatic 30) src/qwenpaw/agents/fork_project.py:1564 — fork_project.forks_merged_into_head 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 · hub._http_fetch (cyclomatic 30) · ×1
  • hub._http_fetch (cyclomatic 30) src/qwenpaw/agents/skill_system/hub.py:490 — hub._http_fetch 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 · hub._fetch_bundle_from_repo_and_skill_hint (cyclomatic 30) · ×1
  • hub._fetch_bundle_from_repo_and_skill_hint (cyclomatic 30) src/qwenpaw/agents/skill_system/hub.py:1421 — hub._fetch_bundle_from_repo_and_skill_hint 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 · catalog.config_fields (cyclomatic 30) · ×1
  • catalog.config_fields (cyclomatic 30) src/qwenpaw/app/channels/catalog.py:39 — catalog.config_fields 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 · PluginLoader._rollback_reload (cyclomatic 30) · ×1
  • PluginLoader._rollback_reload (cyclomatic 30) src/qwenpaw/plugins/loader.py:3341 — PluginLoader._rollback_reload has cyclomatic complexity 30 (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 · SessionApi.applyChatsToSessionList (cyclomatic 30) · ×1
  • SessionApi.applyChatsToSessionList (cyclomatic 30) console/src/pages/Chat/sessionApi/index.ts:1334 — SessionApi.applyChatsToSessionList has cyclomatic complexity 30 (threshold 15). Of this number, 21 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useSkillsPage.useSkillsPage.handleDownloadFromPool (cyclomatic 30) · ×1
  • useSkillsPage.useSkillsPage.handleDownloadFromPool (cyclomatic 30) console/src/pages/Agent/Skills/useSkillsPage.tsx:642 — useSkillsPage.useSkillsPage.handleDownloadFromPool has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body's own statements and 15 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 · DraftLibrary.DraftLibrary (cyclomatic 30) · ×1
  • DraftLibrary.DraftLibrary (cyclomatic 30) console/src/pages/CommunityFeedback/DraftLibrary.tsx:12 — DraftLibrary.DraftLibrary has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 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.SessionsPage (cyclomatic 30) · ×1
  • index.SessionsPage (cyclomatic 30) console/src/pages/Control/Sessions/index.tsx:31 — index.SessionsPage has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 96, a function literal at line 381, handleBatchArchive, …). 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 · creatorSessionStore.useCreatorSessionStore.bootstrap (cyclomatic 30) · ×1
  • creatorSessionStore.useCreatorSessionStore.bootstrap (cyclomatic 30) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:636 — creatorSessionStore.useCreatorSessionStore.bootstrap has cyclomatic complexity 30 (threshold 15). Of this number, 18 points are the body's own statements and 12 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 · FileLocalMediaExecutionService.execute (cyclomatic 29) · ×1
  • FileLocalMediaExecutionService.execute (cyclomatic 29) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3690 — FileLocalMediaExecutionService.execute has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectReviewService._rejection_targets (cyclomatic 29) · ×1
  • ProjectReviewService._rejection_targets (cyclomatic 29) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1502 — ProjectReviewService._rejection_targets has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OneBotPlatform._stop_ws_server (cyclomatic 29) · ×1
  • OneBotPlatform._stop_ws_server (cyclomatic 29) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:506 — OneBotPlatform._stop_ws_server has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WeComPlatform.send_parts (cyclomatic 29) · ×1
  • WeComPlatform.send_parts (cyclomatic 29) REDACTED:900 — WeComPlatform.send_parts has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · YuanbaoPlatform._handle_chat_message (cyclomatic 29) · ×1
  • YuanbaoPlatform._handle_chat_message (cyclomatic 29) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:709 — YuanbaoPlatform._handle_chat_message has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _EnvelopeTracker.process (cyclomatic 29) · ×1
  • _EnvelopeTracker.process (cyclomatic 29) src/qwenpaw/agents/acp/server.py:261 — _EnvelopeTracker.process has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseChannel._access_control_gate (cyclomatic 29) · ×1
  • BaseChannel._access_control_gate (cyclomatic 29) src/qwenpaw/app/channels/base.py:378 — BaseChannel._access_control_gate has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Provider.get_agent_thinking_kwargs (cyclomatic 29) · ×1
  • Provider.get_agent_thinking_kwargs (cyclomatic 29) src/qwenpaw/providers/provider.py:894 — Provider.get_agent_thinking_kwargs has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useToolCallControl.useToolCallControl.startLocalCountdown (cyclomatic 29) · ×1
  • useToolCallControl.useToolCallControl.startLocalCountdown (cyclomatic 29) console/src/hooks/useToolCallControl.ts:105 — useToolCallControl.useToolCallControl.startLocalCountdown has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 119, 130, 167). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.RuntimeAvailabilityGuard (cyclomatic 29) · ×1
  • App.RuntimeAvailabilityGuard (cyclomatic 29) console/src/App.tsx:197 — App.RuntimeAvailabilityGuard has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 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 · ResourcePicker.ResourcePicker (cyclomatic 29) · ×1
  • ResourcePicker.ResourcePicker (cyclomatic 29) console/src/pages/CommunityFeedback/ResourcePicker.tsx:33 — ResourcePicker.ResourcePicker has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 53, 229, 137, …). 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 · timelines.duplicateTimelineOperations (cyclomatic 29) · ×1
  • timelines.duplicateTimelineOperations (cyclomatic 29) plugins/apps/qwenpaw-creator/ui/src/api/creator/timelines.ts:98 — timelines.duplicateTimelineOperations has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 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 · AgentDock.ConversationMessage (cyclomatic 29) · ×1
  • AgentDock.ConversationMessage (cyclomatic 29) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:448 — AgentDock.ConversationMessage has cyclomatic complexity 29 (threshold 15). Of this number, 27 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 · AgentDock.AgentDock · ×1
  • AgentDock.AgentDock::submit (cyclomatic 29) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1852 — AgentDock.AgentDock::submit has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (AgentDock.AgentDock) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PromptEditorModal.PromptEditorModal (cyclomatic 29) · ×1
  • PromptEditorModal.PromptEditorModal (cyclomatic 29) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptEditorModal.tsx:37 — PromptEditorModal.PromptEditorModal has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · locatorTargets.resolveCreatorLocator (cyclomatic 29) · ×1
  • locatorTargets.resolveCreatorLocator (cyclomatic 29) plugins/apps/qwenpaw-creator/ui/src/routing/locatorTargets.ts:4 — locatorTargets.resolveCreatorLocator has cyclomatic complexity 29 (threshold 15). Of this number, 28 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 · ReleaseNotes.ReleaseNotes (cyclomatic 29) · ×1
  • ReleaseNotes.ReleaseNotes (cyclomatic 29) website/src/pages/ReleaseNotes.tsx:16 — ReleaseNotes.ReleaseNotes has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 34, a function literal at line 218, handleVersionClick, …). 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 · WorkGraphScheduler.tick (cyclomatic 28) · ×1
  • WorkGraphScheduler.tick (cyclomatic 28) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:597 — WorkGraphScheduler.tick has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SourceMemoryService.query_memory (cyclomatic 28) · ×1
  • SourceMemoryService.query_memory (cyclomatic 28) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1750 — SourceMemoryService.query_memory has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · prompt_contract.check_changed_r2v_prompt_contracts (cyclomatic 28) · ×1
  • prompt_contract.check_changed_r2v_prompt_contracts (cyclomatic 28) plugins/apps/qwenpaw-creator/backend/services/run_review/prompt_contract.py:314 — prompt_contract.check_changed_r2v_prompt_contracts has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectExecutionStore.append_task_attempt (cyclomatic 28) · ×1
  • ProjectExecutionStore.append_task_attempt (cyclomatic 28) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:837 — ProjectExecutionStore.append_task_attempt has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QQPlatform._message (cyclomatic 28) · ×1
  • QQPlatform._message (cyclomatic 28) plugins/channel/qq/qwenpaw_channel_qq/platform.py:804 — QQPlatform._message has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentStatsService.get_summary (cyclomatic 28) · ×1
  • AgentStatsService.get_summary (cyclomatic 28) src/qwenpaw/agent_stats/service.py:276 — AgentStatsService.get_summary has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · renderer._render_dense_atlas_page (cyclomatic 28) · ×1
  • renderer._render_dense_atlas_page (cyclomatic 28) src/qwenpaw/agents/context/visual_compression/rendering/renderer.py:596 — renderer._render_dense_atlas_page has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shell.execute_shell_command (cyclomatic 28) · ×1
  • shell.execute_shell_command (cyclomatic 28) src/qwenpaw/agents/tools/shell.py:1425 — shell.execute_shell_command has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseChannel.send_content_parts (cyclomatic 28) · ×1
  • BaseChannel.send_content_parts (cyclomatic 28) src/qwenpaw/app/channels/base.py:2237 — BaseChannel.send_content_parts has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · community_drafts._rich_markdown (cyclomatic 28) · ×1
  • community_drafts._rich_markdown (cyclomatic 28) src/qwenpaw/app/community_drafts.py:233 — community_drafts._rich_markdown has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CronExecutor.execute (cyclomatic 28) · ×1
  • CronExecutor.execute (cyclomatic 28) src/qwenpaw/app/crons/executor.py:118 — CronExecutor.execute has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · completed_text.project_completed_text (cyclomatic 28) · ×1
  • completed_text.project_completed_text (cyclomatic 28) src/qwenpaw/channel_protocol/completed_text.py:142 — completed_text.project_completed_text has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PawApp.register (cyclomatic 28) · ×1
  • PawApp.register (cyclomatic 28) src/qwenpaw/pawapp/app.py:858 — PawApp.register has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · channel_bootstrap.runtime_manifest (cyclomatic 28) · ×1
  • channel_bootstrap.runtime_manifest (cyclomatic 28) src/qwenpaw/plugins/channel_bootstrap.py:61 — channel_bootstrap.runtime_manifest has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dependency_gate.evaluate_shared_dependencies (cyclomatic 28) · ×1
  • dependency_gate.evaluate_shared_dependencies (cyclomatic 28) src/qwenpaw/plugins/dependency_gate.py:562 — dependency_gate.evaluate_shared_dependencies has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependency_gate.prepare_shared_dependencies (cyclomatic 28) · ×1
  • dependency_gate.prepare_shared_dependencies (cyclomatic 28) src/qwenpaw/plugins/dependency_gate.py:704 — dependency_gate.prepare_shared_dependencies has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DependencyUpgradeManager._prepare_payload (cyclomatic 28) · ×1
  • DependencyUpgradeManager._prepare_payload (cyclomatic 28) src/qwenpaw/plugins/dependency_upgrade.py:1458 — DependencyUpgradeManager._prepare_payload has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLoader._uninstall_without_instance (cyclomatic 28) · ×1
  • PluginLoader._uninstall_without_instance (cyclomatic 28) src/qwenpaw/plugins/loader.py:4950 — PluginLoader._uninstall_without_instance has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cache_policy.cache_request (cyclomatic 28) · ×1
  • cache_policy.cache_request (cyclomatic 28) src/qwenpaw/providers/adapters/cache_policy.py:10 — cache_policy.cache_request has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebSearchConfigModal.WebSearchConfigModal (cyclomatic 28) · ×1
  • WebSearchConfigModal.WebSearchConfigModal (cyclomatic 28) console/src/pages/Agent/Tools/WebSearchConfigModal.tsx:36 — WebSearchConfigModal.WebSearchConfigModal has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 62, 116, 130, …). 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 · traceUtils.buildTraceDisplayItems (cyclomatic 28) · ×1
  • traceUtils.buildTraceDisplayItems (cyclomatic 28) console/src/pages/Inbox/utils/traceUtils.ts:248 — traceUtils.buildTraceDisplayItems has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent 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 · InstalledPluginList.InstalledPluginList (cyclomatic 28) · ×1
  • InstalledPluginList.InstalledPluginList (cyclomatic 28) console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:47 — InstalledPluginList.InstalledPluginList has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (renderActivation, renderUpdateAction, a function literal at line 186, …). 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 · useSkillPool.useSkillPool.handleSavePoolSkill (cyclomatic 28) · ×1
  • useSkillPool.useSkillPool.handleSavePoolSkill (cyclomatic 28) console/src/pages/Settings/SkillPool/useSkillPool.tsx:923 — useSkillPool.useSkillPool.handleSavePoolSkill has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelBadges.ModelBadges · ×1
  • ModelBadges.ModelBadges::status (cyclomatic 28) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelBadges.tsx:55 — ModelBadges.ModelBadges::status has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · R2VWorkbenchPage.WorkbenchSurface · ×1
  • R2VWorkbenchPage.WorkbenchSurface::regenerateNode (cyclomatic 28) plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:764 — R2VWorkbenchPage.WorkbenchSurface::regenerateNode has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (R2VWorkbenchPage.WorkbenchSurface) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · smoke_web_grounding.evaluate_result (cyclomatic 27) · ×1
  • smoke_web_grounding.evaluate_result (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:88 — smoke_web_grounding.evaluate_result has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model_context.prepare_model_messages (cyclomatic 27) · ×1
  • model_context.prepare_model_messages (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_context.py:253 — model_context.prepare_model_messages has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileLocalMediaExecutionService._prepare_spec (cyclomatic 27) · ×1
  • FileLocalMediaExecutionService._prepare_spec (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4184 — FileLocalMediaExecutionService._prepare_spec has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · protocol.parse_review_report (cyclomatic 27) · ×1
  • protocol.parse_review_report (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/services/render_review/protocol.py:224 — protocol.parse_review_report has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · service.recover_interrupted_source_analysis (cyclomatic 27) · ×1
  • service.recover_interrupted_source_analysis (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2638 — service.recover_interrupted_source_analysis has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verification._normalized_visual_verification (cyclomatic 27) · ×1
  • verification._normalized_visual_verification (cyclomatic 27) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:57 — verification._normalized_visual_verification has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · platform._build_content_parts_from_message (cyclomatic 27) · ×1
  • platform._build_content_parts_from_message (cyclomatic 27) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:202 — platform._build_content_parts_from_message has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChannelManagementService.execute (cyclomatic 27) · ×1
  • ChannelManagementService.execute (cyclomatic 27) src/qwenpaw/app/channels/management.py:109 — ChannelManagementService.execute has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChannelQRCodeSessions.poll (cyclomatic 27) · ×1
  • ChannelQRCodeSessions.poll (cyclomatic 27) src/qwenpaw/app/channels/qrcode_sessions.py:642 — ChannelQRCodeSessions.poll has cyclomatic complexity 27 (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 · utils._build_media_message_from_block (cyclomatic 27) · ×1
  • utils._build_media_message_from_block (cyclomatic 27) src/qwenpaw/app/chats/utils.py:397 — utils._build_media_message_from_block has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · community_connection.normalize_message (cyclomatic 27) · ×1
  • community_connection.normalize_message (cyclomatic 27) src/qwenpaw/app/community_connection.py:168 — community_connection.normalize_message has cyclomatic complexity 27 (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 · tools.update_tool_config (cyclomatic 27) · ×1
  • tools.update_tool_config (cyclomatic 27) src/qwenpaw/app/routers/tools.py:470 — tools.update_tool_config has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doctor_checks.check_enabled_agents_model_connections (cyclomatic 27) · ×1
  • doctor_checks.check_enabled_agents_model_connections (cyclomatic 27) src/qwenpaw/cli/doctor_checks.py:1132 — doctor_checks.check_enabled_agents_model_connections has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model_catalog.update_model_metadata (cyclomatic 27) · ×1
  • model_catalog.update_model_metadata (cyclomatic 27) REDACTED:541 — model_catalog.update_model_metadata has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentBuilder.build (cyclomatic 27) · ×1
  • AgentBuilder.build (cyclomatic 27) src/qwenpaw/runtime/builder.py:334 — AgentBuilder.build has cyclomatic complexity 27 (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 · request.request (cyclomatic 27) · ×1
  • request.request (cyclomatic 27) console/src/api/request.ts:107 — request.request has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useChannelQrcode.useChannelQrcode.fetchQrcode (cyclomatic 27) · ×1
  • useChannelQrcode.useChannelQrcode.fetchQrcode (cyclomatic 27) console/src/pages/Control/Channels/components/useChannelQrcode.ts:118 — useChannelQrcode.useChannelQrcode.fetchQrcode has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (schedulePoll, a function literal at line 155, a function literal at line 184, …). 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.SessionGroupHeader (cyclomatic 27) · ×1
  • index.SessionGroupHeader (cyclomatic 27) console/src/components/SessionGroupHeader/index.tsx:34 — index.SessionGroupHeader has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ThinkingIndicator.ThinkingIndicator (cyclomatic 27) · ×1
  • ThinkingIndicator.ThinkingIndicator (cyclomatic 27) console/src/features/thinking/ThinkingIndicator.tsx:10 — ThinkingIndicator.ThinkingIndicator 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, separate the cases: extract each independent 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 · ApprovalLevelToggle.ApprovalLevelToggle (cyclomatic 27) · ×1
  • ApprovalLevelToggle.ApprovalLevelToggle (cyclomatic 27) console/src/pages/Chat/components/ApprovalLevelToggle.tsx:57 — ApprovalLevelToggle.ApprovalLevelToggle has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 109, 230, 74, …). 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 · ModelUsage.ModelUsage (cyclomatic 27) · ×1
  • ModelUsage.ModelUsage (cyclomatic 27) console/src/pages/Hub/governance/ModelUsage.tsx:24 — ModelUsage.ModelUsage has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 42, 67, 103, …). 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 · useInboxData.mapEventToPushMessage (cyclomatic 27) · ×1
  • useInboxData.mapEventToPushMessage (cyclomatic 27) console/src/pages/Inbox/hooks/useInboxData.ts:173 — useInboxData.mapEventToPushMessage has cyclomatic complexity 27 (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.AgentStatsPage (cyclomatic 27) · ×1
  • index.AgentStatsPage (cyclomatic 27) console/src/pages/Settings/AgentStats/index.tsx:107 — index.AgentStatsPage has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 8 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 · BlueprintRoughCutStrip.BlueprintRoughCutStrip (cyclomatic 27) · ×1
  • BlueprintRoughCutStrip.BlueprintRoughCutStrip (cyclomatic 27) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintRoughCutStrip.tsx:298 — BlueprintRoughCutStrip.BlueprintRoughCutStrip has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · fileProjectReviewStore.useFileProjectReviewStore.pollOnce (cyclomatic 27) · ×1
  • fileProjectReviewStore.useFileProjectReviewStore.pollOnce (cyclomatic 27) plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:174 — fileProjectReviewStore.useFileProjectReviewStore.pollOnce has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 198, 192, 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 · service_worker.handleMessage (cyclomatic 27) · ×1
  • service_worker.handleMessage (cyclomatic 27) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:980 — service_worker.handleMessage has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · main.get_issue_result (cyclomatic 26) · ×1
  • main.get_issue_result (cyclomatic 26) plugins/apps/agent-kanban/backend/main.py:844 — main.get_issue_result 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 · native_content.native_content_blocks (cyclomatic 26) · ×1
  • native_content.native_content_blocks (cyclomatic 26) plugins/apps/qwenpaw-creator/backend/models/native_content.py:61 — native_content.native_content_blocks 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 · audio_execution.execute_file_voice_enrollment_command (cyclomatic 26) · ×1
  • audio_execution.execute_file_voice_enrollment_command (cyclomatic 26) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:784 — audio_execution.execute_file_voice_enrollment_command has cyclomatic complexity 26 (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 · media_review.parse_media_report (cyclomatic 26) · ×1
  • media_review.parse_media_report (cyclomatic 26) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:394 — media_review.parse_media_report 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 · text_review._settle_sync_review_job (cyclomatic 26) · ×1
  • text_review._settle_sync_review_job (cyclomatic 26) plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:405 — text_review._settle_sync_review_job has cyclomatic complexity 26 (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 · ProjectExecutionStore.append_continuation_event (cyclomatic 26) · ×1
  • ProjectExecutionStore.append_continuation_event (cyclomatic 26) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:512 — ProjectExecutionStore.append_continuation_event has cyclomatic complexity 26 (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 · DingTalkTransport.send_parts (cyclomatic 26) · ×1
  • DingTalkTransport.send_parts (cyclomatic 26) REDACTED:1831 — DingTalkTransport.send_parts 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 · management.manage (cyclomatic 26) · ×1
  • management.manage (cyclomatic 26) plugins/channel/feishu/qwenpaw_channel_feishu/management.py:45 — management.manage 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 · QQPlatform._handle_ws_payload (cyclomatic 26) · ×1
  • QQPlatform._handle_ws_payload (cyclomatic 26) plugins/channel/qq/qwenpaw_channel_qq/platform.py:950 — QQPlatform._handle_ws_payload 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 · XiaoYiPlatform._outbound_frames (cyclomatic 26) · ×1
  • XiaoYiPlatform._outbound_frames (cyclomatic 26) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:577 — XiaoYiPlatform._outbound_frames 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 · delegate_external_agent._stream_action_responses (cyclomatic 26) · ×1
  • delegate_external_agent._stream_action_responses (cyclomatic 26) src/qwenpaw/agents/tools/delegate_external_agent.py:521 — delegate_external_agent._stream_action_responses has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MailMonitorService._process_new_email (cyclomatic 26) · ×1
  • MailMonitorService._process_new_email (cyclomatic 26) REDACTED:2027 — MailMonitorService._process_new_email 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 · MultiAgentManager._reload_agent (cyclomatic 26) · ×1
  • MultiAgentManager._reload_agent (cyclomatic 26) src/qwenpaw/app/multi_agent_manager.py:921 — MultiAgentManager._reload_agent 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 · agents._validate_mail_config (cyclomatic 26) · ×1
  • agents._validate_mail_config (cyclomatic 26) src/qwenpaw/app/routers/agents.py:2207 — agents._validate_mail_config 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 · LinkServer._handle_control_call (cyclomatic 26) · ×1
  • LinkServer._handle_control_call (cyclomatic 26) src/qwenpaw/browser/execution/subprocess_plane.py:193 — LinkServer._handle_control_call has cyclomatic complexity 26 (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 · config.load_agent_config (cyclomatic 26) · ×1
  • config.load_agent_config (cyclomatic 26) src/qwenpaw/config/config.py:3755 — config.load_agent_config has cyclomatic complexity 26 (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 · dependency_worker.run (cyclomatic 26) · ×1
  • dependency_worker.run (cyclomatic 26) src/qwenpaw/plugins/dependency_worker.py:77 — dependency_worker.run 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 · message_convert._request_input_to_msgs (cyclomatic 26) · ×1
  • message_convert._request_input_to_msgs (cyclomatic 26) src/qwenpaw/runtime/message_convert.py:73 — message_convert._request_input_to_msgs 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.ModelSelector · ×1
  • index.ModelSelector::renderProviderModels (cyclomatic 26) console/src/pages/Chat/ModelSelector/index.tsx:687 — index.ModelSelector::renderProviderModels 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.ModelSelector) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.ACPPage · ×1
  • index.ACPPage::handleSubmit (cyclomatic 26) console/src/pages/Agent/ACP/index.tsx:467 — index.ACPPage::handleSubmit 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.WhisperSpeechButton (cyclomatic 26) · ×1
  • index.WhisperSpeechButton (cyclomatic 26) console/src/pages/Chat/components/WhisperSpeechButton/index.tsx:93 — index.WhisperSpeechButton 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 126, 110, 102, …). 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 · CommunityInboxState.CommunityInboxState (cyclomatic 26) · ×1
  • CommunityInboxState.CommunityInboxState (cyclomatic 26) console/src/pages/Inbox/components/CommunityInboxState.tsx:13 — CommunityInboxState.CommunityInboxState has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatGPTAccountPanel.ChatGPTAccountPanel (cyclomatic 26) · ×1
  • ChatGPTAccountPanel.ChatGPTAccountPanel (cyclomatic 26) console/src/pages/Settings/Models/components/cards/ChatGPTAccountPanel.tsx:34 — ChatGPTAccountPanel.ChatGPTAccountPanel has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeneralSettings.GeneralSettings (cyclomatic 26) · ×1
  • GeneralSettings.GeneralSettings (cyclomatic 26) console/src/pages/SettingsCenter/GeneralSettings.tsx:118 — GeneralSettings.GeneralSettings has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 464, changeCloseBehavior, a function literal at line 121, …). 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 · TimelineTracks.TimelineTracks · ×1
  • TimelineTracks.TimelineTracks::renderBlock (cyclomatic 26) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:735 — TimelineTracks.TimelineTracks::renderBlock has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (TimelineTracks.TimelineTracks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · locators.navigateToLocator (cyclomatic 26) · ×1
  • locators.navigateToLocator (cyclomatic 26) plugins/apps/qwenpaw-creator/ui/src/routing/locators.ts:46 — locators.navigateToLocator has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · blueprintSelectors.roughCutFrameForElement (cyclomatic 26) · ×1
  • blueprintSelectors.roughCutFrameForElement (cyclomatic 26) plugins/apps/qwenpaw-creator/ui/src/selectors/blueprintSelectors.ts:206 — blueprintSelectors.roughCutFrameForElement has cyclomatic complexity 26 (threshold 15). Of this number, 23 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 · elementPlaybackSelectors.resolveElementPlayback (cyclomatic 26) · ×1
  • elementPlaybackSelectors.resolveElementPlayback (cyclomatic 26) plugins/apps/qwenpaw-creator/ui/src/selectors/elementPlaybackSelectors.ts:201 — elementPlaybackSelectors.resolveElementPlayback 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 · service_worker.listTabs (cyclomatic 26) · ×1
  • service_worker.listTabs (cyclomatic 26) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:383 — service_worker.listTabs has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (attachGroupInfo, a function literal at line 432, a function literal at line 387). 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 · BaseImageModel.generate (cyclomatic 25) · ×1
  • BaseImageModel.generate (cyclomatic 25) REDACTED:725 — BaseImageModel.generate has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · r2v_execution._assert_r2v_reference_budget (cyclomatic 25) · ×1
  • r2v_execution._assert_r2v_reference_budget (cyclomatic 25) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:961 — r2v_execution._assert_r2v_reference_budget has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectCommitBoundary._record_review (cyclomatic 25) · ×1
  • ProjectCommitBoundary._record_review (cyclomatic 25) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1328 — ProjectCommitBoundary._record_review has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PromptSyncService.propose (cyclomatic 25) · ×1
  • PromptSyncService.propose (cyclomatic 25) plugins/apps/qwenpaw-creator/backend/services/prompt_sync_service.py:362 — PromptSyncService.propose has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SourceMediaAnalysisService._assert_agent_ranges (cyclomatic 25) · ×1
  • SourceMediaAnalysisService._assert_agent_ranges (cyclomatic 25) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:750 — SourceMediaAnalysisService._assert_agent_ranges has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · search.search_web (cyclomatic 25) · ×1
  • search.search_web (cyclomatic 25) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/search.py:156 — search.search_web has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · events.parse_clarification (cyclomatic 25) · ×1
  • events.parse_clarification (cyclomatic 25) plugins/apps/qwenpaw-data/backend/bridge/events.py:86 — events.parse_clarification has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DingTalkTransport._send_media_part_via_open_api (cyclomatic 25) · ×1
  • DingTalkTransport._send_media_part_via_open_api (cyclomatic 25) REDACTED:641 — DingTalkTransport._send_media_part_via_open_api has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MatrixPlatform._on_room_media_event (cyclomatic 25) · ×1
  • MatrixPlatform._on_room_media_event (cyclomatic 25) REDACTED:2466 — MatrixPlatform._on_room_media_event has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · management._execute (cyclomatic 25) · ×1
  • management._execute (cyclomatic 25) plugins/channel/qq/qwenpaw_channel_qq/management.py:99 — management._execute has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WeChatMessageParser._item (cyclomatic 25) · ×1
  • WeChatMessageParser._item (cyclomatic 25) REDACTED:62 — WeChatMessageParser._item has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync._sync_file (cyclomatic 25) · ×1
  • sync._sync_file (cyclomatic 25) src/qwenpaw/agents/context/scroll/sync.py:290 — sync._sync_file has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · browser_control._action_fill_form (cyclomatic 25) · ×1
  • browser_control._action_fill_form (cyclomatic 25) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3636 — browser_control._action_fill_form has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommunityConnectionService.sync_once (cyclomatic 25) · ×1
  • CommunityConnectionService.sync_once (cyclomatic 25) src/qwenpaw/app/community_connection.py:1228 — CommunityConnectionService.sync_once has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · monitor.build_wake_trace (cyclomatic 25) · ×1
  • monitor.build_wake_trace (cyclomatic 25) REDACTED:801 — monitor.build_wake_trace has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · config.list_channel_schemas (cyclomatic 25) · ×1
  • config.list_channel_schemas (cyclomatic 25) src/qwenpaw/app/routers/config.py:299 — config.list_channel_schemas has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tools.get_tool_config (cyclomatic 25) · ×1
  • tools.get_tool_config (cyclomatic 25) src/qwenpaw/app/routers/tools.py:367 — tools.get_tool_config has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ws_handler.nm_bridge_ws (cyclomatic 25) · ×1
  • ws_handler.nm_bridge_ws (cyclomatic 25) src/qwenpaw/browser/control_link/chrome/ws_handler.py:173 — ws_handler.nm_bridge_ws has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cron_cmd._resolve_update_spec (cyclomatic 25) · ×1
  • cron_cmd._resolve_update_spec (cyclomatic 25) src/qwenpaw/cli/cron_cmd.py:617 — cron_cmd._resolve_update_spec has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · legacy_cloudpaw._cleanup_factory_files (cyclomatic 25) · ×1
  • legacy_cloudpaw._cleanup_factory_files (cyclomatic 25) src/qwenpaw/plugins/legacy_cloudpaw.py:358 — legacy_cloudpaw._cleanup_factory_files has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLoader._prepare_python_dependencies (cyclomatic 25) · ×1
  • PluginLoader._prepare_python_dependencies (cyclomatic 25) src/qwenpaw/plugins/loader.py:1044 — PluginLoader._prepare_python_dependencies has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · external_state.discover_codex_plugins (cyclomatic 25) · ×1
  • external_state.discover_codex_plugins (cyclomatic 25) src/qwenpaw/portability/providers/external_state.py:776 — external_state.discover_codex_plugins has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WireProtocol.request (cyclomatic 25) · ×1
  • WireProtocol.request (cyclomatic 25) src/qwenpaw/providers/adapters/wire_protocol.py:46 — WireProtocol.request has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Provider.update_config (cyclomatic 25) · ×1
  • Provider.update_config (cyclomatic 25) src/qwenpaw/providers/provider.py:627 — Provider.update_config has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProviderManagerDiscoveryMixin.discover_provider_models (cyclomatic 25) · ×1
  • ProviderManagerDiscoveryMixin.discover_provider_models (cyclomatic 25) src/qwenpaw/providers/provider_manager_discovery.py:236 — ProviderManagerDiscoveryMixin.discover_provider_models has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportHubModal.ImportHubModal (cyclomatic 25) · ×1
  • ImportHubModal.ImportHubModal (cyclomatic 25) console/src/pages/Agent/Skills/components/ImportHubModal.tsx:66 — ImportHubModal.ImportHubModal has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: 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 · ProviderConfigModal.ProviderConfigModal (cyclomatic 25) · ×1
  • ProviderConfigModal.ProviderConfigModal (cyclomatic 25) console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:296 — ProviderConfigModal.ProviderConfigModal has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ProviderConfigModal.ProviderConfigModal::handleSubmit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · NavigationSettings.NavigationSettings (cyclomatic 25) · ×1
  • NavigationSettings.NavigationSettings (cyclomatic 25) console/src/pages/SettingsCenter/NavigationSettings.tsx:123 — NavigationSettings.NavigationSettings has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 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 · fileProjectReviews.parseFileProjectReview (cyclomatic 25) · ×1
  • fileProjectReviews.parseFileProjectReview (cyclomatic 25) plugins/apps/qwenpaw-creator/ui/src/api/creator/fileProjectReviews.ts:93 — fileProjectReviews.parseFileProjectReview 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 · PromptTokenEditor.PromptTokenEditor (cyclomatic 25) · ×1
  • PromptTokenEditor.PromptTokenEditor (cyclomatic 25) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptTokenEditor.tsx:129 — PromptTokenEditor.PromptTokenEditor has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 140, insertionRange, handleClick, …). 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 · creatorMessagePresentation.productionOutcome (cyclomatic 25) · ×1
  • creatorMessagePresentation.productionOutcome (cyclomatic 25) REDACTED:872 — creatorMessagePresentation.productionOutcome has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · engine.applyStep (cyclomatic 25) · ×1
  • engine.applyStep (cyclomatic 25) src/qwenpaw/browser/control_link/injected/engine.js:164 — engine.applyStep has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to 5 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 · thread_store.compute_mailbox_stats (cyclomatic 24) · ×1
  • thread_store.compute_mailbox_stats (cyclomatic 24) REDACTED:800 — thread_store.compute_mailbox_stats has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workgraph_execution.ready_request_context (cyclomatic 24) · ×1
  • workgraph_execution.ready_request_context (cyclomatic 24) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:594 — workgraph_execution.ready_request_context has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · media_review._focused_frame_targets (cyclomatic 24) · ×1
  • media_review._focused_frame_targets (cyclomatic 24) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:584 — media_review._focused_frame_targets has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · extension_setup.extension_install_status (cyclomatic 24) · ×1
  • extension_setup.extension_install_status (cyclomatic 24) plugins/bundle/chrome/extension_setup.py:707 — extension_setup.extension_install_status has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · a2a_call._build_result (cyclomatic 24) · ×1
  • a2a_call._build_result (cyclomatic 24) plugins/bundle/cloudpaw/tools/a2a_call.py:353 — a2a_call._build_result has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · patch_runner._classify_event (cyclomatic 24) · ×1
  • patch_runner._classify_event (cyclomatic 24) plugins/bundle/qwenpaw-pet/patch_runner.py:62 — patch_runner._classify_event 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 · DingTalkPlatform._create_ai_card (cyclomatic 24) · ×1
  • DingTalkPlatform._create_ai_card (cyclomatic 24) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:863 — DingTalkPlatform._create_ai_card has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TelegramPlatform.update_stream (cyclomatic 24) · ×1
  • TelegramPlatform.update_stream (cyclomatic 24) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:1179 — TelegramPlatform.update_stream has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model_factory._promote_tool_result_videos (cyclomatic 24) · ×1
  • model_factory._promote_tool_result_videos (cyclomatic 24) src/qwenpaw/agents/model_factory.py:1175 — model_factory._promote_tool_result_videos has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hub._hydrate_clawhub_payload (cyclomatic 24) · ×1
  • hub._hydrate_clawhub_payload (cyclomatic 24) src/qwenpaw/agents/skill_system/hub.py:1973 — hub._hydrate_clawhub_payload has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · browser_control._sync_browser_launch (cyclomatic 24) · ×1
  • browser_control._sync_browser_launch (cyclomatic 24) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:955 — browser_control._sync_browser_launch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · browser_control._action_type (cyclomatic 24) · ×1
  • browser_control._action_type (cyclomatic 24) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2590 — browser_control._action_type has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tools._build_tool_info (cyclomatic 24) · ×1
  • tools._build_tool_info (cyclomatic 24) src/qwenpaw/app/routers/tools.py:145 — tools._build_tool_info has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · render.render_restore (cyclomatic 24) · ×1
  • render.render_restore (cyclomatic 24) src/qwenpaw/checkpoints/render.py:184 — render.render_restore 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 · dependency_gate._host_observation_roots (cyclomatic 24) · ×1
  • dependency_gate._host_observation_roots (cyclomatic 24) src/qwenpaw/plugins/dependency_gate.py:368 — dependency_gate._host_observation_roots has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependency_transaction._owned (cyclomatic 24) · ×1
  • dependency_transaction._owned (cyclomatic 24) src/qwenpaw/plugins/dependency_transaction.py:162 — dependency_transaction._owned has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wheel_additions._install_data (cyclomatic 24) · ×1
  • wheel_additions._install_data (cyclomatic 24) src/qwenpaw/plugins/wheel_additions.py:222 — wheel_additions._install_data has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codex_schedules._rrule_to_cron (cyclomatic 24) · ×1
  • codex_schedules._rrule_to_cron (cyclomatic 24) src/qwenpaw/portability/providers/codex_schedules.py:134 — codex_schedules._rrule_to_cron has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TerminalView.TerminalView (cyclomatic 24) · ×1
  • TerminalView.TerminalView (cyclomatic 24) console/src/features/terminal/TerminalView.tsx:10 — TerminalView.TerminalView has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 123, 59, 51, …). 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 · RestoreModal.RestoreModal (cyclomatic 24) · ×1
  • RestoreModal.RestoreModal (cyclomatic 24) console/src/pages/Agent/Checkpoints/RestoreModal.tsx:20 — RestoreModal.RestoreModal has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useSkillsPage.useSkillsPage.handleSubmit (cyclomatic 24) · ×1
  • useSkillsPage.useSkillsPage.handleSubmit (cyclomatic 24) console/src/pages/Agent/Skills/useSkillsPage.tsx:487 — useSkillsPage.useSkillsPage.handleSubmit has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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 · Discussion.CommentRow (cyclomatic 24) · ×1
  • Discussion.CommentRow (cyclomatic 24) console/src/pages/Market/Community/Discussion.tsx:277 — Discussion.CommentRow has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MarketPanel.MarketPanel (cyclomatic 24) · ×1
  • MarketPanel.MarketPanel (cyclomatic 24) console/src/pages/Settings/Market/MarketPanel.tsx:237 — MarketPanel.MarketPanel has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 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 · LocalRuntimePanel.LocalRuntimePanel (cyclomatic 24) · ×1
  • LocalRuntimePanel.LocalRuntimePanel (cyclomatic 24) console/src/pages/Settings/Models/components/modals/local-models/LocalRuntimePanel.tsx:27 — LocalRuntimePanel.LocalRuntimePanel has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSkillPool.useSkillPool.handleSavePoolSkill · ×1
  • useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill (cyclomatic 24) console/src/pages/Settings/SkillPool/useSkillPool.tsx:990 — useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill 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. This shape REPEATS in the file: one other method here (useSkillPool.useSkillPool.handleSavePoolSkill) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · WorkGraphPanel.NodeRow (cyclomatic 24) · ×1
  • WorkGraphPanel.NodeRow (cyclomatic 24) plugins/apps/qwenpaw-creator/ui/src/components/agent/WorkGraphPanel.tsx:102 — WorkGraphPanel.NodeRow has cyclomatic complexity 24 (threshold 15). 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, separate the cases: extract each independent 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 · Breadcrumb.useBreadcrumbs (cyclomatic 24) · ×1
  • Breadcrumb.useBreadcrumbs (cyclomatic 24) plugins/apps/qwenpaw-creator/ui/src/components/layout/Breadcrumb.tsx:21 — Breadcrumb.useBreadcrumbs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PromptRichBlock.PromptRichBlock (cyclomatic 24) · ×1
  • PromptRichBlock.PromptRichBlock (cyclomatic 24) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptRichBlock.tsx:60 — PromptRichBlock.PromptRichBlock has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 5 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 · creatorPresentation.creatorTargetLabel (cyclomatic 24) · ×1
  • creatorPresentation.creatorTargetLabel (cyclomatic 24) plugins/apps/qwenpaw-creator/ui/src/lib/creatorPresentation.ts:138 — creatorPresentation.creatorTargetLabel has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workGraphStore.useWorkGraphStore (cyclomatic 24) · ×1
  • workGraphStore.useWorkGraphStore (cyclomatic 24) plugins/apps/qwenpaw-creator/ui/src/store/workGraphStore.ts:32 — workGraphStore.useWorkGraphStore has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 90, 39, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Settings.Settings (cyclomatic 24) · ×1
  • Settings.Settings (cyclomatic 24) plugins/harness/_shared/ui/Settings.tsx:73 — Settings.Settings has cyclomatic complexity 24 (threshold 15). 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.
D1 · Cyclomatic Complexity · main.stream_issue (cyclomatic 23) · ×1
  • main.stream_issue (cyclomatic 23) plugins/apps/agent-kanban/backend/main.py:770 — main.stream_issue 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 · video_model.check_task_status (cyclomatic 23) · ×1
  • video_model.check_task_status (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/models/video_model.py:1400 — video_model.check_task_status 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 · FfmpegLocalMediaRunner._render_one_segment (cyclomatic 23) · ×1
  • FfmpegLocalMediaRunner._render_one_segment (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1238 — FfmpegLocalMediaRunner._render_one_segment 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 · FileR2VExecutionService._frozen_inputs_still_current (cyclomatic 23) · ×1
  • FileR2VExecutionService._frozen_inputs_still_current (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4679 — FileR2VExecutionService._frozen_inputs_still_current 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 · visual_reference_resolution.preview_r2v_reference_order (cyclomatic 23) · ×1
  • visual_reference_resolution.preview_r2v_reference_order (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_reference_resolution.py:278 — visual_reference_resolution.preview_r2v_reference_order has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Project._coerce_edit_duration (cyclomatic 23) · ×1
  • Project._coerce_edit_duration (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:1397 — Project._coerce_edit_duration 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 · prompt_sync.derive_prompt_sync_changes (cyclomatic 23) · ×1
  • prompt_sync.derive_prompt_sync_changes (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:366 — prompt_sync.derive_prompt_sync_changes 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 · challenge.parse_challenge_verdicts (cyclomatic 23) · ×1
  • challenge.parse_challenge_verdicts (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:225 — challenge.parse_challenge_verdicts 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 · media_review.review_media_artifact (cyclomatic 23) · ×1
  • media_review.review_media_artifact (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:721 — media_review.review_media_artifact 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 · safe_remote_download.safe_curl_download_to_file (cyclomatic 23) · ×1
  • safe_remote_download.safe_curl_download_to_file (cyclomatic 23) plugins/apps/qwenpaw-creator/backend/services/runtime_files/safe_remote_download.py:287 — safe_remote_download.safe_curl_download_to_file 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 · QQPlatform._handle_approval (cyclomatic 23) · ×1
  • QQPlatform._handle_approval (cyclomatic 23) plugins/channel/qq/qwenpaw_channel_qq/platform.py:685 — QQPlatform._handle_approval 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 · hub._normalize_bundle (cyclomatic 23) · ×1
  • hub._normalize_bundle (cyclomatic 23) src/qwenpaw/agents/skill_system/hub.py:818 — hub._normalize_bundle 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 · RemoteControlLink.handle_frame (cyclomatic 23) · ×1
  • RemoteControlLink.handle_frame (cyclomatic 23) REDACTED:203 — RemoteControlLink.handle_frame 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 · RawCompletedTextSources.__post_init__ (cyclomatic 23) · ×1
  • RawCompletedTextSources.__post_init__ (cyclomatic 23) src/qwenpaw/channel_protocol/completed_text.py:34 — RawCompletedTextSources.__post_init__ has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManagementResult.from_mapping (cyclomatic 23) · ×1
  • ManagementResult.from_mapping (cyclomatic 23) src/qwenpaw/channel_protocol/management.py:297 — ManagementResult.from_mapping 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 · SharedResponseDriver._admit_event (cyclomatic 23) · ×1
  • SharedResponseDriver._admit_event (cyclomatic 23) src/qwenpaw/channel_protocol/shared_response_driver.py:613 — SharedResponseDriver._admit_event 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 · doctor_connectivity.collect_deep_channel_connectivity_notes (cyclomatic 23) · ×1
  • doctor_connectivity.collect_deep_channel_connectivity_notes (cyclomatic 23) src/qwenpaw/cli/doctor_connectivity.py:371 — doctor_connectivity.collect_deep_channel_connectivity_notes 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 · providers_cmd.configure_provider_api_key_interactive (cyclomatic 23) · ×1
  • providers_cmd.configure_provider_api_key_interactive (cyclomatic 23) src/qwenpaw/cli/providers_cmd.py:158 — providers_cmd.configure_provider_api_key_interactive has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mcp_card_builder.build_mcp_driver_card (cyclomatic 23) · ×1
  • mcp_card_builder.build_mcp_driver_card (cyclomatic 23) src/qwenpaw/drivers/adapters/mcp_card_builder.py:114 — mcp_card_builder.build_mcp_driver_card has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PluginContext._produce_tool (cyclomatic 23) · ×1
  • PluginContext._produce_tool (cyclomatic 23) src/qwenpaw/plugins/sdk.py:454 — PluginContext._produce_tool 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 · component_discovery.discover_components (cyclomatic 23) · ×1
  • component_discovery.discover_components (cyclomatic 23) src/qwenpaw/portability/component_discovery.py:79 — component_discovery.discover_components 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 · OpenRouterProvider._normalize_models_payload (cyclomatic 23) · ×1
  • OpenRouterProvider._normalize_models_payload (cyclomatic 23) src/qwenpaw/providers/openrouter_provider.py:141 — OpenRouterProvider._normalize_models_payload 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 · AgentBuilder._build_request_context (cyclomatic 23) · ×1
  • AgentBuilder._build_request_context (cyclomatic 23) src/qwenpaw/runtime/builder.py:718 — AgentBuilder._build_request_context 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 · tool_guard._guarded_tool_check_permissions (cyclomatic 23) · ×1
  • tool_guard._guarded_tool_check_permissions (cyclomatic 23) src/qwenpaw/runtime/tool_guard.py:151 — tool_guard._guarded_tool_check_permissions 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 · ToolCoordinator._await_next_event (cyclomatic 23) · ×1
  • ToolCoordinator._await_next_event (cyclomatic 23) src/qwenpaw/tool_calls/_coordinator.py:655 — ToolCoordinator._await_next_event has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SessionApi.patchLastUserMessage (cyclomatic 23) · ×1
  • SessionApi.patchLastUserMessage (cyclomatic 23) console/src/pages/Chat/sessionApi/index.ts:1122 — SessionApi.patchLastUserMessage has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InteractiveCard.InteractiveCard (cyclomatic 23) · ×1
  • InteractiveCard.InteractiveCard (cyclomatic 23) console/src/components/interaction/InteractiveCard.tsx:24 — InteractiveCard.InteractiveCard has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (follow, a function literal at line 81, a function literal at line 115, …). 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 · AgentModelSettings.AgentModelSettings (cyclomatic 23) · ×1
  • AgentModelSettings.AgentModelSettings (cyclomatic 23) console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx:88 — AgentModelSettings.AgentModelSettings has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (AgentModelSettings.AgentModelSettings::save) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.SkillsPage (cyclomatic 23) · ×1
  • index.SkillsPage (cyclomatic 23) console/src/pages/Agent/Skills/index.tsx:26 — index.SkillsPage has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 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 · RelatedResources.RelatedResources (cyclomatic 23) · ×1
  • RelatedResources.RelatedResources (cyclomatic 23) console/src/pages/Market/Community/RelatedResources.tsx:32 — RelatedResources.RelatedResources 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 6 function items inside it that branch (renderSection, a function literal at line 44, 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.
D1 · Cyclomatic Complexity · usePluginManager.usePluginManager.changeActivation (cyclomatic 23) · ×1
  • usePluginManager.usePluginManager.changeActivation (cyclomatic 23) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts:270 — usePluginManager.usePluginManager.changeActivation 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 · RestoreAgentTable.RestoreAgentTable (cyclomatic 23) · ×1
  • RestoreAgentTable.RestoreAgentTable (cyclomatic 23) console/src/pages/Settings/Backups/restore/RestoreAgentTable.tsx:40 — RestoreAgentTable.RestoreAgentTable has cyclomatic complexity 23 (threshold 15). Of this number, 13 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 · PoolSkillCard.PoolSkillCard (cyclomatic 23) · ×1
  • PoolSkillCard.PoolSkillCard (cyclomatic 23) console/src/pages/Settings/SkillPool/components/PoolSkillCard.tsx:36 — PoolSkillCard.PoolSkillCard has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TimelineSwitcher.TimelineSwitcher (cyclomatic 23) · ×1
  • TimelineSwitcher.TimelineSwitcher (cyclomatic 23) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSwitcher.tsx:27 — TimelineSwitcher.TimelineSwitcher has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 130, 43, 102, …). 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 · BlueprintPage.BlueprintPage (cyclomatic 23) · ×1
  • BlueprintPage.BlueprintPage (cyclomatic 23) plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintPage.tsx:39 — BlueprintPage.BlueprintPage has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 5 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 · agentWorkingSelectors.useAgentWorkingState (cyclomatic 23) · ×1
  • agentWorkingSelectors.useAgentWorkingState (cyclomatic 23) plugins/apps/qwenpaw-creator/ui/src/selectors/agentWorkingSelectors.ts:34 — agentWorkingSelectors.useAgentWorkingState has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 90, 67, 70, …). 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 · config.load_config (cyclomatic 22) · ×1
  • config.load_config (cyclomatic 22) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/config.py:57 — config.load_config 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 · main._dispatch_loop (cyclomatic 22) · ×1
  • main._dispatch_loop (cyclomatic 22) plugins/apps/agent-kanban/backend/main.py:1162 — main._dispatch_loop has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · project_file_routes.patch_project (cyclomatic 22) · ×1
  • project_file_routes.patch_project (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:696 — project_file_routes.patch_project has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · video_capabilities.video_model_capability (cyclomatic 22) · ×1
  • video_capabilities.video_model_capability (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:801 — video_capabilities.video_model_capability has cyclomatic complexity 22 (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 · FileCreatorAgentRuntime._await_execution_authorization (cyclomatic 22) · ×1
  • FileCreatorAgentRuntime._await_execution_authorization (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:7547 — FileCreatorAgentRuntime._await_execution_authorization has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · motion_design._design_document (cyclomatic 22) · ×1
  • motion_design._design_document (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1076 — motion_design._design_document has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · motion_overlay.probe_motion_document (cyclomatic 22) · ×1
  • motion_overlay.probe_motion_document (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1239 — motion_overlay.probe_motion_document has cyclomatic complexity 22 (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 · FileR2VExecutionService.dispatch (cyclomatic 22) · ×1
  • FileR2VExecutionService.dispatch (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2064 — FileR2VExecutionService.dispatch has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectCommitBoundary._reconcile_existing_review (cyclomatic 22) · ×1
  • ProjectCommitBoundary._reconcile_existing_review (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1453 — ProjectCommitBoundary._reconcile_existing_review has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectRuntimeSessionStore.initialize_staged_project (cyclomatic 22) · ×1
  • ProjectRuntimeSessionStore.initialize_staged_project (cyclomatic 22) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:303 — ProjectRuntimeSessionStore.initialize_staged_project has cyclomatic complexity 22 (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 · AzureBotPlatform._attachment (cyclomatic 22) · ×1
  • AzureBotPlatform._attachment (cyclomatic 22) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:372 — AzureBotPlatform._attachment has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DingTalkTransport._guess_filename_and_ext (cyclomatic 22) · ×1
  • DingTalkTransport._guess_filename_and_ext (cyclomatic 22) REDACTED:1711 — DingTalkTransport._guess_filename_and_ext has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LarkOapiPlatform._dispatch_native_message_serial (cyclomatic 22) · ×1
  • LarkOapiPlatform._dispatch_native_message_serial (cyclomatic 22) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:692 — LarkOapiPlatform._dispatch_native_message_serial 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 · MatrixPlatform._sync_loop (cyclomatic 22) · ×1
  • MatrixPlatform._sync_loop (cyclomatic 22) REDACTED:1557 — MatrixPlatform._sync_loop has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatrixPlatform._record_media_history (cyclomatic 22) · ×1
  • MatrixPlatform._record_media_history (cyclomatic 22) REDACTED:1869 — MatrixPlatform._record_media_history has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MattermostPlatform._on_posted_event (cyclomatic 22) · ×1
  • MattermostPlatform._on_posted_event (cyclomatic 22) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:210 — MattermostPlatform._on_posted_event has cyclomatic complexity 22 (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 · OneBotPlatform.send_message (cyclomatic 22) · ×1
  • OneBotPlatform.send_message (cyclomatic 22) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:943 — OneBotPlatform.send_message has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XiaoYiPlatform._handle_a2a_request (cyclomatic 22) · ×1
  • XiaoYiPlatform._handle_a2a_request (cyclomatic 22) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:409 — XiaoYiPlatform._handle_a2a_request has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · service._process_session_file (cyclomatic 22) · ×1
  • service._process_session_file (cyclomatic 22) src/qwenpaw/agent_stats/service.py:159 — service._process_session_file has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QwenPawACPAgent.prompt (cyclomatic 22) · ×1
  • QwenPawACPAgent.prompt (cyclomatic 22) src/qwenpaw/agents/acp/server.py:729 — QwenPawACPAgent.prompt has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommandHandler._process_compact (cyclomatic 22) · ×1
  • CommandHandler._process_compact (cyclomatic 22) src/qwenpaw/agents/command_handler.py:384 — CommandHandler._process_compact has cyclomatic complexity 22 (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 · continuation_summary.parse_plain_markdown (cyclomatic 22) · ×1
  • continuation_summary.parse_plain_markdown (cyclomatic 22) src/qwenpaw/agents/context/scroll/continuation_summary.py:610 — continuation_summary.parse_plain_markdown has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fork_project.register_fork (cyclomatic 22) · ×1
  • fork_project.register_fork (cyclomatic 22) src/qwenpaw/agents/fork_project.py:687 — fork_project.register_fork has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SkillService.import_from_zip (cyclomatic 22) · ×1
  • SkillService.import_from_zip (cyclomatic 22) src/qwenpaw/agents/skill_system/workspace_service.py:624 — SkillService.import_from_zip has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tool_message_utils._coerce_tool_inputs_to_json (cyclomatic 22) · ×1
  • tool_message_utils._coerce_tool_inputs_to_json (cyclomatic 22) src/qwenpaw/agents/utils/tool_message_utils.py:437 — tool_message_utils._coerce_tool_inputs_to_json has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _app.lifespan (cyclomatic 22) · ×1
  • _app.lifespan (cyclomatic 22) src/qwenpaw/app/_app.py:243 — _app.lifespan has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BaseChannel._extract_query_from_payload (cyclomatic 22) · ×1
  • BaseChannel._extract_query_from_payload (cyclomatic 22) src/qwenpaw/app/channels/base.py:1434 — BaseChannel._extract_query_from_payload has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChannelIngressService._original_url (cyclomatic 22) · ×1
  • ChannelIngressService._original_url (cyclomatic 22) src/qwenpaw/app/channels/ingress.py:464 — ChannelIngressService._original_url has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommunityConnectionService.community_request (cyclomatic 22) · ×1
  • CommunityConnectionService.community_request (cyclomatic 22) src/qwenpaw/app/community_connection.py:1112 — CommunityConnectionService.community_request has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · migration._do_migrate_legacy_workspace (cyclomatic 22) · ×1
  • migration._do_migrate_legacy_workspace (cyclomatic 22) src/qwenpaw/app/migration.py:82 — migration._do_migrate_legacy_workspace has cyclomatic complexity 22 (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 · agents.update_agent (cyclomatic 22) · ×1
  • agents.update_agent (cyclomatic 22) src/qwenpaw/app/routers/agents.py:1209 — agents.update_agent has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContextVarsSetupHook.run (cyclomatic 22) · ×1
  • ContextVarsSetupHook.run (cyclomatic 22) src/qwenpaw/hooks/request_setup/contextvars_hook.py:54 — ContextVarsSetupHook.run 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 · download_catalog._build_remote_plugin_catalog (cyclomatic 22) · ×1
  • download_catalog._build_remote_plugin_catalog (cyclomatic 22) REDACTED:201 — download_catalog._build_remote_plugin_catalog has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginLoader.activate_plugin_unlocked (cyclomatic 22) · ×1
  • PluginLoader.activate_plugin_unlocked (cyclomatic 22) src/qwenpaw/plugins/loader.py:5300 — PluginLoader.activate_plugin_unlocked has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gemini_provider._sanitize_schema_for_gemini (cyclomatic 22) · ×1
  • gemini_provider._sanitize_schema_for_gemini (cyclomatic 22) src/qwenpaw/providers/gemini_provider.py:108 — gemini_provider._sanitize_schema_for_gemini has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Provider._build_info (cyclomatic 22) · ×1
  • Provider._build_info (cyclomatic 22) src/qwenpaw/providers/provider.py:1510 — Provider._build_info has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · thinking.model_default_thinking (cyclomatic 22) · ×1
  • thinking.model_default_thinking (cyclomatic 22) src/qwenpaw/providers/thinking.py:135 — thinking.model_default_thinking has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decision_model.assess_tool_call (cyclomatic 22) · ×1
  • decision_model.assess_tool_call (cyclomatic 22) src/qwenpaw/security/decision_model.py:452 — decision_model.assess_tool_call has cyclomatic complexity 22 (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 · BrowserUseCard.formatBrowserResult (cyclomatic 22) · ×1
  • BrowserUseCard.formatBrowserResult (cyclomatic 22) console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:36 — BrowserUseCard.formatBrowserResult has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OAuthConfirmModal.OAuthConfirmModal (cyclomatic 22) · ×1
  • OAuthConfirmModal.OAuthConfirmModal (cyclomatic 22) console/src/pages/Chat/ModelSelector/OAuthConfirmModal.tsx:27 — OAuthConfirmModal.OAuthConfirmModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 81, 104, 56, …). 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.AgentConfigPage (cyclomatic 22) · ×1
  • index.AgentConfigPage (cyclomatic 22) console/src/pages/Agent/Config/index.tsx:32 — index.AgentConfigPage has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 149, 107, 36, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.startAllBackgroundQueues (cyclomatic 22) · ×1
  • index.startAllBackgroundQueues (cyclomatic 22) console/src/pages/Chat/index.tsx:658 — index.startAllBackgroundQueues 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, separate the cases: extract each independent 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 · CommentEmojiPicker.CommentEmojiPicker (cyclomatic 22) · ×1
  • CommentEmojiPicker.CommentEmojiPicker (cyclomatic 22) console/src/pages/Market/Community/CommentEmojiPicker.tsx:219 — CommentEmojiPicker.CommentEmojiPicker has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 284, 227, 244, …). 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 · PostBody.PostBody (cyclomatic 22) · ×1
  • PostBody.PostBody (cyclomatic 22) REDACTED:70 — PostBody.PostBody has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (handleBodyClick, a function literal at line 106, 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.
D1 · Cyclomatic Complexity · usePluginManager.usePluginManager.loadUpdates (cyclomatic 22) · ×1
  • usePluginManager.usePluginManager.loadUpdates (cyclomatic 22) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts:84 — usePluginManager.usePluginManager.loadUpdates has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentGallery.AgentTile (cyclomatic 22) · ×1
  • AgentGallery.AgentTile (cyclomatic 22) console/src/pages/Settings/Agents/components/AgentGallery.tsx:55 — AgentGallery.AgentTile has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 87). 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 · ModelsSection.ModelsSection (cyclomatic 22) · ×1
  • ModelsSection.ModelsSection (cyclomatic 22) console/src/pages/Settings/Models/components/sections/ModelsSection.tsx:32 — ModelsSection.ModelsSection has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSave, a function literal at line 52, a function literal at line 67, …). 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 · FileGuardSection.FileGuardSection (cyclomatic 22) · ×1
  • FileGuardSection.FileGuardSection (cyclomatic 22) console/src/pages/Settings/Security/components/FileGuardSection.tsx:41 — FileGuardSection.FileGuardSection has cyclomatic complexity 22 (threshold 15). Of this number, 16 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 · SkillScannerSection.SkillScannerSection (cyclomatic 22) · ×1
  • SkillScannerSection.SkillScannerSection (cyclomatic 22) console/src/pages/Settings/Security/components/SkillScannerSection.tsx:85 — SkillScannerSection.SkillScannerSection 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 8 function literals inside it that branch (lines 122, 154, 199, …). 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 · ImportBuiltinModal.ImportBuiltinModal (cyclomatic 22) · ×1
  • ImportBuiltinModal.ImportBuiltinModal (cyclomatic 22) console/src/pages/Settings/SkillPool/components/ImportBuiltinModal.tsx:28 — ImportBuiltinModal.ImportBuiltinModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 174, resolveLanguage, getImportStatusLabel, …). 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 · PoolSkillDrawer.PoolSkillDrawer (cyclomatic 22) · ×1
  • PoolSkillDrawer.PoolSkillDrawer (cyclomatic 22) console/src/pages/Settings/SkillPool/components/PoolSkillDrawer.tsx:50 — PoolSkillDrawer.PoolSkillDrawer has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AgentEventFeed.originRunStatus (cyclomatic 22) · ×1
  • AgentEventFeed.originRunStatus (cyclomatic 22) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:87 — AgentEventFeed.originRunStatus 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 · BlueprintPrepDrawer.SourceDetail (cyclomatic 22) · ×1
  • BlueprintPrepDrawer.SourceDetail (cyclomatic 22) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:469 — BlueprintPrepDrawer.SourceDetail has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 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 · useProjectLaunch.continueLaunchInBackground (cyclomatic 22) · ×1
  • useProjectLaunch.continueLaunchInBackground (cyclomatic 22) plugins/apps/qwenpaw-creator/ui/src/components/creator/useProjectLaunch.tsx:163 — useProjectLaunch.continueLaunchInBackground has cyclomatic complexity 22 (threshold 15). Of this number, 20 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 · agentLiveStatus.toolActivityPhase (cyclomatic 22) · ×1
  • agentLiveStatus.toolActivityPhase (cyclomatic 22) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:53 — agentLiveStatus.toolActivityPhase has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · timelineEditing.resolveSpanDrag (cyclomatic 22) · ×1
  • timelineEditing.resolveSpanDrag (cyclomatic 22) plugins/apps/qwenpaw-creator/ui/src/lib/timelineEditing.ts:135 — timelineEditing.resolveSpanDrag 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, separate the cases: extract each independent 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 · WorkGraphScheduler._emit_graph_transitions (cyclomatic 21) · ×1
  • WorkGraphScheduler._emit_graph_transitions (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:1391 — WorkGraphScheduler._emit_graph_transitions 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 · workgraph_execution._publication_artifacts (cyclomatic 21) · ×1
  • workgraph_execution._publication_artifacts (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:279 — workgraph_execution._publication_artifacts 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 · workgraph_execution.requested_work_node (cyclomatic 21) · ×1
  • workgraph_execution.requested_work_node (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:452 — workgraph_execution.requested_work_node 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 · SourceMemoryService._execute (cyclomatic 21) · ×1
  • SourceMemoryService._execute (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:967 — SourceMemoryService._execute 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 · FfmpegLocalMediaRunner._normalized_motion (cyclomatic 21) · ×1
  • FfmpegLocalMediaRunner._normalized_motion (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1861 — FfmpegLocalMediaRunner._normalized_motion 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 · tracing.read_trace_records (cyclomatic 21) · ×1
  • tracing.read_trace_records (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/observability/tracing.py:534 — tracing.read_trace_records has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · migrations._stamp_missing_audio_roles (cyclomatic 21) · ×1
  • migrations._stamp_missing_audio_roles (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:592 — migrations._stamp_missing_audio_roles 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 · model_view.project_snapshot_view (cyclomatic 21) · ×1
  • model_view.project_snapshot_view (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/project_files/model_view.py:96 — model_view.project_snapshot_view 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 · AssetIndex._validate_index (cyclomatic 21) · ×1
  • AssetIndex._validate_index (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:326 — AssetIndex._validate_index 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 · ProjectReviewService._discover_decision_journals (cyclomatic 21) · ×1
  • ProjectReviewService._discover_decision_journals (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:777 — ProjectReviewService._discover_decision_journals 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 · review.review_render (cyclomatic 21) · ×1
  • review.review_render (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:551 — review.review_render 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 · scene_review._collect_evidence (cyclomatic 21) · ×1
  • scene_review._collect_evidence (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:144 — scene_review._collect_evidence 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 · media_review._parse_probes (cyclomatic 21) · ×1
  • media_review._parse_probes (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:329 — media_review._parse_probes 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 · media_review.schedule_media_review (cyclomatic 21) · ×1
  • media_review.schedule_media_review (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:1130 — media_review.schedule_media_review 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 · triage._normalize_entities (cyclomatic 21) · ×1
  • triage._normalize_entities (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:222 — triage._normalize_entities 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 · verification.verify_visual_grounding_groups_with_vlm (cyclomatic 21) · ×1
  • verification.verify_visual_grounding_groups_with_vlm (cyclomatic 21) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:501 — verification.verify_visual_grounding_groups_with_vlm has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AzureBotPlatform._send_parts (cyclomatic 21) · ×1
  • AzureBotPlatform._send_parts (cyclomatic 21) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:597 — AzureBotPlatform._send_parts 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 · DingTalkDriver._message (cyclomatic 21) · ×1
  • DingTalkDriver._message (cyclomatic 21) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:451 — DingTalkDriver._message has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DingTalkPlatform.health_check (cyclomatic 21) · ×1
  • DingTalkPlatform.health_check (cyclomatic 21) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:697 — DingTalkPlatform.health_check 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 · FeishuDriver._message (cyclomatic 21) · ×1
  • FeishuDriver._message (cyclomatic 21) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:306 — FeishuDriver._message has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · QQMedia.send (cyclomatic 21) · ×1
  • QQMedia.send (cyclomatic 21) plugins/channel/qq/qwenpaw_channel_qq/media.py:217 — QQMedia.send 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 · QQPlatform._ws_connect_once (cyclomatic 21) · ×1
  • QQPlatform._ws_connect_once (cyclomatic 21) plugins/channel/qq/qwenpaw_channel_qq/platform.py:1089 — QQPlatform._ws_connect_once 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 · VoicePlatform._close_resources (cyclomatic 21) · ×1
  • VoicePlatform._close_resources (cyclomatic 21) plugins/channel/voice/qwenpaw_channel_voice/platform.py:749 — VoicePlatform._close_resources 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 · WeChatPlatform.send_parts (cyclomatic 21) · ×1
  • WeChatPlatform.send_parts (cyclomatic 21) REDACTED:325 — WeChatPlatform.send_parts 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 · CodexBackend._handle_server_request (cyclomatic 21) · ×1
  • CodexBackend._handle_server_request (cyclomatic 21) plugins/harness/codex/adapter.py:804 — CodexBackend._handle_server_request 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 · gpt_image2_tool.edit_image_gpt (cyclomatic 21) · ×1
  • gpt_image2_tool.edit_image_gpt (cyclomatic 21) plugins/tool/gpt-image2/gpt_image2_tool.py:259 — gpt_image2_tool.edit_image_gpt 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 · ScrollContextManager._tool_result_fold_candidates (cyclomatic 21) · ×1
  • ScrollContextManager._tool_result_fold_candidates (cyclomatic 21) src/qwenpaw/agents/context/scroll/manager.py:1675 — ScrollContextManager._tool_result_fold_candidates 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 · fork_project.finalize_fork_for_task (cyclomatic 21) · ×1
  • fork_project.finalize_fork_for_task (cyclomatic 21) src/qwenpaw/agents/fork_project.py:1471 — fork_project.finalize_fork_for_task 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 · model_factory.create_model_and_formatter (cyclomatic 21) · ×1
  • model_factory.create_model_and_formatter (cyclomatic 21) src/qwenpaw/agents/model_factory.py:2521 — model_factory.create_model_and_formatter 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 · AsMsgHandler.stat_message (cyclomatic 21) · ×1
  • AsMsgHandler.stat_message (cyclomatic 21) src/qwenpaw/agents/utils/as_msg_handler.py:137 — AsMsgHandler.stat_message 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 · tool_call_coerce._coerce_node (cyclomatic 21) · ×1
  • tool_call_coerce._coerce_node (cyclomatic 21) src/qwenpaw/agents/utils/tool_call_coerce.py:133 — tool_call_coerce._coerce_node 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 · catalog._assemble_channel_catalog (cyclomatic 21) · ×1
  • catalog._assemble_channel_catalog (cyclomatic 21) src/qwenpaw/app/channels/catalog.py:202 — catalog._assemble_channel_catalog 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 · IsolatedChannelProxy._buffer_response_text (cyclomatic 21) · ×1
  • IsolatedChannelProxy._buffer_response_text (cyclomatic 21) src/qwenpaw/app/channels/isolated_proxy.py:1403 — IsolatedChannelProxy._buffer_response_text 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 · ChannelManager._start_one_unlocked (cyclomatic 21) · ×1
  • ChannelManager._start_one_unlocked (cyclomatic 21) src/qwenpaw/app/channels/manager.py:1604 — ChannelManager._start_one_unlocked 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 · CommunityConnectionService._connection_from_tokens (cyclomatic 21) · ×1
  • CommunityConnectionService._connection_from_tokens (cyclomatic 21) src/qwenpaw/app/community_connection.py:907 — CommunityConnectionService._connection_from_tokens has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · console.get_inbox_events (cyclomatic 21) · ×1
  • console.get_inbox_events (cyclomatic 21) src/qwenpaw/app/routers/console.py:819 — console.get_inbox_events 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 · cdp_tree.resolve_spec (cyclomatic 21) · ×1
  • cdp_tree.resolve_spec (cyclomatic 21) src/qwenpaw/browser/control_link/cdp_tree.py:230 — cdp_tree.resolve_spec 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 · CheckpointService._gc_sync (cyclomatic 21) · ×1
  • CheckpointService._gc_sync (cyclomatic 21) src/qwenpaw/checkpoints/service.py:896 — CheckpointService._gc_sync 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 · config._migrate_access_control_fields (cyclomatic 21) · ×1
  • config._migrate_access_control_fields (cyclomatic 21) src/qwenpaw/config/config.py:3586 — config._migrate_access_control_fields 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 · config.migrate_legacy_config_to_multi_agent (cyclomatic 21) · ×1
  • config.migrate_legacy_config_to_multi_agent (cyclomatic 21) src/qwenpaw/config/config.py:4132 — config.migrate_legacy_config_to_multi_agent 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 · _MCPClientMixin.list_tools (cyclomatic 21) · ×1
  • _MCPClientMixin.list_tools (cyclomatic 21) src/qwenpaw/drivers/handlers/mcp_stateful_client.py:466 — _MCPClientMixin.list_tools 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 · detectors.detect_dangerous_patterns (cyclomatic 21) · ×1
  • detectors.detect_dangerous_patterns (cyclomatic 21) src/qwenpaw/governance/detectors.py:368 — detectors.detect_dangerous_patterns 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 · DependencyRegistry.action (cyclomatic 21) · ×1
  • DependencyRegistry.action (cyclomatic 21) src/qwenpaw/pawapp/dependency.py:380 — DependencyRegistry.action 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 · _messages._build_block (cyclomatic 21) · ×1
  • _messages._build_block (cyclomatic 21) src/qwenpaw/plugins/_messages.py:181 — _messages._build_block 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 · _messages._from_block (cyclomatic 21) · ×1
  • _messages._from_block (cyclomatic 21) src/qwenpaw/plugins/_messages.py:268 — _messages._from_block 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 · PluginLoader.load_plugin_from_path (cyclomatic 21) · ×1
  • PluginLoader.load_plugin_from_path (cyclomatic 21) src/qwenpaw/plugins/loader.py:3678 — PluginLoader.load_plugin_from_path 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 · ModelService.stream (cyclomatic 21) · ×1
  • ModelService.stream (cyclomatic 21) src/qwenpaw/plugins/models.py:63 — ModelService.stream 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 · provision.provision_files (cyclomatic 21) · ×1
  • provision.provision_files (cyclomatic 21) src/qwenpaw/plugins/provision.py:393 — provision.provision_files 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 · PortabilityImportJobManager._project_progress (cyclomatic 21) · ×1
  • PortabilityImportJobManager._project_progress (cyclomatic 21) src/qwenpaw/portability/import_jobs.py:824 — PortabilityImportJobManager._project_progress 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 · codex._mcp_server (cyclomatic 21) · ×1
  • codex._mcp_server (cyclomatic 21) src/qwenpaw/portability/providers/codex.py:751 — codex._mcp_server has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · codex_schedules._parse_rrule (cyclomatic 21) · ×1
  • codex_schedules._parse_rrule (cyclomatic 21) src/qwenpaw/portability/providers/codex_schedules.py:59 — codex_schedules._parse_rrule 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 · qoder_schedules._map_schedule (cyclomatic 21) · ×1
  • qoder_schedules._map_schedule (cyclomatic 21) src/qwenpaw/portability/providers/qoder_schedules.py:578 — qoder_schedules._map_schedule 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 · builtin_commands._skill_fallback_handler (cyclomatic 21) · ×1
  • builtin_commands._skill_fallback_handler (cyclomatic 21) src/qwenpaw/runtime/builtin_commands.py:757 — builtin_commands._skill_fallback_handler 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 · markdown_cjk.normalize_cjk_emphasis (cyclomatic 21) · ×1
  • markdown_cjk.normalize_cjk_emphasis (cyclomatic 21) src/qwenpaw/utils/markdown_cjk.py:98 — markdown_cjk.normalize_cjk_emphasis 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 · turnUsage.wrapChatResponseUsageStream (cyclomatic 21) · ×1
  • turnUsage.wrapChatResponseUsageStream (cyclomatic 21) console/src/pages/Chat/turnUsage.ts:357 — turnUsage.wrapChatResponseUsageStream has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SessionApi.fetchAndBuildSession (cyclomatic 21) · ×1
  • SessionApi.fetchAndBuildSession (cyclomatic 21) console/src/pages/Chat/sessionApi/index.ts:1647 — SessionApi.fetchAndBuildSession has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SidebarUsage.SidebarUsage (cyclomatic 21) · ×1
  • SidebarUsage.SidebarUsage (cyclomatic 21) console/src/layouts/SidebarUsage.tsx:16 — SidebarUsage.SidebarUsage has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 67, 50, 32, …). 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 · DefaultBlock.DefaultBlock (cyclomatic 21) · ×1
  • DefaultBlock.DefaultBlock (cyclomatic 21) console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:119 — DefaultBlock.DefaultBlock has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (renderContent, a function literal at line 146, a function literal at line 142, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useChatRouteResolution.useChatRouteResolution (cyclomatic 21) · ×1
  • useChatRouteResolution.useChatRouteResolution (cyclomatic 21) console/src/pages/Chat/hooks/useChatRouteResolution.ts:20 — useChatRouteResolution.useChatRouteResolution has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 75, 85, 96, …). 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 · legacyPostDrafts.listPostDrafts (cyclomatic 21) · ×1
  • legacyPostDrafts.listPostDrafts (cyclomatic 21) console/src/pages/CommunityFeedback/legacyPostDrafts.ts:18 — legacyPostDrafts.listPostDrafts has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23, 31, 42). 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 · traceUtils.extractTraceText (cyclomatic 21) · ×1
  • traceUtils.extractTraceText (cyclomatic 21) console/src/pages/Inbox/utils/traceUtils.ts:69 — traceUtils.extractTraceText has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · CommentImageAttachments.CommentImageAttachments (cyclomatic 21) · ×1
  • CommentImageAttachments.CommentImageAttachments (cyclomatic 21) console/src/pages/Market/Community/CommentImageAttachments.tsx:37 — CommentImageAttachments.CommentImageAttachments 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 items inside it that branch (uploadFiles, deleteImage, a function literal at line 116, …). 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 · UsageActivity.UsageActivity (cyclomatic 21) · ×1
  • UsageActivity.UsageActivity (cyclomatic 21) console/src/pages/Settings/TokenUsage/components/UsageActivity.tsx:13 — UsageActivity.UsageActivity has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 79, 30, 32, …). 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 · projects.getProjectSnapshot (cyclomatic 21) · ×1
  • projects.getProjectSnapshot (cyclomatic 21) plugins/apps/qwenpaw-creator/ui/src/api/creator/projects.ts:57 — projects.getProjectSnapshot 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 · AgentWaitHint.AgentWaitHint (cyclomatic 21) · ×1
  • AgentWaitHint.AgentWaitHint (cyclomatic 21) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentWaitHint.tsx:9 — AgentWaitHint.AgentWaitHint has cyclomatic complexity 21 (threshold 15). Of this number, 12 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 · AssetsPage.resolveProvenanceRef (cyclomatic 21) · ×1
  • AssetsPage.resolveProvenanceRef (cyclomatic 21) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:783 — AssetsPage.resolveProvenanceRef 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 · service_worker.createTab (cyclomatic 21) · ×1
  • service_worker.createTab (cyclomatic 21) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:537 — service_worker.createTab has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · parseBlogMarkdown.normalizeRelated (cyclomatic 21) · ×1
  • parseBlogMarkdown.normalizeRelated (cyclomatic 21) website/src/lib/parseBlogMarkdown.ts:81 — parseBlogMarkdown.normalizeRelated 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 · main.patch_issue (cyclomatic 20) · ×1
  • main.patch_issue (cyclomatic 20) plugins/apps/agent-kanban/backend/main.py:359 — main.patch_issue has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tts_model.synthesize (cyclomatic 20) · ×1
  • tts_model.synthesize (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/models/tts_model.py:317 — tts_model.synthesize has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileCreatorAgentRuntime._run_message (cyclomatic 20) · ×1
  • FileCreatorAgentRuntime._run_message (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:2731 — FileCreatorAgentRuntime._run_message has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · driver._specialist_tool_recovery (cyclomatic 20) · ×1
  • driver._specialist_tool_recovery (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:10060 — driver._specialist_tool_recovery has cyclomatic complexity 20 (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 · workgraph_execution.summarize_workgraph_results (cyclomatic 20) · ×1
  • workgraph_execution.summarize_workgraph_results (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:151 — workgraph_execution.summarize_workgraph_results has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · audio_execution.execute_file_tts_command (cyclomatic 20) · ×1
  • audio_execution.execute_file_tts_command (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:407 — audio_execution.execute_file_tts_command has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · informal_launch_timing.align_launch_caption_spans (cyclomatic 20) · ×1
  • informal_launch_timing.align_launch_caption_spans (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/media_files/informal_launch_timing.py:92 — informal_launch_timing.align_launch_caption_spans has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FfmpegLocalMediaRunner._snap_transitions_to_beats (cyclomatic 20) · ×1
  • FfmpegLocalMediaRunner._snap_transitions_to_beats (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:538 — FfmpegLocalMediaRunner._snap_transitions_to_beats 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 · ProjectCommitRecoveryCoordinator._runtime_metadata_complete (cyclomatic 20) · ×1
  • ProjectCommitRecoveryCoordinator._runtime_metadata_complete (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:899 — ProjectCommitRecoveryCoordinator._runtime_metadata_complete has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · adapters._normalize_tavily_images (cyclomatic 20) · ×1
  • adapters._normalize_tavily_images (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:231 — adapters._normalize_tavily_images 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 · triage.triage_grounding_request (cyclomatic 20) · ×1
  • triage.triage_grounding_request (cyclomatic 20) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:721 — triage.triage_grounding_request has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · a2a_call.a2a_call (cyclomatic 20) · ×1
  • a2a_call.a2a_call (cyclomatic 20) plugins/bundle/cloudpaw/tools/a2a_call.py:27 — a2a_call.a2a_call 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 · AzureBotPlatform._message (cyclomatic 20) · ×1
  • AzureBotPlatform._message (cyclomatic 20) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:306 — AzureBotPlatform._message 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 · QQPlatform._stop_owned (cyclomatic 20) · ×1
  • QQPlatform._stop_owned (cyclomatic 20) plugins/channel/qq/qwenpaw_channel_qq/platform.py:1209 — QQPlatform._stop_owned has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · continuation_summary.validate_summary_quality (cyclomatic 20) · ×1
  • continuation_summary.validate_summary_quality (cyclomatic 20) src/qwenpaw/agents/context/scroll/continuation_summary.py:690 — continuation_summary.validate_summary_quality 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 · serialize.msg_to_entries (cyclomatic 20) · ×1
  • serialize.msg_to_entries (cyclomatic 20) src/qwenpaw/agents/context/scroll/serialize.py:194 — serialize.msg_to_entries 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 · ToolResultPruningMiddleware._prune_tool_results (cyclomatic 20) · ×1
  • ToolResultPruningMiddleware._prune_tool_results (cyclomatic 20) src/qwenpaw/agents/middlewares.py:846 — ToolResultPruningMiddleware._prune_tool_results 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 · browser_control._action_screenshot (cyclomatic 20) · ×1
  • browser_control._action_screenshot (cyclomatic 20) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2280 — browser_control._action_screenshot 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 · message_request_normalizer._strip_media_blocks_in_place (cyclomatic 20) · ×1
  • message_request_normalizer._strip_media_blocks_in_place (cyclomatic 20) src/qwenpaw/agents/utils/message_request_normalizer.py:400 — message_request_normalizer._strip_media_blocks_in_place 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 · ChannelIngressService.drain (cyclomatic 20) · ×1
  • ChannelIngressService.drain (cyclomatic 20) src/qwenpaw/app/channels/ingress.py:909 — ChannelIngressService.drain 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 · MessageRenderer.parts_to_text (cyclomatic 20) · ×1
  • MessageRenderer.parts_to_text (cyclomatic 20) src/qwenpaw/app/channels/renderer.py:528 — MessageRenderer.parts_to_text has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · community_feedback.resolve_feedback_link (cyclomatic 20) · ×1
  • community_feedback.resolve_feedback_link (cyclomatic 20) src/qwenpaw/app/community_feedback.py:55 — community_feedback.resolve_feedback_link 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 · Workspace.bootstrap_plugins (cyclomatic 20) · ×1
  • Workspace.bootstrap_plugins (cyclomatic 20) src/qwenpaw/app/workspace/workspace.py:311 — Workspace.bootstrap_plugins has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · worker.execute_request (cyclomatic 20) · ×1
  • worker.execute_request (cyclomatic 20) REDACTED:617 — worker.execute_request 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 · SharedEndpointService._validate_endpoint (cyclomatic 20) · ×1
  • SharedEndpointService._validate_endpoint (cyclomatic 20) src/qwenpaw/channel_protocol/host.py:394 — SharedEndpointService._validate_endpoint has cyclomatic complexity 20 (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 · SendParams.from_mapping (cyclomatic 20) · ×1
  • SendParams.from_mapping (cyclomatic 20) src/qwenpaw/channel_protocol/models.py:1277 — SendParams.from_mapping has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · desktop_cmd.desktop_cmd (cyclomatic 20) · ×1
  • desktop_cmd.desktop_cmd (cyclomatic 20) REDACTED:232 — desktop_cmd.desktop_cmd has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PawAppContext.get_session_history (cyclomatic 20) · ×1
  • PawAppContext.get_session_history (cyclomatic 20) src/qwenpaw/pawapp/context.py:279 — PawAppContext.get_session_history 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 · ManagedService._start (cyclomatic 20) · ×1
  • ManagedService._start (cyclomatic 20) src/qwenpaw/pawapp/service.py:261 — ManagedService._start has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dependencies.observe_dependencies (cyclomatic 20) · ×1
  • dependencies.observe_dependencies (cyclomatic 20) src/qwenpaw/plugins/execution/dependencies.py:875 — dependencies.observe_dependencies 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 · PluginProcess._cleanup_owned (cyclomatic 20) · ×1
  • PluginProcess._cleanup_owned (cyclomatic 20) src/qwenpaw/plugins/execution/process.py:1082 — PluginProcess._cleanup_owned has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PluginLoader._cleanup_plugin_tools (cyclomatic 20) · ×1
  • PluginLoader._cleanup_plugin_tools (cyclomatic 20) src/qwenpaw/plugins/loader.py:4732 — PluginLoader._cleanup_plugin_tools 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 · compatibility_safety.mcp_inline_secret_risks (cyclomatic 20) · ×1
  • compatibility_safety.mcp_inline_secret_risks (cyclomatic 20) src/qwenpaw/portability/compatibility_safety.py:79 — compatibility_safety.mcp_inline_secret_risks 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 · import_conversations.import_conversations (cyclomatic 20) · ×1
  • import_conversations.import_conversations (cyclomatic 20) src/qwenpaw/portability/import_conversations.py:36 — import_conversations.import_conversations 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 · CodexRolloutReader._index (cyclomatic 20) · ×1
  • CodexRolloutReader._index (cyclomatic 20) src/qwenpaw/portability/providers/codex_rollout_reader.py:277 — CodexRolloutReader._index 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 · codex_schedules._source_cwds (cyclomatic 20) · ×1
  • codex_schedules._source_cwds (cyclomatic 20) src/qwenpaw/portability/providers/codex_schedules.py:274 — codex_schedules._source_cwds 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 · external_state._qoder_mcp_servers (cyclomatic 20) · ×1
  • external_state._qoder_mcp_servers (cyclomatic 20) src/qwenpaw/portability/providers/external_state.py:479 — external_state._qoder_mcp_servers 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 · skill_transfer.read_bounded_tree (cyclomatic 20) · ×1
  • skill_transfer.read_bounded_tree (cyclomatic 20) src/qwenpaw/portability/skill_transfer.py:83 — skill_transfer.read_bounded_tree 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 · decision_model._is_read_only_shell_listing (cyclomatic 20) · ×1
  • decision_model._is_read_only_shell_listing (cyclomatic 20) src/qwenpaw/security/decision_model.py:338 — decision_model._is_read_only_shell_listing has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.SessionListPollingController (cyclomatic 20) · ×1
  • index.SessionListPollingController (cyclomatic 20) console/src/components/SessionListPollingController/index.tsx:15 — index.SessionListPollingController has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 26, 61, 74, …). 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 · ChunkErrorBoundary.render (cyclomatic 20) · ×1
  • ChunkErrorBoundary.render (cyclomatic 20) console/src/components/ChunkErrorBoundary.tsx:235 — ChunkErrorBoundary.render 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 · MediaPreview.MediaPreview (cyclomatic 20) · ×1
  • MediaPreview.MediaPreview (cyclomatic 20) console/src/components/Chat/ToolCards/shared/MediaPreview.tsx:39 — MediaPreview.MediaPreview has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PressFeedback.PressFeedback (cyclomatic 20) · ×1
  • PressFeedback.PressFeedback (cyclomatic 20) console/src/components/interaction/PressFeedback.tsx:5 — PressFeedback.PressFeedback has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 36, 58, 10, …). 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.ProjectSelectModal (cyclomatic 20) · ×1
  • index.ProjectSelectModal (cyclomatic 20) console/src/components/ProjectSelectModal/index.tsx:519 — index.ProjectSelectModal 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 11 function items inside it that branch (handleConfirm, resolveWorkspaceDir, handlePathSelected, …). 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 · useAgentConfig.useAgentConfig.handleSave (cyclomatic 20) · ×1
  • useAgentConfig.useAgentConfig.handleSave (cyclomatic 20) console/src/pages/Agent/Config/useAgentConfig.tsx:121 — useAgentConfig.useAgentConfig.handleSave has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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 · useSkills.useSkills.loadSkillsForAgent (cyclomatic 20) · ×1
  • useSkills.useSkills.loadSkillsForAgent (cyclomatic 20) console/src/pages/Agent/Skills/useSkills.ts:144 — useSkills.useSkills.loadSkillsForAgent has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackendModelSelector.BackendModelSelector (cyclomatic 20) · ×1
  • BackendModelSelector.BackendModelSelector (cyclomatic 20) console/src/pages/Chat/components/BackendModelSelector.tsx:26 — BackendModelSelector.BackendModelSelector has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 105, 78, 55, …). 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.ChannelsPage · ×1
  • index.ChannelsPage::submitJob (cyclomatic 20) console/src/pages/Control/Channels/index.tsx:181 — index.ChannelsPage::submitJob 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 · ExecutionModelSelect.ExecutionModelSelect (cyclomatic 20) · ×1
  • ExecutionModelSelect.ExecutionModelSelect (cyclomatic 20) console/src/pages/Control/CronJobs/components/ExecutionModelSelect.tsx:20 — ExecutionModelSelect.ExecutionModelSelect has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 5 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 · parseCron.parseDaysOfWeek (cyclomatic 20) · ×1
  • parseCron.parseDaysOfWeek (cyclomatic 20) console/src/pages/Control/CronJobs/components/parseCron.ts:199 — parseCron.parseDaysOfWeek 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 · AllowNoAuthHostsTab.AllowNoAuthHostsTab (cyclomatic 20) · ×1
  • AllowNoAuthHostsTab.AllowNoAuthHostsTab (cyclomatic 20) console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:22 — AllowNoAuthHostsTab.AllowNoAuthHostsTab has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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 · DesktopClient.DesktopContent (cyclomatic 20) · ×1
  • DesktopClient.DesktopContent (cyclomatic 20) console/src/tauri/DesktopClient.tsx:100 — DesktopClient.DesktopContent has cyclomatic complexity 20 (threshold 15). Of this number, 15 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 · ExecutionAuthorizationCard.authorizationJumpTarget (cyclomatic 20) · ×1
  • ExecutionAuthorizationCard.authorizationJumpTarget (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:198 — ExecutionAuthorizationCard.authorizationJumpTarget 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 · ExecutionAuthorizationCard.ExecutionAuthorizationCard · ×1
  • ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:379 — ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ExecutionAuthorizationCard.ExecutionAuthorizationCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · HeroComposerCard.HeroComposerCard (cyclomatic 20) · ×1
  • HeroComposerCard.HeroComposerCard (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:31 — HeroComposerCard.HeroComposerCard has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 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 · InspirationExamples.InspirationExamples (cyclomatic 20) · ×1
  • InspirationExamples.InspirationExamples (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/components/creator/InspirationExamples.tsx:22 — InspirationExamples.InspirationExamples 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 6 function items inside it that branch (a function literal at line 98, a function literal at line 49, handleOpen, …). 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 · RelatedAssetPicker.RelatedAssetPicker (cyclomatic 20) · ×1
  • RelatedAssetPicker.RelatedAssetPicker (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/components/workbench/RelatedAssetPicker.tsx:22 — RelatedAssetPicker.RelatedAssetPicker has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 159, a function literal at line 65, a function literal at line 138, …). 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 · agentProgressModel.operationLocator (cyclomatic 20) · ×1
  • agentProgressModel.operationLocator (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:188 — agentProgressModel.operationLocator 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 · agentProgressModel.buildAgentProgressModel.nodeMatchesTask (cyclomatic 20) · ×1
  • agentProgressModel.buildAgentProgressModel.nodeMatchesTask (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:366 — agentProgressModel.buildAgentProgressModel.nodeMatchesTask has cyclomatic complexity 20 (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 · AssetsPage.VoiceGenerationModal (cyclomatic 20) · ×1
  • AssetsPage.VoiceGenerationModal (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1311 — AssetsPage.VoiceGenerationModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (submit, a function literal at line 1333, a function literal at line 1323, …). 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 · creatorSessionStore.useCreatorSessionStore.sendMessage (cyclomatic 20) · ×1
  • creatorSessionStore.useCreatorSessionStore.sendMessage (cyclomatic 20) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:960 — creatorSessionStore.useCreatorSessionStore.sendMessage has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1040, 987, 1021, …). 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 · build-search-index.parseDoc (cyclomatic 20) · ×1
  • build-search-index.parseDoc (cyclomatic 20) website/scripts/build-search-index.mjs:36 — build-search-index.parseDoc has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QuickStart.QuickStart (cyclomatic 20) · ×1
  • QuickStart.QuickStart (cyclomatic 20) website/src/pages/Home/components/QuickStart.tsx:228 — QuickStart.QuickStart 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, separate the cases: extract each independent 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 · file_execution_routes._decide_authorization (cyclomatic 19) · ×1
  • file_execution_routes._decide_authorization (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/api/file_execution_routes.py:786 — file_execution_routes._decide_authorization 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 · project_file_routes.decide_project_review (cyclomatic 19) · ×1
  • project_file_routes.decide_project_review (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1084 — project_file_routes.decide_project_review 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 · asr_model._fun_asr (cyclomatic 19) · ×1
  • asr_model._fun_asr (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:270 — asr_model._fun_asr 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 · text_model._call_openai (cyclomatic 19) · ×1
  • text_model._call_openai (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/models/text_model.py:75 — text_model._call_openai 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 · driver._live_operation_editing_context (cyclomatic 19) · ×1
  • driver._live_operation_editing_context (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:400 — driver._live_operation_editing_context 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 · driver._compact_wire_project_snapshots (cyclomatic 19) · ×1
  • driver._compact_wire_project_snapshots (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:9709 — driver._compact_wire_project_snapshots 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 · model_client.records_to_agentscope_messages (cyclomatic 19) · ×1
  • model_client.records_to_agentscope_messages (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:562 — model_client.records_to_agentscope_messages 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 · FileImageExecutionService._read_set_still_current (cyclomatic 19) · ×1
  • FileImageExecutionService._read_set_still_current (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3195 — FileImageExecutionService._read_set_still_current has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FileImageExecutionService._apply_result (cyclomatic 19) · ×1
  • FileImageExecutionService._apply_result (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3288 — FileImageExecutionService._apply_result 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 · TakeRecorder.stop (cyclomatic 19) · ×1
  • TakeRecorder.stop (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:201 — TakeRecorder.stop has cyclomatic complexity 19 (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 · FfmpegLocalMediaRunner._normalized_overlay (cyclomatic 19) · ×1
  • FfmpegLocalMediaRunner._normalized_overlay (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1926 — FfmpegLocalMediaRunner._normalized_overlay has cyclomatic complexity 19 (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 · AgentProjectTools.read_project_page (cyclomatic 19) · ×1
  • AgentProjectTools.read_project_page (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1002 — AgentProjectTools.read_project_page 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 · AssetFileStore._publish_staged_path_fallback (cyclomatic 19) · ×1
  • AssetFileStore._publish_staged_path_fallback (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/project_files/assets.py:427 — AssetFileStore._publish_staged_path_fallback has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · edit_impact._rebind_motion_copy (cyclomatic 19) · ×1
  • edit_impact._rebind_motion_copy (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/project_files/edit_impact.py:253 — edit_impact._rebind_motion_copy 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 · JqProjectTransformer.transform (cyclomatic 19) · ×1
  • JqProjectTransformer.transform (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/project_files/jq_transform.py:52 — JqProjectTransformer.transform has cyclomatic complexity 19 (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 · faithfulness.build_faithfulness_elements (cyclomatic 19) · ×1
  • faithfulness.build_faithfulness_elements (cyclomatic 19) plugins/apps/qwenpaw-creator/backend/services/run_review/faithfulness.py:65 — faithfulness.build_faithfulness_elements 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 · _StepTracker.process (cyclomatic 19) · ×1
  • _StepTracker.process (cyclomatic 19) plugins/bundle/cloudpaw/tools/a2a_call.py:238 — _StepTracker.process 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 · proposal_choice._normalize_proposals (cyclomatic 19) · ×1
  • proposal_choice._normalize_proposals (cyclomatic 19) plugins/bundle/cloudpaw/tools/proposal_choice.py:117 — proposal_choice._normalize_proposals 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 · dispatch._element_line (cyclomatic 19) · ×1
  • dispatch._element_line (cyclomatic 19) plugins/bundle/computer-use/computer_use/dispatch.py:157 — dispatch._element_line has cyclomatic complexity 19 (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 · DingTalkPlatform._cleanup (cyclomatic 19) · ×1
  • DingTalkPlatform._cleanup (cyclomatic 19) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:200 — DingTalkPlatform._cleanup 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 · DingTalkPlatform._stream_ai_card (cyclomatic 19) · ×1
  • DingTalkPlatform._stream_ai_card (cyclomatic 19) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:1087 — DingTalkPlatform._stream_ai_card 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 · FeishuDriver._perform_send (cyclomatic 19) · ×1
  • FeishuDriver._perform_send (cyclomatic 19) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:476 — FeishuDriver._perform_send 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 · LarkOapiPlatform._parse_message_content (cyclomatic 19) · ×1
  • LarkOapiPlatform._parse_message_content (cyclomatic 19) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:740 — LarkOapiPlatform._parse_message_content 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 · MatrixPlatform.stop (cyclomatic 19) · ×1
  • MatrixPlatform.stop (cyclomatic 19) REDACTED:370 — MatrixPlatform.stop has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MatrixPlatform.send_parts (cyclomatic 19) · ×1
  • MatrixPlatform.send_parts (cyclomatic 19) REDACTED:2867 — MatrixPlatform.send_parts 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 · SlackSender.resolve_route (cyclomatic 19) · ×1
  • SlackSender.resolve_route (cyclomatic 19) plugins/channel/slack/qwenpaw_channel_slack/sender.py:495 — SlackSender.resolve_route has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WeComDriver._perform_send (cyclomatic 19) · ×1
  • WeComDriver._perform_send (cyclomatic 19) plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:302 — WeComDriver._perform_send 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 · YuanbaoPlatform._parse_msg_body (cyclomatic 19) · ×1
  • YuanbaoPlatform._parse_msg_body (cyclomatic 19) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:484 — YuanbaoPlatform._parse_msg_body 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 · YuanbaoPlatform.send_parts (cyclomatic 19) · ×1
  • YuanbaoPlatform.send_parts (cyclomatic 19) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:1070 — YuanbaoPlatform.send_parts 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 · discovery.resolve_codex_binary_info (cyclomatic 19) · ×1
  • discovery.resolve_codex_binary_info (cyclomatic 19) plugins/harness/codex/discovery.py:90 — discovery.resolve_codex_binary_info 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 · event_mapper.history_items (cyclomatic 19) · ×1
  • event_mapper.history_items (cyclomatic 19) plugins/harness/qoder/event_mapper.py:184 — event_mapper.history_items 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 · wan27_tool.image_to_video_wan (cyclomatic 19) · ×1
  • wan27_tool.image_to_video_wan (cyclomatic 19) plugins/tool/wan27/wan27_tool.py:390 — wan27_tool.image_to_video_wan 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 · message._coerce_block (cyclomatic 19) · ×1
  • message._coerce_block (cyclomatic 19) src/qwenpaw/_compat/message.py:127 — message._coerce_block 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 · CommandHandler._process_reme (cyclomatic 19) · ×1
  • CommandHandler._process_reme (cyclomatic 19) src/qwenpaw/agents/command_handler.py:914 — CommandHandler._process_reme has cyclomatic complexity 19 (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 · DecisionCompactor._compact (cyclomatic 19) · ×1
  • DecisionCompactor._compact (cyclomatic 19) src/qwenpaw/agents/context/decision_compaction.py:85 — DecisionCompactor._compact has cyclomatic complexity 19 (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 · renderer._split_visual_pages (cyclomatic 19) · ×1
  • renderer._split_visual_pages (cyclomatic 19) src/qwenpaw/agents/context/visual_compression/rendering/renderer.py:351 — renderer._split_visual_pages 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 · reme_inbox.build_payload (cyclomatic 19) · ×1
  • reme_inbox.build_payload (cyclomatic 19) src/qwenpaw/agents/memory/reme_inbox.py:88 — reme_inbox.build_payload 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 · model_factory._prepare_media_sources (cyclomatic 19) · ×1
  • model_factory._prepare_media_sources (cyclomatic 19) src/qwenpaw/agents/model_factory.py:466 — model_factory._prepare_media_sources 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 · hub.search_hub_skills (cyclomatic 19) · ×1
  • hub.search_hub_skills (cyclomatic 19) src/qwenpaw/agents/skill_system/hub.py:2131 — hub.search_hub_skills has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · registry.auto_update_builtin_skills (cyclomatic 19) · ×1
  • registry.auto_update_builtin_skills (cyclomatic 19) src/qwenpaw/agents/skill_system/registry.py:1753 — registry.auto_update_builtin_skills 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 · view_media.view_image (cyclomatic 19) · ×1
  • view_media.view_image (cyclomatic 19) src/qwenpaw/agents/tools/view_media.py:672 — view_media.view_image 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 · IsolatedChannelProxy._admit_batch (cyclomatic 19) · ×1
  • IsolatedChannelProxy._admit_batch (cyclomatic 19) src/qwenpaw/app/channels/isolated_proxy.py:643 — IsolatedChannelProxy._admit_batch 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 · IsolatedChannelProxy.build_agent_request_from_native (cyclomatic 19) · ×1
  • IsolatedChannelProxy.build_agent_request_from_native (cyclomatic 19) src/qwenpaw/app/channels/isolated_proxy.py:966 — IsolatedChannelProxy.build_agent_request_from_native 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 · ChannelQRCodeSessions.save_confirmed (cyclomatic 19) · ×1
  • ChannelQRCodeSessions.save_confirmed (cyclomatic 19) src/qwenpaw/app/channels/qrcode_sessions.py:819 — ChannelQRCodeSessions.save_confirmed 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 · CommunityConnectionService._request (cyclomatic 19) · ×1
  • CommunityConnectionService._request (cyclomatic 19) src/qwenpaw/app/community_connection.py:371 — CommunityConnectionService._request has cyclomatic complexity 19 (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 · community_drafts._inline_nodes (cyclomatic 19) · ×1
  • community_drafts._inline_nodes (cyclomatic 19) src/qwenpaw/app/community_drafts.py:100 — community_drafts._inline_nodes has cyclomatic complexity 19 (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 · console._extract_session_and_payload (cyclomatic 19) · ×1
  • console._extract_session_and_payload (cyclomatic 19) src/qwenpaw/app/routers/console.py:295 — console._extract_session_and_payload 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 · console.post_mark_inbox_read (cyclomatic 19) · ×1
  • console.post_mark_inbox_read (cyclomatic 19) src/qwenpaw/app/routers/console.py:902 — console.post_mark_inbox_read 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 · create_helpers.add_agent_workspaces (cyclomatic 19) · ×1
  • create_helpers.add_agent_workspaces (cyclomatic 19) src/qwenpaw/backup/_ops/create_helpers.py:37 — create_helpers.add_agent_workspaces 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 · Browser.connect (cyclomatic 19) · ×1
  • Browser.connect (cyclomatic 19) src/qwenpaw/browser/sdk/facade.py:271 — Browser.connect 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 · cron_cmd.create_job (cyclomatic 19) · ×1
  • cron_cmd.create_job (cyclomatic 19) src/qwenpaw/cli/cron_cmd.py:526 — cron_cmd.create_job 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 · skills_cmd.install_cmd (cyclomatic 19) · ×1
  • skills_cmd.install_cmd (cyclomatic 19) src/qwenpaw/cli/skills_cmd.py:976 — skills_cmd.install_cmd 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 · update_cmd.update_cmd (cyclomatic 19) · ×1
  • update_cmd.update_cmd (cyclomatic 19) src/qwenpaw/cli/update_cmd.py:700 — update_cmd.update_cmd 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 · utils._load_and_validate_config (cyclomatic 19) · ×1
  • utils._load_and_validate_config (cyclomatic 19) src/qwenpaw/config/utils.py:563 — utils._load_and_validate_config 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 · mcp_binding.binding_to_response (cyclomatic 19) · ×1
  • mcp_binding.binding_to_response (cyclomatic 19) src/qwenpaw/drivers/adapters/mcp_binding.py:228 — mcp_binding.binding_to_response 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 · tool_adapter._policy_tool_call (cyclomatic 19) · ×1
  • tool_adapter._policy_tool_call (cyclomatic 19) src/qwenpaw/governance/tool_adapter.py:517 — tool_adapter._policy_tool_call has cyclomatic complexity 19 (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 · protocol.upstream_payload (cyclomatic 19) · ×1
  • protocol.upstream_payload (cyclomatic 19) src/qwenpaw/hub/model_service/protocol.py:106 — protocol.upstream_payload 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 · ChatReply.text (cyclomatic 19) · ×1
  • ChatReply.text (cyclomatic 19) src/qwenpaw/pawapp/context.py:752 — ChatReply.text 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 · dependency_maintenance.live_readers (cyclomatic 19) · ×1
  • dependency_maintenance.live_readers (cyclomatic 19) src/qwenpaw/plugins/dependency_maintenance.py:587 — dependency_maintenance.live_readers 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 · DependencyUpgradeManager._legacy_collect_consumers (cyclomatic 19) · ×1
  • DependencyUpgradeManager._legacy_collect_consumers (cyclomatic 19) src/qwenpaw/plugins/dependency_upgrade.py:517 — DependencyUpgradeManager._legacy_collect_consumers 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 · DependencyReadEvidence.from_mapping (cyclomatic 19) · ×1
  • DependencyReadEvidence.from_mapping (cyclomatic 19) src/qwenpaw/plugins/execution/dependencies.py:243 — DependencyReadEvidence.from_mapping 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 · PluginLoader.repair_dependencies (cyclomatic 19) · ×1
  • PluginLoader.repair_dependencies (cyclomatic 19) src/qwenpaw/plugins/loader.py:4244 — PluginLoader.repair_dependencies 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 · official_channels.prepare_channel_upgrade (cyclomatic 19) · ×1
  • official_channels.prepare_channel_upgrade (cyclomatic 19) src/qwenpaw/plugins/official_channels.py:269 — official_channels.prepare_channel_upgrade 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 · _RolloutMetadataState.update (cyclomatic 19) · ×1
  • _RolloutMetadataState.update (cyclomatic 19) src/qwenpaw/portability/providers/codex_rollout_reader.py:137 — _RolloutMetadataState.update has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · external_state.discover_codex_plugin_mcp (cyclomatic 19) · ×1
  • external_state.discover_codex_plugin_mcp (cyclomatic 19) src/qwenpaw/portability/providers/external_state.py:602 — external_state.discover_codex_plugin_mcp 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 · qoder_sessions._raw_history_items (cyclomatic 19) · ×1
  • qoder_sessions._raw_history_items (cyclomatic 19) src/qwenpaw/portability/providers/qoder_sessions.py:473 — qoder_sessions._raw_history_items 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 · control.parse_args (cyclomatic 19) · ×1
  • control.parse_args (cyclomatic 19) src/qwenpaw/runtime/commands/control/__init__.py:203 — control.parse_args 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 · image_resize.resize_base64_image (cyclomatic 19) · ×1
  • image_resize.resize_base64_image (cyclomatic 19) src/qwenpaw/utils/image_resize.py:80 — image_resize.resize_base64_image has cyclomatic complexity 19 (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 · useChannels.useChannels.fetchChannels (cyclomatic 19) · ×1
  • useChannels.useChannels.fetchChannels (cyclomatic 19) console/src/pages/Control/Channels/useChannels.ts:26 — useChannels.useChannels.fetchChannels has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 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 · SnapTrend.SnapTrend (cyclomatic 19) · ×1
  • SnapTrend.SnapTrend (cyclomatic 19) console/src/components/interaction/SnapTrend.tsx:11 — SnapTrend.SnapTrend has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (select, a function literal at line 75, a function literal at line 93, …). 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 · Sidebar.Sidebar · ×1
  • Sidebar.Sidebar::handleUpdateProfile (cyclomatic 19) console/src/layouts/Sidebar.tsx:540 — Sidebar.Sidebar::handleUpdateProfile has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Sidebar.Sidebar) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · chatThemeColor.isSafeCssColor (cyclomatic 19) · ×1
  • chatThemeColor.isSafeCssColor (cyclomatic 19) console/src/utils/chatThemeColor.ts:72 — chatThemeColor.isSafeCssColor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useOsNotifyPoller.useOsNotifyPoller (cyclomatic 19) · ×1
  • useOsNotifyPoller.useOsNotifyPoller (cyclomatic 19) console/src/os/useOsNotifyPoller.ts:39 — useOsNotifyPoller.useOsNotifyPoller has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 66, 81, 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.
D1 · Cyclomatic Complexity · useWorkspaceWatch._runLoop (cyclomatic 19) · ×1
  • useWorkspaceWatch._runLoop (cyclomatic 19) console/src/hooks/useWorkspaceWatch.ts:43 — useWorkspaceWatch._runLoop 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 · fileIdentity.workspacePath (cyclomatic 19) · ×1
  • fileIdentity.workspacePath (cyclomatic 19) console/src/features/files-workspace/fileIdentity.ts:42 — fileIdentity.workspacePath has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MemoryGraphView.createGraphNodeVisual (cyclomatic 19) · ×1
  • MemoryGraphView.createGraphNodeVisual (cyclomatic 19) REDACTED:383 — MemoryGraphView.createGraphNodeVisual has cyclomatic complexity 19 (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 · SkillCard.SkillCard (cyclomatic 19) · ×1
  • SkillCard.SkillCard (cyclomatic 19) console/src/pages/Agent/Skills/components/SkillCard.tsx:28 — SkillCard.SkillCard has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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 · AppCard.AppCard (cyclomatic 19) · ×1
  • AppCard.AppCard (cyclomatic 19) console/src/pages/AppCenter/AppCard.tsx:43 — AppCard.AppCard has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.AgentsPage · ×1
  • index.AgentsPage::handleSubmit (cyclomatic 19) console/src/pages/Settings/Agents/index.tsx:153 — index.AgentsPage::handleSubmit 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 · useSkillPool.useSkillPool.handleImportBuiltins (cyclomatic 19) · ×1
  • useSkillPool.useSkillPool.handleImportBuiltins (cyclomatic 19) console/src/pages/Settings/SkillPool/useSkillPool.tsx:754 — useSkillPool.useSkillPool.handleImportBuiltins has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSkillPool.useSkillPool.handleZipImport (cyclomatic 19) · ×1
  • useSkillPool.useSkillPool.handleZipImport (cyclomatic 19) console/src/pages/Settings/SkillPool/useSkillPool.tsx:1151 — useSkillPool.useSkillPool.handleZipImport has cyclomatic complexity 19 (threshold 15). Of this number, 16 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 · AssetsPage.visualItemGroups (cyclomatic 19) · ×1
  • AssetsPage.visualItemGroups (cyclomatic 19) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:593 — AssetsPage.visualItemGroups has cyclomatic complexity 19 (threshold 15). Of this number, 16 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 · engine.action (cyclomatic 19) · ×1
  • engine.action (cyclomatic 19) src/qwenpaw/browser/control_link/injected/engine.js:342 — engine.action has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Nav.Nav (cyclomatic 19) · ×1
  • Nav.Nav (cyclomatic 19) website/src/components/Nav.tsx:69 — Nav.Nav has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 103, a function literal at line 171, a function literal at line 268, …). 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 · ShinyText.ShinyText (cyclomatic 19) · ×1
  • ShinyText.ShinyText (cyclomatic 19) website/src/components/ShinyText.tsx:24 — ShinyText.ShinyText has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 46, 99, 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 · ThreadStore.list_threads (cyclomatic 18) · ×1
  • ThreadStore.list_threads (cyclomatic 18) REDACTED:579 — ThreadStore.list_threads 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 · file_asset_routes.ingest_asset (cyclomatic 18) · ×1
  • file_asset_routes.ingest_asset (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:1625 — file_asset_routes.ingest_asset 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 · file_script_routes._read_script_payload (cyclomatic 18) · ×1
  • file_script_routes._read_script_payload (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/api/file_script_routes.py:102 — file_script_routes._read_script_payload 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 · project_file_routes._recover_patch_response (cyclomatic 18) · ×1
  • project_file_routes._recover_patch_response (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:308 — project_file_routes._recover_patch_response 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 · config.get_video_backend (cyclomatic 18) · ×1
  • config.get_video_backend (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/models/config.py:1905 — config.get_video_backend 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 · image.get_image_backend (cyclomatic 18) · ×1
  • image.get_image_backend (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/models/image/__init__.py:95 — image.get_image_backend has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · text_model._call_gemini (cyclomatic 18) · ×1
  • text_model._call_gemini (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/models/text_model.py:217 — text_model._call_gemini 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 · kling.check_status (cyclomatic 18) · ×1
  • kling.check_status (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/models/video_backends/kling.py:240 — kling.check_status 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 · video_capabilities.video_reference_capability (cyclomatic 18) · ×1
  • video_capabilities.video_reference_capability (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:919 — video_capabilities.video_reference_capability 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 · FileCreatorAgentRuntime._start_attached_source_understanding (cyclomatic 18) · ×1
  • FileCreatorAgentRuntime._start_attached_source_understanding (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3130 — FileCreatorAgentRuntime._start_attached_source_understanding 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 · FileCreatorAgentRuntime._run_mainline_workgraph_execution (cyclomatic 18) · ×1
  • FileCreatorAgentRuntime._run_mainline_workgraph_execution (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4003 — FileCreatorAgentRuntime._run_mainline_workgraph_execution 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 · manual_regeneration_hold.admission_guard (cyclomatic 18) · ×1
  • manual_regeneration_hold.admission_guard (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/manual_regeneration_hold.py:344 — manual_regeneration_hold.admission_guard 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 · subagents.specialist_system_prompt (cyclomatic 18) · ×1
  • subagents.specialist_system_prompt (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/subagents.py:136 — subagents.specialist_system_prompt 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 · FfmpegLocalMediaRunner._validate_supported_directives (cyclomatic 18) · ×1
  • FfmpegLocalMediaRunner._validate_supported_directives (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1989 — FfmpegLocalMediaRunner._validate_supported_directives 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 · motion_overlay._verify_captured_frames (cyclomatic 18) · ×1
  • motion_overlay._verify_captured_frames (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1084 — motion_overlay._verify_captured_frames 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 · narration_generation.narration_input (cyclomatic 18) · ×1
  • narration_generation.narration_input (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/media_files/narration_generation.py:19 — narration_generation.narration_input 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 · r2v_execution._resolve_reference_versions (cyclomatic 18) · ×1
  • r2v_execution._resolve_reference_versions (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:618 — r2v_execution._resolve_reference_versions 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 · AssetFileStore.publish (cyclomatic 18) · ×1
  • AssetFileStore.publish (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/project_files/assets.py:276 — AssetFileStore.publish has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CreatorFileServices._auto_continue_storyboard_videos (cyclomatic 18) · ×1
  • CreatorFileServices._auto_continue_storyboard_videos (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:409 — CreatorFileServices._auto_continue_storyboard_videos 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 · json_pointer.apply_changes (cyclomatic 18) · ×1
  • json_pointer.apply_changes (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:217 — json_pointer.apply_changes 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 · scene_review._parse_checks (cyclomatic 18) · ×1
  • scene_review._parse_checks (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:281 — scene_review._parse_checks 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 · media_review.run_media_review_loop (cyclomatic 18) · ×1
  • media_review.run_media_review_loop (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:980 — media_review.run_media_review_loop 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 · prompt_contract._expected_reference_roles (cyclomatic 18) · ×1
  • prompt_contract._expected_reference_roles (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/run_review/prompt_contract.py:155 — prompt_contract._expected_reference_roles 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 · triage._infer_grounding_domain (cyclomatic 18) · ×1
  • triage._infer_grounding_domain (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:303 — triage._infer_grounding_domain 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 · triage._normalize_llm_grounding_analysis (cyclomatic 18) · ×1
  • triage._normalize_llm_grounding_analysis (cyclomatic 18) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:402 — triage._normalize_llm_grounding_analysis 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 · middleware.parse_option_numbers (cyclomatic 18) · ×1
  • middleware.parse_option_numbers (cyclomatic 18) plugins/apps/qwenpaw-data/backend/bridge/middleware.py:47 — middleware.parse_option_numbers has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · manage_prd._handle_create (cyclomatic 18) · ×1
  • manage_prd._handle_create (cyclomatic 18) plugins/bundle/cloudpaw/tools/manage_prd.py:152 — manage_prd._handle_create 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 · DingTalkChannelHandler._parse_rich_content (cyclomatic 18) · ×1
  • DingTalkChannelHandler._parse_rich_content (cyclomatic 18) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:154 — DingTalkChannelHandler._parse_rich_content 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 · management.manage (cyclomatic 18) · ×1
  • management.manage (cyclomatic 18) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/management.py:21 — management.manage 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 · IMessagePlatform._send_parts (cyclomatic 18) · ×1
  • IMessagePlatform._send_parts (cyclomatic 18) plugins/channel/imessage/qwenpaw_channel_imessage/platform.py:274 — IMessagePlatform._send_parts 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 · MatrixPlatform._on_room_event (cyclomatic 18) · ×1
  • MatrixPlatform._on_room_event (cyclomatic 18) REDACTED:2364 — MatrixPlatform._on_room_event 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 · MatrixStateStore._migrate_previous_state (cyclomatic 18) · ×1
  • MatrixStateStore._migrate_previous_state (cyclomatic 18) plugins/channel/matrix/qwenpaw_channel_matrix/state.py:279 — MatrixStateStore._migrate_previous_state 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 · codec.parse_segments (cyclomatic 18) · ×1
  • codec.parse_segments (cyclomatic 18) plugins/channel/onebot/qwenpaw_channel_onebot/codec.py:37 — codec.parse_segments 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 · OneBotInboundMedia._resolve_from_api (cyclomatic 18) · ×1
  • OneBotInboundMedia._resolve_from_api (cyclomatic 18) plugins/channel/onebot/qwenpaw_channel_onebot/media.py:394 — OneBotInboundMedia._resolve_from_api 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 · WeComPlatform._stop_owned (cyclomatic 18) · ×1
  • WeComPlatform._stop_owned (cyclomatic 18) REDACTED:430 — WeComPlatform._stop_owned 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 · utils._format_table (cyclomatic 18) · ×1
  • utils._format_table (cyclomatic 18) plugins/channel/wecom/qwenpaw_channel_wecom/utils.py:67 — utils._format_table 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 · OpenVikingClient._request (cyclomatic 18) · ×1
  • OpenVikingClient._request (cyclomatic 18) plugins/memory/openviking/backend/client.py:194 — OpenVikingClient._request 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 · ScrollContextManager._persist_new (cyclomatic 18) · ×1
  • ScrollContextManager._persist_new (cyclomatic 18) src/qwenpaw/agents/context/scroll/manager.py:1886 — ScrollContextManager._persist_new 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 · ScrollContextManager._prune_bookkeeping_to_live_context (cyclomatic 18) · ×1
  • ScrollContextManager._prune_bookkeeping_to_live_context (cyclomatic 18) src/qwenpaw/agents/context/scroll/manager.py:2155 — ScrollContextManager._prune_bookkeeping_to_live_context 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 · MemorySpace._search_saved_tool_files (cyclomatic 18) · ×1
  • MemorySpace._search_saved_tool_files (cyclomatic 18) src/qwenpaw/agents/context/scroll/memoryspace.py:1577 — MemorySpace._search_saved_tool_files 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 · recall_tool._render_row_blocks (cyclomatic 18) · ×1
  • recall_tool._render_row_blocks (cyclomatic 18) src/qwenpaw/agents/context/scroll/recall_tool.py:464 — recall_tool._render_row_blocks 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 · fork_project.mark_fork_failed (cyclomatic 18) · ×1
  • fork_project.mark_fork_failed (cyclomatic 18) src/qwenpaw/agents/fork_project.py:900 — fork_project.mark_fork_failed 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 · fork_project._apply_crash_recovery (cyclomatic 18) · ×1
  • fork_project._apply_crash_recovery (cyclomatic 18) src/qwenpaw/agents/fork_project.py:1223 — fork_project._apply_crash_recovery 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 · BaseMemoryManager.get_runtime_status (cyclomatic 18) · ×1
  • BaseMemoryManager.get_runtime_status (cyclomatic 18) REDACTED:647 — BaseMemoryManager.get_runtime_status 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 · browser_control._action_file_download (cyclomatic 18) · ×1
  • browser_control._action_file_download (cyclomatic 18) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3342 — browser_control._action_file_download 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 · browser_control._action_tabs (cyclomatic 18) · ×1
  • browser_control._action_tabs (cyclomatic 18) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4188 — browser_control._action_tabs 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 · browser_snapshot._process_line (cyclomatic 18) · ×1
  • browser_snapshot._process_line (cyclomatic 18) src/qwenpaw/agents/tools/deprecated_browser/browser_snapshot.py:135 — browser_snapshot._process_line 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 · BaseChannel._on_stream_content_delta (cyclomatic 18) · ×1
  • BaseChannel._on_stream_content_delta (cyclomatic 18) src/qwenpaw/app/channels/base.py:724 — BaseChannel._on_stream_content_delta 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 · ChannelManager.replace_channel (cyclomatic 18) · ×1
  • ChannelManager.replace_channel (cyclomatic 18) src/qwenpaw/app/channels/manager.py:1955 — ChannelManager.replace_channel 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 · ChannelQRCodeSessions.fetch (cyclomatic 18) · ×1
  • ChannelQRCodeSessions.fetch (cyclomatic 18) src/qwenpaw/app/channels/qrcode_sessions.py:516 — ChannelQRCodeSessions.fetch 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 · heartbeat.run_heartbeat_once (cyclomatic 18) · ×1
  • heartbeat.run_heartbeat_once (cyclomatic 18) src/qwenpaw/app/crons/heartbeat.py:189 — heartbeat.run_heartbeat_once 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 · MultiAgentManager.start_all_configured_agents (cyclomatic 18) · ×1
  • MultiAgentManager.start_all_configured_agents (cyclomatic 18) src/qwenpaw/app/multi_agent_manager.py:1433 — MultiAgentManager.start_all_configured_agents 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 · skills._build_pool_skill_detail (cyclomatic 18) · ×1
  • skills._build_pool_skill_detail (cyclomatic 18) src/qwenpaw/app/routers/skills.py:1079 — skills._build_pool_skill_detail 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 · observe.probe_contract_drift (cyclomatic 18) · ×1
  • observe.probe_contract_drift (cyclomatic 18) src/qwenpaw/browser/control_link/chrome/observe.py:105 — observe.probe_contract_drift 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 · normalization.normalize_inbound_event (cyclomatic 18) · ×1
  • normalization.normalize_inbound_event (cyclomatic 18) src/qwenpaw/channel_protocol/normalization.py:8 — normalization.normalize_inbound_event 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 · requirements._canonical_url (cyclomatic 18) · ×1
  • requirements._canonical_url (cyclomatic 18) src/qwenpaw/channel_protocol/requirements.py:96 — requirements._canonical_url 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 · SharedResponseDriver._checkpoint_reserve (cyclomatic 18) · ×1
  • SharedResponseDriver._checkpoint_reserve (cyclomatic 18) src/qwenpaw/channel_protocol/shared_response_driver.py:429 — SharedResponseDriver._checkpoint_reserve 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 · SharedResponseDriver._delivery_attempt (cyclomatic 18) · ×1
  • SharedResponseDriver._delivery_attempt (cyclomatic 18) src/qwenpaw/channel_protocol/shared_response_driver.py:851 — SharedResponseDriver._delivery_attempt 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 · doctor_checks.scan_unknown_config_keys (cyclomatic 18) · ×1
  • doctor_checks.scan_unknown_config_keys (cyclomatic 18) src/qwenpaw/cli/doctor_checks.py:366 — doctor_checks.scan_unknown_config_keys 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 · config.build_fallback_agent_profile_config (cyclomatic 18) · ×1
  • config.build_fallback_agent_profile_config (cyclomatic 18) src/qwenpaw/config/config.py:3531 — config.build_fallback_agent_profile_config 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 · config.save_agent_config (cyclomatic 18) · ×1
  • config.save_agent_config (cyclomatic 18) src/qwenpaw/config/config.py:3973 — config.save_agent_config has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · mcp_legacy_config._build_legacy_credential (cyclomatic 18) · ×1
  • mcp_legacy_config._build_legacy_credential (cyclomatic 18) src/qwenpaw/drivers/adapters/mcp_legacy_config.py:313 — mcp_legacy_config._build_legacy_credential 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 · HttpStatelessClient.list_tools (cyclomatic 18) · ×1
  • HttpStatelessClient.list_tools (cyclomatic 18) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:635 — HttpStatelessClient.list_tools 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 · api._bridge_to_runtime (cyclomatic 18) · ×1
  • api._bridge_to_runtime (cyclomatic 18) src/qwenpaw/plugins/api.py:162 — api._bridge_to_runtime 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 · azure_legacy._capture_sources (cyclomatic 18) · ×1
  • azure_legacy._capture_sources (cyclomatic 18) src/qwenpaw/plugins/azure_legacy.py:201 — azure_legacy._capture_sources 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 · DependencyEnvironmentContext.from_runtime (cyclomatic 18) · ×1
  • DependencyEnvironmentContext.from_runtime (cyclomatic 18) src/qwenpaw/plugins/dependency_context.py:67 — DependencyEnvironmentContext.from_runtime 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 · PluginProcess._control (cyclomatic 18) · ×1
  • PluginProcess._control (cyclomatic 18) src/qwenpaw/plugins/execution/process.py:812 — PluginProcess._control 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 · legacy_cloudpaw.remember (cyclomatic 18) · ×1
  • legacy_cloudpaw.remember (cyclomatic 18) src/qwenpaw/plugins/legacy_cloudpaw.py:134 — legacy_cloudpaw.remember 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 · updates._restore_one_marker (cyclomatic 18) · ×1
  • updates._restore_one_marker (cyclomatic 18) src/qwenpaw/plugins/updates.py:267 — updates._restore_one_marker 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 · WorkspaceProjector.revoke (cyclomatic 18) · ×1
  • WorkspaceProjector.revoke (cyclomatic 18) src/qwenpaw/plugins/workspace_projector.py:266 — WorkspaceProjector.revoke 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 · external_state.discover_codex_memory (cyclomatic 18) · ×1
  • external_state.discover_codex_memory (cyclomatic 18) src/qwenpaw/portability/providers/external_state.py:134 — external_state.discover_codex_memory 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 · external_state._qwen_plugin_source (cyclomatic 18) · ×1
  • external_state._qwen_plugin_source (cyclomatic 18) src/qwenpaw/portability/providers/external_state.py:688 — external_state._qwen_plugin_source 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 · WireProtocol.response (cyclomatic 18) · ×1
  • WireProtocol.response (cyclomatic 18) src/qwenpaw/providers/adapters/wire_protocol.py:281 — WireProtocol.response 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 · WireProtocol.event (cyclomatic 18) · ×1
  • WireProtocol.event (cyclomatic 18) src/qwenpaw/providers/adapters/wire_protocol.py:344 — WireProtocol.event 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 · ProviderManagerPersistenceMixin._merge_plugin_model_update (cyclomatic 18) · ×1
  • ProviderManagerPersistenceMixin._merge_plugin_model_update (cyclomatic 18) src/qwenpaw/providers/provider_manager_persistence.py:205 — ProviderManagerPersistenceMixin._merge_plugin_model_update 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 · CheckpointCommandHandler._restore (cyclomatic 18) · ×1
  • CheckpointCommandHandler._restore (cyclomatic 18) src/qwenpaw/runtime/commands/control/checkpoint_handler.py:279 — CheckpointCommandHandler._restore 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 · Runtime._inject_partial_response (cyclomatic 18) · ×1
  • Runtime._inject_partial_response (cyclomatic 18) src/qwenpaw/runtime/runtime.py:389 — Runtime._inject_partial_response 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 · ToolRegistry.filter (cyclomatic 18) · ×1
  • ToolRegistry.filter (cyclomatic 18) src/qwenpaw/runtime/tool_registry.py:153 — ToolRegistry.filter 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 · chunkServerReadiness.waitForChunkServerReady (cyclomatic 18) · ×1
  • chunkServerReadiness.waitForChunkServerReady (cyclomatic 18) console/src/utils/chunkServerReadiness.ts:104 — chunkServerReadiness.waitForChunkServerReady 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 · usePluginLoader.loadFrontendPlugin (cyclomatic 18) · ×1
  • usePluginLoader.loadFrontendPlugin (cyclomatic 18) console/src/plugins/usePluginLoader.ts:166 — usePluginLoader.loadFrontendPlugin has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 187, 177). 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 · utils.extractUrlFromResultBlocks (cyclomatic 18) · ×1
  • utils.extractUrlFromResultBlocks (cyclomatic 18) REDACTED:161 — utils.extractUrlFromResultBlocks 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 · MarkdownCopy.MarkdownCopy (cyclomatic 18) · ×1
  • MarkdownCopy.MarkdownCopy (cyclomatic 18) console/src/components/MarkdownCopy/MarkdownCopy.tsx:45 — MarkdownCopy.MarkdownCopy has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (copyToClipboard, a function literal at line 70, a function literal at line 62, …). 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 · ReMeStatusModal.ReMeStatusModal (cyclomatic 18) · ×1
  • ReMeStatusModal.ReMeStatusModal (cyclomatic 18) console/src/pages/Agent/Config/components/ReMeStatusModal.tsx:23 — ReMeStatusModal.ReMeStatusModal has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDirectoryListing.useDirectoryListing.load (cyclomatic 18) · ×1
  • useDirectoryListing.useDirectoryListing.load (cyclomatic 18) console/src/features/files-workspace/useDirectoryListing.ts:65 — useDirectoryListing.useDirectoryListing.load has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FilesNavigator.FilesNavigator · ×1
  • FilesNavigator.FilesNavigator::handleTreeKeyDown (cyclomatic 18) console/src/features/files-workspace/FilesNavigator.tsx:1018 — FilesNavigator.FilesNavigator::handleTreeKeyDown 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 (FilesNavigator.FilesNavigator) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · LongTextPaste.LongTextPasteInput (cyclomatic 18) · ×1
  • LongTextPaste.LongTextPasteInput (cyclomatic 18) console/src/pages/Chat/LongTextPaste.tsx:111 — LongTextPaste.LongTextPasteInput 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 151, 129, 122). 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 · chatInputDraft.useChatInputDraft (cyclomatic 18) · ×1
  • chatInputDraft.useChatInputDraft (cyclomatic 18) console/src/pages/Chat/chatInputDraft.ts:205 — chatInputDraft.useChatInputDraft 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 8 function literals inside it that branch (lines 302, 256, 232, …). 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 · PushMessageCard.PushMessageCard (cyclomatic 18) · ×1
  • PushMessageCard.PushMessageCard (cyclomatic 18) console/src/pages/Inbox/components/PushMessageCard.tsx:56 — PushMessageCard.PushMessageCard has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useMarketSearch.useMarketSearch (cyclomatic 18) · ×1
  • useMarketSearch.useMarketSearch (cyclomatic 18) console/src/pages/Settings/Market/useMarketSearch.ts:61 — useMarketSearch.useMarketSearch has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 112, 362, 225, …). 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 · AgentGallery.AgentGallery (cyclomatic 18) · ×1
  • AgentGallery.AgentGallery (cyclomatic 18) console/src/pages/Settings/Agents/components/AgentGallery.tsx:216 — AgentGallery.AgentGallery has cyclomatic complexity 18 (threshold 15). Of this number, 16 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 · RuleTable.RuleTable (cyclomatic 18) · ×1
  • RuleTable.RuleTable (cyclomatic 18) console/src/pages/Settings/Security/components/RuleTable.tsx:22 — RuleTable.RuleTable has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 59, 123, 35). 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 · timelines.restoreSnapshotOperations (cyclomatic 18) · ×1
  • timelines.restoreSnapshotOperations (cyclomatic 18) plugins/apps/qwenpaw-creator/ui/src/api/creator/timelines.ts:407 — timelines.restoreSnapshotOperations has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · imap_ops.move_message (cyclomatic 17) · ×1
  • imap_ops.move_message (cyclomatic 17) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/imap_ops.py:339 — imap_ops.move_message has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · asr_model._sentences (cyclomatic 17) · ×1
  • asr_model._sentences (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:89 — asr_model._sentences has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DashScopeImageModel._poll_task (cyclomatic 17) · ×1
  • DashScopeImageModel._poll_task (cyclomatic 17) REDACTED:365 — DashScopeImageModel._poll_task 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 · DashScopeImageModel._decode (cyclomatic 17) · ×1
  • DashScopeImageModel._decode (cyclomatic 17) REDACTED:488 — DashScopeImageModel._decode 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 · OpenAIImageModel._poll_response (cyclomatic 17) · ×1
  • OpenAIImageModel._poll_response (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:391 — OpenAIImageModel._poll_response has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · veo.build_submit_request (cyclomatic 17) · ×1
  • veo.build_submit_request (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/video_backends/veo.py:75 — veo.build_submit_request has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · video_capabilities._family_constraint_guidance (cyclomatic 17) · ×1
  • video_capabilities._family_constraint_guidance (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1214 — video_capabilities._family_constraint_guidance 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 · video_model._build_kling_body (cyclomatic 17) · ×1
  • video_model._build_kling_body (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/video_model.py:413 — video_model._build_kling_body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · video_model._build_vidu_body (cyclomatic 17) · ×1
  • video_model._build_vidu_body (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/video_model.py:513 — video_model._build_vidu_body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · vlm_model._convert_to_gemini_content (cyclomatic 17) · ×1
  • vlm_model._convert_to_gemini_content (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:686 — vlm_model._convert_to_gemini_content 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 · smoke_web_grounding.main (cyclomatic 17) · ×1
  • smoke_web_grounding.main (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:231 — smoke_web_grounding.main 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 · work_graph._artifact_is_stale (cyclomatic 17) · ×1
  • work_graph._artifact_is_stale (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:586 — work_graph._artifact_is_stale 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 · audio_execution._find_reusable_tts_asset (cyclomatic 17) · ×1
  • audio_execution._find_reusable_tts_asset (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:335 — audio_execution._find_reusable_tts_asset 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 · element_adapter.reconcile_candidate_span (cyclomatic 17) · ×1
  • element_adapter.reconcile_candidate_span (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/element_adapter.py:101 — element_adapter.reconcile_candidate_span 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 · image_execution._resolve_version_references (cyclomatic 17) · ×1
  • image_execution._resolve_version_references (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:809 — image_execution._resolve_version_references 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 · image_execution._provider_bytes (cyclomatic 17) · ×1
  • image_execution._provider_bytes (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1573 — image_execution._provider_bytes 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 · image_execution._image_authoring_fingerprint (cyclomatic 17) · ×1
  • image_execution._image_authoring_fingerprint (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1700 — image_execution._image_authoring_fingerprint 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 · FfmpegLocalMediaRunner._render_sync (cyclomatic 17) · ×1
  • FfmpegLocalMediaRunner._render_sync (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:407 — FfmpegLocalMediaRunner._render_sync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FileLocalMediaExecutionService.recover_project (cyclomatic 17) · ×1
  • FileLocalMediaExecutionService.recover_project (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4932 — FileLocalMediaExecutionService.recover_project 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 · motion_blueprints._scene_edu_step_card (cyclomatic 17) · ×1
  • motion_blueprints._scene_edu_step_card (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1374 — motion_blueprints._scene_edu_step_card has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · r2v_execution._resolve_single_media_version (cyclomatic 17) · ×1
  • r2v_execution._resolve_single_media_version (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:729 — r2v_execution._resolve_single_media_version has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · task_scratch.project_storage_profile (cyclomatic 17) · ×1
  • task_scratch.project_storage_profile (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:727 — task_scratch.project_storage_profile 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 · facade._sweep_legacy_lock_artifacts (cyclomatic 17) · ×1
  • facade._sweep_legacy_lock_artifacts (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:146 — facade._sweep_legacy_lock_artifacts 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 · ReviewDecisionJournal.validate_phase (cyclomatic 17) · ×1
  • ReviewDecisionJournal.validate_phase (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:301 — ReviewDecisionJournal.validate_phase 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 · ProjectReviewService._assert_no_other_active_decision (cyclomatic 17) · ×1
  • ProjectReviewService._assert_no_other_active_decision (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1164 — ProjectReviewService._assert_no_other_active_decision 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 · media_review._derive_plan_context (cyclomatic 17) · ×1
  • media_review._derive_plan_context (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:251 — media_review._derive_plan_context 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 · text_review.parse_sync_advisory (cyclomatic 17) · ×1
  • text_review.parse_sync_advisory (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:219 — text_review.parse_sync_advisory 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 · ProjectRuntimeSessionStore.admit_user_request (cyclomatic 17) · ×1
  • ProjectRuntimeSessionStore.admit_user_request (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1135 — ProjectRuntimeSessionStore.admit_user_request 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 · adapters._normalize_dashscope_web_search_sources (cyclomatic 17) · ×1
  • adapters._normalize_dashscope_web_search_sources (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:422 — adapters._normalize_dashscope_web_search_sources 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 · visual_jobs._visual_entities_from_context (cyclomatic 17) · ×1
  • visual_jobs._visual_entities_from_context (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:173 — visual_jobs._visual_entities_from_context 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 · visual_jobs._filter_visual_search_result_for_job (cyclomatic 17) · ×1
  • visual_jobs._filter_visual_search_result_for_job (cyclomatic 17) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:652 — visual_jobs._filter_visual_search_result_for_job 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 · a2a.register_agent (cyclomatic 17) · ×1
  • a2a.register_agent (cyclomatic 17) REDACTED:240 — a2a.register_agent 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 · DingTalkDriver._perform_send (cyclomatic 17) · ×1
  • DingTalkDriver._perform_send (cyclomatic 17) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:758 — DingTalkDriver._perform_send 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 · LarkOapiPlatform._native_message (cyclomatic 17) · ×1
  • LarkOapiPlatform._native_message (cyclomatic 17) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:1636 — LarkOapiPlatform._native_message 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 · utils._extract_structured_text (cyclomatic 17) · ×1
  • utils._extract_structured_text (cyclomatic 17) plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:193 — utils._extract_structured_text has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMessagePlatform.stop (cyclomatic 17) · ×1
  • IMessagePlatform.stop (cyclomatic 17) plugins/channel/imessage/qwenpaw_channel_imessage/platform.py:331 — IMessagePlatform.stop 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 · MatrixStateStore.bind (cyclomatic 17) · ×1
  • MatrixStateStore.bind (cyclomatic 17) plugins/channel/matrix/qwenpaw_channel_matrix/state.py:377 — MatrixStateStore.bind has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OneBotDriver._normalize_message (cyclomatic 17) · ×1
  • OneBotDriver._normalize_message (cyclomatic 17) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:249 — OneBotDriver._normalize_message has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tool_guard.parse_interaction_event (cyclomatic 17) · ×1
  • tool_guard.parse_interaction_event (cyclomatic 17) plugins/channel/qq/qwenpaw_channel_qq/cards/tool_guard.py:121 — tool_guard.parse_interaction_event has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · formatting._find_quoted_element (cyclomatic 17) · ×1
  • formatting._find_quoted_element (cyclomatic 17) plugins/channel/qq/qwenpaw_channel_qq/formatting.py:196 — formatting._find_quoted_element 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 · WeComPlatform._handle_card (cyclomatic 17) · ×1
  • WeComPlatform._handle_card (cyclomatic 17) REDACTED:1110 — WeComPlatform._handle_card 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 · qwen_image_tool.edit_image_qwen (cyclomatic 17) · ×1
  • qwen_image_tool.edit_image_qwen (cyclomatic 17) plugins/tool/qwen-image/qwen_image_tool.py:486 — qwen_image_tool.edit_image_qwen has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · wan27_tool.reference_to_video_wan (cyclomatic 17) · ×1
  • wan27_tool.reference_to_video_wan (cyclomatic 17) plugins/tool/wan27/wan27_tool.py:694 — wan27_tool.reference_to_video_wan has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · message.msg_from_dict (cyclomatic 17) · ×1
  • message.msg_from_dict (cyclomatic 17) src/qwenpaw/_compat/message.py:190 — message.msg_from_dict 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 · ACPHostedClient._extract_text_from_content (cyclomatic 17) · ×1
  • ACPHostedClient._extract_text_from_content (cyclomatic 17) src/qwenpaw/agents/acp/client.py:416 — ACPHostedClient._extract_text_from_content 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 · ContinuationSummary.from_dict (cyclomatic 17) · ×1
  • ContinuationSummary.from_dict (cyclomatic 17) src/qwenpaw/agents/context/scroll/continuation_summary.py:521 — ContinuationSummary.from_dict 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 · ScrollContextManager._update_continuation_summary_inner (cyclomatic 17) · ×1
  • ScrollContextManager._update_continuation_summary_inner (cyclomatic 17) src/qwenpaw/agents/context/scroll/manager.py:1444 — ScrollContextManager._update_continuation_summary_inner 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 · recall_tool._render_rows (cyclomatic 17) · ×1
  • recall_tool._render_rows (cyclomatic 17) src/qwenpaw/agents/context/scroll/recall_tool.py:506 — recall_tool._render_rows 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 · model_factory._apply_model_fallbacks (cyclomatic 17) · ×1
  • model_factory._apply_model_fallbacks (cyclomatic 17) src/qwenpaw/agents/model_factory.py:2387 — model_factory._apply_model_fallbacks 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 · SkillPoolService.import_from_zip (cyclomatic 17) · ×1
  • SkillPoolService.import_from_zip (cyclomatic 17) src/qwenpaw/agents/skill_system/pool_service.py:261 — SkillPoolService.import_from_zip 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 · SkillPoolService._check_download_conflict (cyclomatic 17) · ×1
  • SkillPoolService._check_download_conflict (cyclomatic 17) src/qwenpaw/agents/skill_system/pool_service.py:982 — SkillPoolService._check_download_conflict 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 · registry.get_pool_builtin_update_notice (cyclomatic 17) · ×1
  • registry.get_pool_builtin_update_notice (cyclomatic 17) src/qwenpaw/agents/skill_system/registry.py:1501 — registry.get_pool_builtin_update_notice 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 · browser_control._ensure_browser (cyclomatic 17) · ×1
  • browser_control._ensure_browser (cyclomatic 17) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1657 — browser_control._ensure_browser 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 · browser_control._action_clear_browser_cache (cyclomatic 17) · ×1
  • browser_control._action_clear_browser_cache (cyclomatic 17) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4390 — browser_control._action_clear_browser_cache 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 · browser_snapshot.build_role_snapshot_from_aria (cyclomatic 17) · ×1
  • browser_snapshot.build_role_snapshot_from_aria (cyclomatic 17) src/qwenpaw/agents/tools/deprecated_browser/browser_snapshot.py:185 — browser_snapshot.build_role_snapshot_from_aria 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 · view_media._resolve_remote_image_target (cyclomatic 17) · ×1
  • view_media._resolve_remote_image_target (cyclomatic 17) src/qwenpaw/agents/tools/view_media.py:163 — view_media._resolve_remote_image_target has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BaseChannel._format_stream_tool_output_body (cyclomatic 17) · ×1
  • BaseChannel._format_stream_tool_output_body (cyclomatic 17) src/qwenpaw/app/channels/base.py:2196 — BaseChannel._format_stream_tool_output_body 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 · ChannelIngressService.__init__ (cyclomatic 17) · ×1
  • ChannelIngressService.__init__ (cyclomatic 17) src/qwenpaw/app/channels/ingress.py:164 — ChannelIngressService.__init__ 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 · IsolatedChannelProxy._state_operation (cyclomatic 17) · ×1
  • IsolatedChannelProxy._state_operation (cyclomatic 17) src/qwenpaw/app/channels/isolated_proxy.py:850 — IsolatedChannelProxy._state_operation 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 · manager.instantiate_channel (cyclomatic 17) · ×1
  • manager.instantiate_channel (cyclomatic 17) src/qwenpaw/app/channels/manager.py:340 — manager.instantiate_channel 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 · utils.file_url_to_local_path (cyclomatic 17) · ×1
  • utils.file_url_to_local_path (cyclomatic 17) src/qwenpaw/app/channels/utils.py:405 — utils.file_url_to_local_path 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 · CommunityConnectionService.status (cyclomatic 17) · ×1
  • CommunityConnectionService.status (cyclomatic 17) src/qwenpaw/app/community_connection.py:443 — CommunityConnectionService.status has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · monitor._authenticated_sender_from_headers (cyclomatic 17) · ×1
  • monitor._authenticated_sender_from_headers (cyclomatic 17) REDACTED:431 — monitor._authenticated_sender_from_headers 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 · CdpVerbsMixin._resolve_in_frame (cyclomatic 17) · ×1
  • CdpVerbsMixin._resolve_in_frame (cyclomatic 17) src/qwenpaw/browser/control_link/cdp_verbs.py:370 — CdpVerbsMixin._resolve_in_frame 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 · NMBridge.request (cyclomatic 17) · ×1
  • NMBridge.request (cyclomatic 17) src/qwenpaw/browser/control_link/chrome/bridge.py:411 — NMBridge.request has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · facade._render_method (cyclomatic 17) · ×1
  • facade._render_method (cyclomatic 17) src/qwenpaw/browser/sdk/facade.py:206 — facade._render_method 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 · SharedResponseDriver._cleanup_effects (cyclomatic 17) · ×1
  • SharedResponseDriver._cleanup_effects (cyclomatic 17) src/qwenpaw/channel_protocol/shared_response_driver.py:1055 — SharedResponseDriver._cleanup_effects 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 · providers_cmd.list_cmd (cyclomatic 17) · ×1
  • providers_cmd.list_cmd (cyclomatic 17) src/qwenpaw/cli/providers_cmd.py:528 — providers_cmd.list_cmd 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 · utils._get_darwin_default_browser (cyclomatic 17) · ×1
  • utils._get_darwin_default_browser (cyclomatic 17) src/qwenpaw/config/utils.py:214 — utils._get_darwin_default_browser 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 · contracts._validate_value_source_bindings (cyclomatic 17) · ×1
  • contracts._validate_value_source_bindings (cyclomatic 17) src/qwenpaw/drivers/contracts.py:256 — contracts._validate_value_source_bindings 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 · contextvars_hook._resolve_turn_project_dirs (cyclomatic 17) · ×1
  • contextvars_hook._resolve_turn_project_dirs (cyclomatic 17) src/qwenpaw/hooks/request_setup/contextvars_hook.py:254 — contextvars_hook._resolve_turn_project_dirs 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 · ModelScopeProvider.search (cyclomatic 17) · ×1
  • ModelScopeProvider.search (cyclomatic 17) src/qwenpaw/market/providers/modelscope.py:37 — ModelScopeProvider.search 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 · QwenPawProvider.search (cyclomatic 17) · ×1
  • QwenPawProvider.search (cyclomatic 17) src/qwenpaw/market/providers/qwenpaw.py:34 — QwenPawProvider.search 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 · AdvisorMiddleware._consume_new_results (cyclomatic 17) · ×1
  • AdvisorMiddleware._consume_new_results (cyclomatic 17) src/qwenpaw/modes/advisor/middleware.py:832 — AdvisorMiddleware._consume_new_results 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 · dependency_transaction._verify_publication_scope (cyclomatic 17) · ×1
  • dependency_transaction._verify_publication_scope (cyclomatic 17) src/qwenpaw/plugins/dependency_transaction.py:721 — dependency_transaction._verify_publication_scope 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 · worker._configure (cyclomatic 17) · ×1
  • worker._configure (cyclomatic 17) src/qwenpaw/plugins/execution/worker.py:64 — worker._configure has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · module_isolation.probe_plugin_source (cyclomatic 17) · ×1
  • module_isolation.probe_plugin_source (cyclomatic 17) src/qwenpaw/plugins/module_isolation.py:590 — module_isolation.probe_plugin_source 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 · PluginRegistry.register_channel (cyclomatic 17) · ×1
  • PluginRegistry.register_channel (cyclomatic 17) src/qwenpaw/plugins/registry.py:869 — PluginRegistry.register_channel has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ActiveAdaptationContext.update_asset (cyclomatic 17) · ×1
  • ActiveAdaptationContext.update_asset (cyclomatic 17) src/qwenpaw/portability/adaptation_loop.py:418 — ActiveAdaptationContext.update_asset has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · planner._hash_inventory_sources (cyclomatic 17) · ×1
  • planner._hash_inventory_sources (cyclomatic 17) src/qwenpaw/portability/planner.py:274 — planner._hash_inventory_sources 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 · BackendExecution._content_from_request (cyclomatic 17) · ×1
  • BackendExecution._content_from_request (cyclomatic 17) src/qwenpaw/runtime/backends/execution.py:640 — BackendExecution._content_from_request 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 · HarnessSessionBridge._output_block (cyclomatic 17) · ×1
  • HarnessSessionBridge._output_block (cyclomatic 17) src/qwenpaw/runtime/backends/session.py:297 — HarnessSessionBridge._output_block has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AgentBuilder._apply_request_project (cyclomatic 17) · ×1
  • AgentBuilder._apply_request_project (cyclomatic 17) src/qwenpaw/runtime/builder.py:808 — AgentBuilder._apply_request_project has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AgentBuilder._build_env_context (cyclomatic 17) · ×1
  • AgentBuilder._build_env_context (cyclomatic 17) src/qwenpaw/runtime/builder.py:883 — AgentBuilder._build_env_context 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 · Runtime._try_save_on_cancel (cyclomatic 17) · ×1
  • Runtime._try_save_on_cancel (cyclomatic 17) src/qwenpaw/runtime/runtime.py:275 — Runtime._try_save_on_cancel has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tool_guard._ask_user_approval (cyclomatic 17) · ×1
  • tool_guard._ask_user_approval (cyclomatic 17) src/qwenpaw/runtime/tool_guard.py:403 — tool_guard._ask_user_approval 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 · decision_model._code_preflight (cyclomatic 17) · ×1
  • decision_model._code_preflight (cyclomatic 17) src/qwenpaw/security/decision_model.py:167 — decision_model._code_preflight 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 · project_directory.resolve_effective_project_dirs (cyclomatic 17) · ×1
  • project_directory.resolve_effective_project_dirs (cyclomatic 17) src/qwenpaw/services/project_directory.py:490 — project_directory.resolve_effective_project_dirs 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 · session_thinking.get_session_chat (cyclomatic 17) · ×1
  • session_thinking.get_session_chat (cyclomatic 17) src/qwenpaw/services/session_thinking.py:271 — session_thinking.get_session_chat 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 · turn_usage.add_session_cache_usage (cyclomatic 17) · ×1
  • turn_usage.add_session_cache_usage (cyclomatic 17) src/qwenpaw/token_usage/turn_usage.py:73 — turn_usage.add_session_cache_usage 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 · ToolCoordinator.execute (cyclomatic 17) · ×1
  • ToolCoordinator.execute (cyclomatic 17) src/qwenpaw/tool_calls/_coordinator.py:104 — ToolCoordinator.execute 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 · error.formatApiError (cyclomatic 17) · ×1
  • error.formatApiError (cyclomatic 17) console/src/api/error.ts:18 — error.formatApiError has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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 · SidebarUsageDialog.Surface (cyclomatic 17) · ×1
  • SidebarUsageDialog.Surface (cyclomatic 17) console/src/layouts/SidebarUsageDialog.tsx:16 — SidebarUsageDialog.Surface has cyclomatic complexity 17 (threshold 15). 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: 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 · DesktopUpdateContext.DesktopUpdateProvider (cyclomatic 17) · ×1
  • DesktopUpdateContext.DesktopUpdateProvider (cyclomatic 17) console/src/contexts/DesktopUpdateContext.tsx:61 — DesktopUpdateContext.DesktopUpdateProvider 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 11 function literals inside it that branch (lines 112, 84, 96, …). 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 · rawToolDisplay.inspectDisplayBudget (cyclomatic 17) · ×1
  • rawToolDisplay.inspectDisplayBudget (cyclomatic 17) console/src/components/Chat/ToolCards/shared/rawToolDisplay.ts:39 — rawToolDisplay.inspectDisplayBudget has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (inspect). 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 · CodeModeCard.CodeModeCard (cyclomatic 17) · ×1
  • CodeModeCard.CodeModeCard (cyclomatic 17) console/src/components/Chat/ToolCards/cards/CodeModeCard.tsx:45 — CodeModeCard.CodeModeCard has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 71). 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 · useIconDrag.useIconDrag (cyclomatic 17) · ×1
  • useIconDrag.useIconDrag (cyclomatic 17) console/src/os/useIconDrag.ts:48 — useIconDrag.useIconDrag 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 4 function literals inside it that branch (lines 59, 108, 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.
D1 · Cyclomatic Complexity · App.AppInner (cyclomatic 17) · ×1
  • App.AppInner (cyclomatic 17) console/src/App.tsx:358 — App.AppInner has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 409, 390, 386, …). 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.CloneTab · ×1
  • index.CloneTab::handleClone (cyclomatic 17) console/src/components/ProjectSelectModal/index.tsx:105 — index.CloneTab::handleClone 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 · ModelCapabilityTags.CapabilityTags (cyclomatic 17) · ×1
  • ModelCapabilityTags.CapabilityTags (cyclomatic 17) console/src/pages/Settings/Models/components/modals/ModelCapabilityTags.tsx:115 — ModelCapabilityTags.CapabilityTags 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 · AgentModelCard.AgentModelCard (cyclomatic 17) · ×1
  • AgentModelCard.AgentModelCard (cyclomatic 17) console/src/pages/Agent/Config/components/AgentModelCard.tsx:17 — AgentModelCard.AgentModelCard has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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 · useSkillsPage.useSkillsPage.handleFileChange (cyclomatic 17) · ×1
  • useSkillsPage.useSkillsPage.handleFileChange (cyclomatic 17) console/src/pages/Agent/Skills/useSkillsPage.tsx:309 — useSkillsPage.useSkillsPage.handleFileChange has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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 · ChatSessionTransition.ChatSessionTransition (cyclomatic 17) · ×1
  • ChatSessionTransition.ChatSessionTransition (cyclomatic 17) console/src/pages/Chat/components/ChatSessionTransition.tsx:29 — ChatSessionTransition.ChatSessionTransition 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, 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 · ScreenshotEditor.ScreenshotEditor (cyclomatic 17) · ×1
  • ScreenshotEditor.ScreenshotEditor (cyclomatic 17) console/src/pages/CommunityFeedback/ScreenshotEditor.tsx:15 — ScreenshotEditor.ScreenshotEditor 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 8 function items inside it that branch (mask, a function literal at line 81, a function literal at line 88, …). 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 · ManagedModelTable.ManagedModelTable (cyclomatic 17) · ×1
  • ManagedModelTable.ManagedModelTable (cyclomatic 17) console/src/pages/Hub/governance/ManagedModelTable.tsx:13 — ManagedModelTable.ManagedModelTable 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 7 function literals inside it that branch (lines 40, 131, 212, …). 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 · useImportJob.useImportJob (cyclomatic 17) · ×1
  • useImportJob.useImportJob (cyclomatic 17) console/src/pages/Import/useImportJob.ts:74 — useImportJob.useImportJob has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 380, 396, 405, …). 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 · RemoteProviderCard.RemoteProviderCard (cyclomatic 17) · ×1
  • RemoteProviderCard.RemoteProviderCard (cyclomatic 17) console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx:26 — RemoteProviderCard.RemoteProviderCard has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WorkspaceEmptyState.WorkspaceEmptyState (cyclomatic 17) · ×1
  • WorkspaceEmptyState.WorkspaceEmptyState (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/WorkspaceEmptyState.tsx:24 — WorkspaceEmptyState.WorkspaceEmptyState 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, separate the cases: extract each independent 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 · InlineReviewDiff.matchReviewOperations (cyclomatic 17) · ×1
  • InlineReviewDiff.matchReviewOperations (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/agent/InlineReviewDiff.tsx:80 — InlineReviewDiff.matchReviewOperations 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 · InlineReviewDiff.InlineReviewDiff (cyclomatic 17) · ×1
  • InlineReviewDiff.InlineReviewDiff (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/agent/InlineReviewDiff.tsx:135 — InlineReviewDiff.InlineReviewDiff has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 192, submit, a function literal at line 302, …). 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 · useProjectLaunch.useProjectLaunch.handleLaunch (cyclomatic 17) · ×1
  • useProjectLaunch.useProjectLaunch.handleLaunch (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/creator/useProjectLaunch.tsx:625 — useProjectLaunch.useProjectLaunch.handleLaunch has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProjectComposer.ProjectComposer (cyclomatic 17) · ×1
  • ProjectComposer.ProjectComposer (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectComposer.tsx:38 — ProjectComposer.ProjectComposer has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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 · ElementList.ElementList (cyclomatic 17) · ×1
  • ElementList.ElementList (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementList.tsx:88 — ElementList.ElementList has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 183, 106, 193). 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 · creatorEditBufferStore.collectAffectedRanges (cyclomatic 17) · ×1
  • creatorEditBufferStore.collectAffectedRanges (cyclomatic 17) plugins/apps/qwenpaw-creator/ui/src/store/creatorEditBufferStore.ts:177 — creatorEditBufferStore.collectAffectedRanges 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, separate the cases: extract each independent 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.PetControlPage (cyclomatic 17) · ×1
  • index.PetControlPage (cyclomatic 17) plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:167 — index.PetControlPage has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.PetControlPage::startDesktop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · useHarnessConnection.useHarnessConnection.connect (cyclomatic 17) · ×1
  • useHarnessConnection.useHarnessConnection.connect (cyclomatic 17) plugins/harness/_shared/ui/useHarnessConnection.ts:195 — useHarnessConnection.useHarnessConnection.connect has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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 · BenchmarkWeights.BenchmarkWeightsEditor (cyclomatic 17) · ×1
  • BenchmarkWeights.BenchmarkWeightsEditor (cyclomatic 17) website/src/pages/Evaluation/BenchmarkWeights.tsx:7 — BenchmarkWeights.BenchmarkWeightsEditor has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 62, apply, a function literal at line 70, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ThreadStore.add_message (cyclomatic 16) · ×1
  • ThreadStore.add_message (cyclomatic 16) REDACTED:352 — ThreadStore.add_message 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 · model_routes._grade_qwen3_document (cyclomatic 16) · ×1
  • model_routes._grade_qwen3_document (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2453 — model_routes._grade_qwen3_document 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 · project_file_routes._build_patch_candidate (cyclomatic 16) · ×1
  • project_file_routes._build_patch_candidate (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:552 — project_file_routes._build_patch_candidate 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 · minimax._check_h3_status (cyclomatic 16) · ×1
  • minimax._check_h3_status (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:373 — minimax._check_h3_status 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 · video_capabilities._image_reference_marker_spec (cyclomatic 16) · ×1
  • video_capabilities._image_reference_marker_spec (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1469 — video_capabilities._image_reference_marker_spec 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 · video_capabilities.video_model_duration_guidance (cyclomatic 16) · ×1
  • video_capabilities.video_model_duration_guidance (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1727 — video_capabilities.video_model_duration_guidance 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 · video_model._resolve_reference_media_url (cyclomatic 16) · ×1
  • video_model._resolve_reference_media_url (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/models/video_model.py:102 — video_model._resolve_reference_media_url 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 · SourceIntelligenceIndex.validate_complete_index (cyclomatic 16) · ×1
  • SourceIntelligenceIndex.validate_complete_index (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/schemas/assets.py:464 — SourceIntelligenceIndex.validate_complete_index 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 · FileCreatorAgentRuntime._run_subagent (cyclomatic 16) · ×1
  • FileCreatorAgentRuntime._run_subagent (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5415 — FileCreatorAgentRuntime._run_subagent 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 · DesktopController._remember_observation (cyclomatic 16) · ×1
  • DesktopController._remember_observation (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/desktop.py:213 — DesktopController._remember_observation 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 · DesktopController._action_bbox (cyclomatic 16) · ×1
  • DesktopController._action_bbox (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/desktop.py:278 — DesktopController._action_bbox 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 · FileR2VExecutionService.recover_all (cyclomatic 16) · ×1
  • FileR2VExecutionService.recover_all (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5239 — FileR2VExecutionService.recover_all 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 · SecureR2VVideoMaterializer._stream_remote (cyclomatic 16) · ×1
  • SecureR2VVideoMaterializer._stream_remote (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:827 — SecureR2VVideoMaterializer._stream_remote 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 · approved_prompt.saved_authorization_prompt (cyclomatic 16) · ×1
  • approved_prompt.saved_authorization_prompt (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/approved_prompt.py:8 — approved_prompt.saved_authorization_prompt 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 · migrations._migrate_v5_to_v6 (cyclomatic 16) · ×1
  • migrations._migrate_v5_to_v6 (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:378 — migrations._migrate_v5_to_v6 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 · recovery._validate_existing_new_review (cyclomatic 16) · ×1
  • recovery._validate_existing_new_review (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:1600 — recovery._validate_existing_new_review 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 · remote_cache.resolve_remote_cache (cyclomatic 16) · ×1
  • remote_cache.resolve_remote_cache (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/remote_cache.py:152 — remote_cache.resolve_remote_cache 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 · ProjectReviewService._rejection_changes (cyclomatic 16) · ×1
  • ProjectReviewService._rejection_changes (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1603 — ProjectReviewService._rejection_changes 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 · script_import.publish_script_import (cyclomatic 16) · ×1
  • script_import.publish_script_import (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/script_import.py:608 — script_import.publish_script_import 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 · store._cover_reference (cyclomatic 16) · ×1
  • store._cover_reference (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:132 — store._cover_reference 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 · prompt_sync_service._validate_prompts (cyclomatic 16) · ×1
  • prompt_sync_service._validate_prompts (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/prompt_sync_service.py:191 — prompt_sync_service._validate_prompts 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 · frames.extract_review_frames (cyclomatic 16) · ×1
  • frames.extract_review_frames (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/render_review/frames.py:139 — frames.extract_review_frames 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 · review._finalize_round (cyclomatic 16) · ×1
  • review._finalize_round (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:279 — review._finalize_round 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 · review._timeline_review_expectations (cyclomatic 16) · ×1
  • review._timeline_review_expectations (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:425 — review._timeline_review_expectations 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 · review.schedule_render_review (cyclomatic 16) · ×1
  • review.schedule_render_review (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:1041 — review.schedule_render_review 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 · rendering.render_grounded_context (cyclomatic 16) · ×1
  • rendering.render_grounded_context (cyclomatic 16) plugins/apps/qwenpaw-creator/backend/services/web_grounding/rendering.py:27 — rendering.render_grounded_context 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 · build_example_archive._prune_superseded_artifacts (cyclomatic 16) · ×1
  • build_example_archive._prune_superseded_artifacts (cyclomatic 16) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:117 — build_example_archive._prune_superseded_artifacts 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 · ComputerUseClient.execute (cyclomatic 16) · ×1
  • ComputerUseClient.execute (cyclomatic 16) plugins/bundle/computer-use/computer_use/client.py:125 — ComputerUseClient.execute 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 · dispatch._sequence_steps (cyclomatic 16) · ×1
  • dispatch._sequence_steps (cyclomatic 16) plugins/bundle/computer-use/computer_use/dispatch.py:82 — dispatch._sequence_steps 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 · DingTalkTransport._recover_active_cards (cyclomatic 16) · ×1
  • DingTalkTransport._recover_active_cards (cyclomatic 16) REDACTED:1502 — DingTalkTransport._recover_active_cards has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DiscordDriver._perform_send (cyclomatic 16) · ×1
  • DiscordDriver._perform_send (cyclomatic 16) plugins/channel/discord/qwenpaw_channel_discord/driver.py:149 — DiscordDriver._perform_send 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 · FeishuDriver._target (cyclomatic 16) · ×1
  • FeishuDriver._target (cyclomatic 16) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:184 — FeishuDriver._target 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 · MatrixDriver._perform_send (cyclomatic 16) · ×1
  • MatrixDriver._perform_send (cyclomatic 16) plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:212 — MatrixDriver._perform_send 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 · MatrixPlatform.start (cyclomatic 16) · ×1
  • MatrixPlatform.start (cyclomatic 16) REDACTED:312 — MatrixPlatform.start 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 · MQTTPlatform._reconnect (cyclomatic 16) · ×1
  • MQTTPlatform._reconnect (cyclomatic 16) plugins/channel/mqtt/qwenpaw_channel_mqtt/platform.py:158 — MQTTPlatform._reconnect 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 · QQMedia._send_rich (cyclomatic 16) · ×1
  • QQMedia._send_rich (cyclomatic 16) plugins/channel/qq/qwenpaw_channel_qq/media.py:293 — QQMedia._send_rich 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 · QQPlatform.send_parts (cyclomatic 16) · ×1
  • QQPlatform.send_parts (cyclomatic 16) plugins/channel/qq/qwenpaw_channel_qq/platform.py:508 — QQPlatform.send_parts 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 · format.chunk_slack_text (cyclomatic 16) · ×1
  • format.chunk_slack_text (cyclomatic 16) plugins/channel/slack/qwenpaw_channel_slack/format.py:147 — format.chunk_slack_text 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 · SlackPlatform.effect_call (cyclomatic 16) · ×1
  • SlackPlatform.effect_call (cyclomatic 16) plugins/channel/slack/qwenpaw_channel_slack/platform.py:359 — SlackPlatform.effect_call 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 · WeChatPlatform._message (cyclomatic 16) · ×1
  • WeChatPlatform._message (cyclomatic 16) REDACTED:194 — WeChatPlatform._message 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 · CodexBackend.run_turn (cyclomatic 16) · ×1
  • CodexBackend.run_turn (cyclomatic 16) plugins/harness/codex/adapter.py:514 — CodexBackend.run_turn 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 · CodexBackend._history_item (cyclomatic 16) · ×1
  • CodexBackend._history_item (cyclomatic 16) plugins/harness/codex/adapter.py:1068 — CodexBackend._history_item 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 · gpt_image2_tool.generate_image_gpt (cyclomatic 16) · ×1
  • gpt_image2_tool.generate_image_gpt (cyclomatic 16) plugins/tool/gpt-image2/gpt_image2_tool.py:22 — gpt_image2_tool.generate_image_gpt 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 · HistoryStore.reconcile_session_rows (cyclomatic 16) · ×1
  • HistoryStore.reconcile_session_rows (cyclomatic 16) src/qwenpaw/agents/context/scroll/history.py:951 — HistoryStore.reconcile_session_rows 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 · reme_inbox.emit_job_result (cyclomatic 16) · ×1
  • reme_inbox.emit_job_result (cyclomatic 16) src/qwenpaw/agents/memory/reme_inbox.py:144 — reme_inbox.emit_job_result 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 · ToolResultPruningMiddleware._detect_exempt_tool_ids (cyclomatic 16) · ×1
  • ToolResultPruningMiddleware._detect_exempt_tool_ids (cyclomatic 16) src/qwenpaw/agents/middlewares.py:929 — ToolResultPruningMiddleware._detect_exempt_tool_ids 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 · prompt.get_model_supports_image (cyclomatic 16) · ×1
  • prompt.get_model_supports_image (cyclomatic 16) src/qwenpaw/agents/prompt.py:456 — prompt.get_model_supports_image 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 · QwenPawAgent._strip_media_blocks_from_memory (cyclomatic 16) · ×1
  • QwenPawAgent._strip_media_blocks_from_memory (cyclomatic 16) src/qwenpaw/agents/react_agent.py:1772 — QwenPawAgent._strip_media_blocks_from_memory 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 · pool_service._register_pool_skill_entry (cyclomatic 16) · ×1
  • pool_service._register_pool_skill_entry (cyclomatic 16) src/qwenpaw/agents/skill_system/pool_service.py:74 — pool_service._register_pool_skill_entry 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 · registry._resolve_pool_builtin_language (cyclomatic 16) · ×1
  • registry._resolve_pool_builtin_language (cyclomatic 16) src/qwenpaw/agents/skill_system/registry.py:448 — registry._resolve_pool_builtin_language 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 · browser_control._start_managed_cdp_browser (cyclomatic 16) · ×1
  • browser_control._start_managed_cdp_browser (cyclomatic 16) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1197 — browser_control._start_managed_cdp_browser 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 · file_handling._resolve_local_path (cyclomatic 16) · ×1
  • file_handling._resolve_local_path (cyclomatic 16) REDACTED:121 — file_handling._resolve_local_path 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 · tool_message_utils._reorder_tool_results (cyclomatic 16) · ×1
  • tool_message_utils._reorder_tool_results (cyclomatic 16) src/qwenpaw/agents/utils/tool_message_utils.py:125 — tool_message_utils._reorder_tool_results 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 · QwenPawDriverApprovalGate.request_approval (cyclomatic 16) · ×1
  • QwenPawDriverApprovalGate.request_approval (cyclomatic 16) src/qwenpaw/app/approvals/driver_gate.py:20 — QwenPawDriverApprovalGate.request_approval 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 · IsolatedChannelProxy.__init__ (cyclomatic 16) · ×1
  • IsolatedChannelProxy.__init__ (cyclomatic 16) src/qwenpaw/app/channels/isolated_proxy.py:205 — IsolatedChannelProxy.__init__ 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 · IsolatedChannelProxy.start (cyclomatic 16) · ×1
  • IsolatedChannelProxy.start (cyclomatic 16) src/qwenpaw/app/channels/isolated_proxy.py:398 — IsolatedChannelProxy.start 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 · IsolatedChannelProxy._response_scope (cyclomatic 16) · ×1
  • IsolatedChannelProxy._response_scope (cyclomatic 16) src/qwenpaw/app/channels/isolated_proxy.py:2501 — IsolatedChannelProxy._response_scope has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ChannelManager._stop_one_unlocked (cyclomatic 16) · ×1
  • ChannelManager._stop_one_unlocked (cyclomatic 16) src/qwenpaw/app/channels/manager.py:1755 — ChannelManager._stop_one_unlocked 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 · CommunityConnectionService.complete (cyclomatic 16) · ×1
  • CommunityConnectionService.complete (cyclomatic 16) src/qwenpaw/app/community_connection.py:680 — CommunityConnectionService.complete 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 · CommunityConnectionService._password_reconnect (cyclomatic 16) · ×1
  • CommunityConnectionService._password_reconnect (cyclomatic 16) src/qwenpaw/app/community_connection.py:829 — CommunityConnectionService._password_reconnect 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 · community_connection.normalize_platform_message (cyclomatic 16) · ×1
  • community_connection.normalize_platform_message (cyclomatic 16) src/qwenpaw/app/community_connection.py:253 — community_connection.normalize_platform_message 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 · heartbeat._extract_message_preview (cyclomatic 16) · ×1
  • heartbeat._extract_message_preview (cyclomatic 16) src/qwenpaw/app/crons/heartbeat.py:153 — heartbeat._extract_message_preview 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 · CronManager._execute_once (cyclomatic 16) · ×1
  • CronManager._execute_once (cyclomatic 16) src/qwenpaw/app/crons/manager.py:1159 — CronManager._execute_once has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · providers.get_active_models (cyclomatic 16) · ×1
  • providers.get_active_models (cyclomatic 16) src/qwenpaw/app/routers/providers.py:912 — providers.get_active_models 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 · skills.post_pool_automation_inbox (cyclomatic 16) · ×1
  • skills.post_pool_automation_inbox (cyclomatic 16) src/qwenpaw/app/routers/skills.py:147 — skills.post_pool_automation_inbox 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 · orchestration.execute_restore (cyclomatic 16) · ×1
  • orchestration.execute_restore (cyclomatic 16) src/qwenpaw/backup/orchestration.py:46 — orchestration.execute_restore 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 · CdpControlLink._m_open_session (cyclomatic 16) · ×1
  • CdpControlLink._m_open_session (cyclomatic 16) src/qwenpaw/browser/control_link/cdp/adapter.py:338 — CdpControlLink._m_open_session 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 · canonical._encode (cyclomatic 16) · ×1
  • canonical._encode (cyclomatic 16) src/qwenpaw/channel_protocol/canonical.py:99 — canonical._encode 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 · render.render_timeline (cyclomatic 16) · ×1
  • render.render_timeline (cyclomatic 16) src/qwenpaw/checkpoints/render.py:12 — render.render_timeline 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 · cron_cmd._validate_and_apply_scheduled_repeat (cyclomatic 16) · ×1
  • cron_cmd._validate_and_apply_scheduled_repeat (cyclomatic 16) src/qwenpaw/cli/cron_cmd.py:127 — cron_cmd._validate_and_apply_scheduled_repeat 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 · doctor_cmd._check_active_llm (cyclomatic 16) · ×1
  • doctor_cmd._check_active_llm (cyclomatic 16) src/qwenpaw/cli/doctor_cmd.py:321 — doctor_cmd._check_active_llm 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 · plugin_commands.install (cyclomatic 16) · ×1
  • plugin_commands.install (cyclomatic 16) REDACTED:492 — plugin_commands.install 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 · providers_cmd._select_llm_model (cyclomatic 16) · ×1
  • providers_cmd._select_llm_model (cyclomatic 16) src/qwenpaw/cli/providers_cmd.py:346 — providers_cmd._select_llm_model 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 · skills_cmd.list_cmd (cyclomatic 16) · ×1
  • skills_cmd.list_cmd (cyclomatic 16) src/qwenpaw/cli/skills_cmd.py:643 — skills_cmd.list_cmd 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 · AcpTransport.close (cyclomatic 16) · ×1
  • AcpTransport.close (cyclomatic 16) src/qwenpaw/cli/tui/transport/acp.py:641 — AcpTransport.close has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · config._is_safe_css_color (cyclomatic 16) · ×1
  • config._is_safe_css_color (cyclomatic 16) src/qwenpaw/config/config.py:74 — config._is_safe_css_color 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 · mcp_binding.binding_plain_keys (cyclomatic 16) · ×1
  • mcp_binding.binding_plain_keys (cyclomatic 16) src/qwenpaw/drivers/adapters/mcp_binding.py:271 — mcp_binding.binding_plain_keys 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 · mcp_legacy_config.legacy_mcp_client_to_driver (cyclomatic 16) · ×1
  • mcp_legacy_config.legacy_mcp_client_to_driver (cyclomatic 16) src/qwenpaw/drivers/adapters/mcp_legacy_config.py:202 — mcp_legacy_config.legacy_mcp_client_to_driver 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 · mcp_streamable_http._param_value_to_header_string (cyclomatic 16) · ×1
  • mcp_streamable_http._param_value_to_header_string (cyclomatic 16) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:260 — mcp_streamable_http._param_value_to_header_string 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 · config_migration.migrate_hub_settings (cyclomatic 16) · ×1
  • config_migration.migrate_hub_settings (cyclomatic 16) src/qwenpaw/hub/config_migration.py:40 — config_migration.migrate_hub_settings 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 · ChannelBackend._probe_once (cyclomatic 16) · ×1
  • ChannelBackend._probe_once (cyclomatic 16) src/qwenpaw/plugins/channel_adapter.py:404 — ChannelBackend._probe_once 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 · DependencyGate.evaluate (cyclomatic 16) · ×1
  • DependencyGate.evaluate (cyclomatic 16) src/qwenpaw/plugins/dependency_gate.py:203 — DependencyGate.evaluate 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 · dependency_recovery.recover_additions (cyclomatic 16) · ×1
  • dependency_recovery.recover_additions (cyclomatic 16) src/qwenpaw/plugins/dependency_recovery.py:312 — dependency_recovery.recover_additions 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 · dependency_transaction.verify_payload (cyclomatic 16) · ×1
  • dependency_transaction.verify_payload (cyclomatic 16) src/qwenpaw/plugins/dependency_transaction.py:663 — dependency_transaction.verify_payload 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 · PayloadStore._cleanup_files (cyclomatic 16) · ×1
  • PayloadStore._cleanup_files (cyclomatic 16) src/qwenpaw/plugins/execution/payloads.py:582 — PayloadStore._cleanup_files has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · runtime.validate_hello (cyclomatic 16) · ×1
  • runtime.validate_hello (cyclomatic 16) src/qwenpaw/plugins/execution/runtime.py:106 — runtime.validate_hello 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 · worker.run (cyclomatic 16) · ×1
  • worker.run (cyclomatic 16) src/qwenpaw/plugins/execution/worker.py:168 — worker.run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PluginLifecycle.set_enabled (cyclomatic 16) · ×1
  • PluginLifecycle.set_enabled (cyclomatic 16) src/qwenpaw/plugins/lifecycle.py:1033 — PluginLifecycle.set_enabled 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 · PluginLoader._fail_after_startup (cyclomatic 16) · ×1
  • PluginLoader._fail_after_startup (cyclomatic 16) src/qwenpaw/plugins/loader.py:5667 — PluginLoader._fail_after_startup 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 · official_execution_context.project_official_execution (cyclomatic 16) · ×1
  • official_execution_context.project_official_execution (cyclomatic 16) src/qwenpaw/plugins/official_execution_context.py:23 — official_execution_context.project_official_execution 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 · RuntimeOwners.reserve (cyclomatic 16) · ×1
  • RuntimeOwners.reserve (cyclomatic 16) src/qwenpaw/plugins/ownership.py:120 — RuntimeOwners.reserve 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 · provision._recover_plugin_migrating_inventory (cyclomatic 16) · ×1
  • provision._recover_plugin_migrating_inventory (cyclomatic 16) src/qwenpaw/plugins/provision.py:770 — provision._recover_plugin_migrating_inventory has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sdk_version.validate_sdk (cyclomatic 16) · ×1
  • sdk_version.validate_sdk (cyclomatic 16) src/qwenpaw/plugins/sdk_version.py:36 — sdk_version.validate_sdk 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 · codex_schedule_reader._read_toml_candidates (cyclomatic 16) · ×1
  • codex_schedule_reader._read_toml_candidates (cyclomatic 16) src/qwenpaw/portability/providers/codex_schedule_reader.py:386 — codex_schedule_reader._read_toml_candidates 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 · qoder_sessions.load_qoder_index (cyclomatic 16) · ×1
  • qoder_sessions.load_qoder_index (cyclomatic 16) src/qwenpaw/portability/providers/qoder_sessions.py:183 — qoder_sessions.load_qoder_index 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 · dashscope_discovery.model_card (cyclomatic 16) · ×1
  • dashscope_discovery.model_card (cyclomatic 16) src/qwenpaw/providers/dashscope_discovery.py:23 — dashscope_discovery.model_card 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 · DashScopeProvider._apply_thinking_config (cyclomatic 16) · ×1
  • DashScopeProvider._apply_thinking_config (cyclomatic 16) src/qwenpaw/providers/dashscope_provider.py:134 — DashScopeProvider._apply_thinking_config 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 · provider_discovery.merge_discovered_model (cyclomatic 16) · ×1
  • provider_discovery.merge_discovered_model (cyclomatic 16) src/qwenpaw/providers/provider_discovery.py:65 — provider_discovery.merge_discovered_model 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 · AgentBuilder._build_middlewares (cyclomatic 16) · ×1
  • AgentBuilder._build_middlewares (cyclomatic 16) src/qwenpaw/runtime/builder.py:1340 — AgentBuilder._build_middlewares 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 · FilePathToolGuardian.guard (cyclomatic 16) · ×1
  • FilePathToolGuardian.guard (cyclomatic 16) src/qwenpaw/security/tool_guard/guardians/file_guardian.py:461 — FilePathToolGuardian.guard 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 · markdown_cjk._delimiter_flanking (cyclomatic 16) · ×1
  • markdown_cjk._delimiter_flanking (cyclomatic 16) src/qwenpaw/utils/markdown_cjk.py:358 — markdown_cjk._delimiter_flanking 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 · shell_normalization.normalize_posix_line_continuations (cyclomatic 16) · ×1
  • shell_normalization.normalize_posix_line_continuations (cyclomatic 16) src/qwenpaw/utils/shell_normalization.py:20 — shell_normalization.normalize_posix_line_continuations 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 · hostExternals.installHostExternals (cyclomatic 16) · ×1
  • hostExternals.installHostExternals (cyclomatic 16) console/src/plugins/hostExternals.ts:258 — hostExternals.installHostExternals has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, 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 · RunToolBatchCard.collectTextBlocks (cyclomatic 16) · ×1
  • RunToolBatchCard.collectTextBlocks (cyclomatic 16) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:159 — RunToolBatchCard.collectTextBlocks has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useOsAppMarket.useOsAppMarket (cyclomatic 16) · ×1
  • useOsAppMarket.useOsAppMarket (cyclomatic 16) console/src/os/useOsAppMarket.ts:22 — useOsAppMarket.useOsAppMarket has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 63, 47, 52, …). 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.CommunityFeedback (cyclomatic 16) · ×1
  • index.CommunityFeedback (cyclomatic 16) console/src/components/CommunityFeedback/index.tsx:29 — index.CommunityFeedback has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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 · DeleteAction.DeleteAction (cyclomatic 16) · ×1
  • DeleteAction.DeleteAction (cyclomatic 16) console/src/components/interaction/DeleteAction.tsx:8 — DeleteAction.DeleteAction has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SchedulePicker.SchedulePicker (cyclomatic 16) · ×1
  • SchedulePicker.SchedulePicker (cyclomatic 16) console/src/components/interaction/SchedulePicker.tsx:13 — SchedulePicker.SchedulePicker 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, separate the cases: extract each independent 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 · useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus (cyclomatic 16) · ×1
  • useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus (cyclomatic 16) console/src/pages/Agent/Config/useReMeRuntimeStatus.ts:30 — useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus 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 · AgentModelSettings.AgentModelSettings · ×1
  • AgentModelSettings.AgentModelSettings::save (cyclomatic 16) console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx:294 — AgentModelSettings.AgentModelSettings::save has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (AgentModelSettings.AgentModelSettings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · WorldMap.WorldMap (cyclomatic 16) · ×1
  • WorldMap.WorldMap (cyclomatic 16) console/src/pages/Agent/Config/components/TimezoneAtlas/WorldMap.tsx:29 — WorldMap.WorldMap 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 6 function literals inside it that branch (lines 62, 127, 48, …). 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 · useSkills.useSkills.uploadSkill (cyclomatic 16) · ×1
  • useSkills.useSkills.uploadSkill (cyclomatic 16) console/src/pages/Agent/Skills/useSkills.ts:305 — useSkills.useSkills.uploadSkill 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 · HostBubbles.HostMessage (cyclomatic 16) · ×1
  • HostBubbles.HostMessage (cyclomatic 16) console/src/pages/Chat/HostBubbles.tsx:81 — HostBubbles.HostMessage 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 2 function items inside it that branch (a function literal at line 100, formatMediaURL). 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 · chatPayload.applyChatPayloadTransforms (cyclomatic 16) · ×1
  • chatPayload.applyChatPayloadTransforms (cyclomatic 16) console/src/pages/Chat/chatPayload.ts:6 — chatPayload.applyChatPayloadTransforms 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 · columns.createColumns (cyclomatic 16) · ×1
  • columns.createColumns (cyclomatic 16) console/src/pages/Control/CronJobs/components/columns.tsx:27 — columns.createColumns has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 70, 35, 54, …). 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 · CommunityRelatedResources.CommunityRelatedResources (cyclomatic 16) · ×1
  • CommunityRelatedResources.CommunityRelatedResources (cyclomatic 16) console/src/pages/Inbox/components/CommunityRelatedResources.tsx:19 — CommunityRelatedResources.CommunityRelatedResources 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 6 function literals inside it that branch (lines 26, 57, 60, …). 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 · useInboxData.useInboxData.loadPushMessages (cyclomatic 16) · ×1
  • useInboxData.useInboxData.loadPushMessages (cyclomatic 16) console/src/pages/Inbox/hooks/useInboxData.ts:323 — useInboxData.useInboxData.loadPushMessages has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 335, a function literal at line 354, isLatestRequest, …). 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 · useMarketPlugins.useMarketPlugins.loadPlugins (cyclomatic 16) · ×1
  • useMarketPlugins.useMarketPlugins.loadPlugins (cyclomatic 16) console/src/pages/Settings/PluginManager/hooks/useMarketPlugins.ts:80 — useMarketPlugins.useMarketPlugins.loadPlugins has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProviderConfigModal.ProviderConfigModal · ×1
  • ProviderConfigModal.ProviderConfigModal::handleSubmit (cyclomatic 16) console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:504 — ProviderConfigModal.ProviderConfigModal::handleSubmit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ProviderConfigModal.ProviderConfigModal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · BroadcastModal.BroadcastModal (cyclomatic 16) · ×1
  • BroadcastModal.BroadcastModal (cyclomatic 16) console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:30 — BroadcastModal.BroadcastModal 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 8 function items inside it that branch (a function literal at line 219, a function literal at line 297, a function literal at line 59, …). 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 · PoolSkillListItem.PoolSkillListItem (cyclomatic 16) · ×1
  • PoolSkillListItem.PoolSkillListItem (cyclomatic 16) console/src/pages/Settings/SkillPool/components/PoolSkillListItem.tsx:28 — PoolSkillListItem.PoolSkillListItem has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.AgentLane (cyclomatic 16) · ×1
  • index.AgentLane (cyclomatic 16) REDACTED:871 — index.AgentLane has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · client.creatorFetch (cyclomatic 16) · ×1
  • client.creatorFetch (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/api/creator/client.ts:130 — client.creatorFetch 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 · BlueprintRoughCutStrip.PreviewCinema (cyclomatic 16) · ×1
  • BlueprintRoughCutStrip.PreviewCinema (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintRoughCutStrip.tsx:111 — BlueprintRoughCutStrip.PreviewCinema has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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 · ProjectExportActions.ProjectExportActions (cyclomatic 16) · ×1
  • ProjectExportActions.ProjectExportActions (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectExportActions.tsx:20 — ProjectExportActions.ProjectExportActions has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (downloadFilm, exportProject, a function literal at line 35, …). 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 · SourceCacheGate.SourceCacheGate (cyclomatic 16) · ×1
  • SourceCacheGate.SourceCacheGate (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/components/creator/SourceCacheGate.tsx:15 — SourceCacheGate.SourceCacheGate has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 39). 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 · EditPlanCard.EditPlanCard (cyclomatic 16) · ×1
  • EditPlanCard.EditPlanCard (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/components/timeline/EditPlanCard.tsx:38 — EditPlanCard.EditPlanCard has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · TimelineTracks.TimelineTracks (cyclomatic 16) · ×1
  • TimelineTracks.TimelineTracks (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:141 — TimelineTracks.TimelineTracks has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TimelineTracks.TimelineTracks::renderBlock) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · creatorPresentation.creatorWorkNodeLabel (cyclomatic 16) · ×1
  • creatorPresentation.creatorWorkNodeLabel (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/lib/creatorPresentation.ts:333 — creatorPresentation.creatorWorkNodeLabel 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 · agentProgressModel.buildAgentProgressModel.groupFor (cyclomatic 16) · ×1
  • agentProgressModel.buildAgentProgressModel.groupFor (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:309 — agentProgressModel.buildAgentProgressModel.groupFor 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 · creatorMessagePresentation.publicVersionCodeNames (cyclomatic 16) · ×1
  • creatorMessagePresentation.publicVersionCodeNames (cyclomatic 16) REDACTED:478 — creatorMessagePresentation.publicVersionCodeNames 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 2 function literals inside it that branch (lines 494, 516). 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 · creatorMessagePresentation.withoutPromptSyncControlNarration (cyclomatic 16) · ×1
  • creatorMessagePresentation.withoutPromptSyncControlNarration (cyclomatic 16) REDACTED:592 — creatorMessagePresentation.withoutPromptSyncControlNarration 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 3 function literals inside it that branch (lines 596, 637, 594). 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 · promptEntityNames.presentPromptEntityNames (cyclomatic 16) · ×1
  • promptEntityNames.presentPromptEntityNames (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/lib/promptEntityNames.ts:5 — promptEntityNames.presentPromptEntityNames has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · PlanPage.PlanPage · ×1
  • PlanPage.PlanPage::applyElementDraft (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:543 — PlanPage.PlanPage::applyElementDraft has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (PlanPage.PlanPage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · creatorEditBufferStore.describeTarget (cyclomatic 16) · ×1
  • creatorEditBufferStore.describeTarget (cyclomatic 16) plugins/apps/qwenpaw-creator/ui/src/store/creatorEditBufferStore.ts:86 — creatorEditBufferStore.describeTarget 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 · service_worker.restoreManagedTabs (cyclomatic 16) · ×1
  • service_worker.restoreManagedTabs (cyclomatic 16) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:93 — service_worker.restoreManagedTabs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · service_worker.findSessionGroupId (cyclomatic 16) · ×1
  • service_worker.findSessionGroupId (cyclomatic 16) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:455 — service_worker.findSessionGroupId 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 · OpenUIBlock.OpenUIBlock (cyclomatic 16) · ×1
  • OpenUIBlock.OpenUIBlock (cyclomatic 16) plugins/bundle/qwenpaw-openui/frontend/src/OpenUIBlock.tsx:22 — OpenUIBlock.OpenUIBlock has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.PetControlPage · ×1
  • index.PetControlPage::startDesktop (cyclomatic 16) plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:237 — index.PetControlPage::startDesktop has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (index.PetControlPage) 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.ChatPage (cognitive 536) · ×1
  • index.ChatPage (cognitive 536) console/src/pages/Chat/index.tsx:1219 — index.ChatPage has cognitive complexity 536 (threshold 15). Drivers by points: if/else 160 (207 pts), boolean chains 176, ternaries 89 (128 pts), error handling 11 (14 pts), loops 8 (11 pts) (nesting depth added 92). Of this number, 36 points are the body's own statements and 500 belong to 86 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 · work_graph.derive_work_graph (cognitive 287) · ×1
  • work_graph.derive_work_graph (cognitive 287) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:669 — work_graph.derive_work_graph has cognitive complexity 287 (threshold 15). Drivers by points: if/else 57 (160 pts), ternaries 17 (53 pts), boolean chains 49, loops 12 (25 pts) (nesting depth added 152). To reduce it, split the body into named stages: move each independent 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.InboxPage (cognitive 262) · ×1
  • index.InboxPage (cognitive 262) console/src/pages/Inbox/index.tsx:161 — index.InboxPage has cognitive complexity 262 (threshold 15). Drivers by points: ternaries 47 (203 pts), boolean chains 31, if/else 26 (27 pts), error handling 1 (nesting depth added 157). Of this number, 79 points are the body's own statements and 183 belong to 29 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · pipeline.ground_prompt_context (cognitive 231) · ×1
  • pipeline.ground_prompt_context (cognitive 231) plugins/apps/qwenpaw-creator/backend/services/web_grounding/pipeline.py:94 — pipeline.ground_prompt_context has cognitive complexity 231 (threshold 15). Drivers by points: if/else 39 (93 pts), boolean chains 61, loops 15 (39 pts), ternaries 21 (38 pts) (nesting depth added 95). 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 · creatorSessionStore.useCreatorSessionStore.ingestEvents (cognitive 209) · ×1
  • creatorSessionStore.useCreatorSessionStore.ingestEvents (cognitive 209) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1143 — creatorSessionStore.useCreatorSessionStore.ingestEvents has cognitive complexity 209 (threshold 15). Drivers by points: if/else 55 (105 pts), ternaries 19 (60 pts), boolean chains 44 (nesting depth added 91). Most of this is not in the body itself: 1 of the 209 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 1165, 1145, 1147, …). 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 · PostComposer.PostComposer (cognitive 200) · ×1
  • PostComposer.PostComposer (cognitive 200) REDACTED:149 — PostComposer.PostComposer has cognitive complexity 200 (threshold 15). Drivers by points: ternaries 27 (72 pts), boolean chains 60, if/else 46 (60 pts), error handling 8 (nesting depth added 59). Of this number, 75 points are the body's own statements and 125 belong to 35 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 · ProviderImportService._apply (cognitive 191) · ×1
  • ProviderImportService._apply (cognitive 191) src/qwenpaw/portability/importer.py:144 — ProviderImportService._apply has cognitive complexity 191 (threshold 15). Drivers by points: if/else 58 (130 pts), boolean chains 24, error handling 13 (24 pts), loops 9 (13 pts) (nesting depth added 87). To reduce it, split the body into named stages: move each independent 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 · video_model.submit_video_task (cognitive 185) · ×1
  • video_model.submit_video_task (cognitive 185) plugins/apps/qwenpaw-creator/backend/models/video_model.py:604 — video_model.submit_video_task has cognitive complexity 185 (threshold 15). Drivers by points: if/else 55 (115 pts), boolean chains 28, ternaries 11 (21 pts), loops 7 (16 pts), error handling 5 (nesting depth added 79). 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 · doctor_cmd.run_doctor_checks (cognitive 184) · ×1
  • doctor_cmd.run_doctor_checks (cognitive 184) src/qwenpaw/cli/doctor_cmd.py:436 — doctor_cmd.run_doctor_checks has cognitive complexity 184 (threshold 15). Drivers by points: if/else 74 (113 pts), loops 18 (46 pts), ternaries 4 (12 pts), error handling 4 (10 pts), boolean chains 3 (nesting depth added 81). To reduce it, split the body into named stages: move each independent 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 · FileCreatorAgentRuntime._drive_subagent_inner (cognitive 180) · ×1
  • FileCreatorAgentRuntime._drive_subagent_inner (cognitive 180) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5809 — FileCreatorAgentRuntime._drive_subagent_inner has cognitive complexity 180 (threshold 15). Drivers by points: if/else 48 (114 pts), error handling 11 (27 pts), boolean chains 18, ternaries 5 (15 pts), loops 3 (6 pts) (nesting depth added 95). To reduce it, split the body into named stages: move each independent 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 · compliance.check_plugin (cognitive 178) · ×1
  • compliance.check_plugin (cognitive 178) src/qwenpaw/plugins/compliance.py:243 — compliance.check_plugin has cognitive complexity 178 (threshold 15). Drivers by points: if/else 31 (104 pts), loops 12 (33 pts), boolean chains 24, ternaries 6 (14 pts), error handling 2 (3 pts) (nesting depth added 103). 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 · utils.agentscope_msg_to_message (cognitive 171) · ×1
  • utils.agentscope_msg_to_message (cognitive 171) src/qwenpaw/app/chats/utils.py:635 — utils.agentscope_msg_to_message has cognitive complexity 171 (threshold 15). Drivers by points: if/else 43 (144 pts), boolean chains 14, error handling 2 (6 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 109). To reduce it, split the body into named stages: move each independent 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 · AgentScopeAgentChatClient.complete (cognitive 169) · ×1
  • AgentScopeAgentChatClient.complete (cognitive 169) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:870 — AgentScopeAgentChatClient.complete has cognitive complexity 169 (threshold 15). Drivers by points: if/else 41 (110 pts), boolean chains 28, loops 5 (16 pts), error handling 6 (8 pts), ternaries 3 (7 pts) (nesting depth added 86). 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 · AssetsPage.AssetsPage (cognitive 165) · ×1
  • AssetsPage.AssetsPage (cognitive 165) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1457 — AssetsPage.AssetsPage has cognitive complexity 165 (threshold 15). Drivers by points: ternaries 35 (63 pts), boolean chains 51, if/else 30 (47 pts), error handling 3 (4 pts) (nesting depth added 46). Of this number, 22 points are the body's own statements and 143 belong to 29 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 · Provider.update_model_config (cognitive 164) · ×1
  • Provider.update_model_config (cognitive 164) src/qwenpaw/providers/provider.py:1137 — Provider.update_model_config has cognitive complexity 164 (threshold 15). Drivers by points: if/else 38 (131 pts), ternaries 4 (16 pts), boolean chains 10, loops 3 (7 pts) (nesting depth added 109). 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.IssueCard (cognitive 162) · ×1
  • index.IssueCard (cognitive 162) REDACTED:248 — index.IssueCard has cognitive complexity 162 (threshold 15). Drivers by points: if/else 24 (69 pts), ternaries 28 (53 pts), boolean chains 25, loops 3 (15 pts) (nesting depth added 82). Of this number, 140 points are the body's own statements and 22 belong to 8 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._model_loop (cognitive 159) · ×1
  • FileCreatorAgentRuntime._model_loop (cognitive 159) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3243 — FileCreatorAgentRuntime._model_loop has cognitive complexity 159 (threshold 15). Drivers by points: if/else 42 (117 pts), boolean chains 17, ternaries 5 (11 pts), error handling 3 (7 pts), loops 4 (7 pts) (nesting depth added 88). To reduce it, split the body into named stages: move each independent 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 · TabbedEditor.TabbedEditor (cognitive 155) · ×1
  • TabbedEditor.TabbedEditor (cognitive 155) console/src/pages/Coding/TabbedEditor.tsx:185 — TabbedEditor.TabbedEditor has cognitive complexity 155 (threshold 15). Drivers by points: if/else 67 (74 pts), boolean chains 39, ternaries 21 (29 pts), loops 6 (7 pts), error handling 6 (nesting depth added 16). Of this number, 34 points are the body's own statements and 121 belong to 44 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 · agentProgressModel.buildAgentProgressModel (cognitive 154) · ×1
  • agentProgressModel.buildAgentProgressModel (cognitive 154) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:262 — agentProgressModel.buildAgentProgressModel has cognitive complexity 154 (threshold 15). Drivers by points: ternaries 34 (111 pts), boolean chains 26, if/else 6 (12 pts), loops 5 (nesting depth added 83). Of this number, 148 points are the body's own statements and 6 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 · FilesDrawer.FilesDrawer (cognitive 151) · ×1
  • FilesDrawer.FilesDrawer (cognitive 151) console/src/features/files-workspace/FilesDrawer.tsx:74 — FilesDrawer.FilesDrawer has cognitive complexity 151 (threshold 15). Drivers by points: ternaries 40 (88 pts), boolean chains 32, if/else 19 (26 pts), loops 3 (4 pts), error handling 1 (nesting depth added 56). Of this number, 67 points are the body's own statements and 84 belong to 16 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 · LocalModelManageModal.LocalModelManageModal (cognitive 142) · ×1
  • LocalModelManageModal.LocalModelManageModal (cognitive 142) console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:126 — LocalModelManageModal.LocalModelManageModal has cognitive complexity 142 (threshold 15). Drivers by points: ternaries 42 (68 pts), boolean chains 29, if/else 25 (28 pts), error handling 17 (nesting depth added 29). Of this number, 30 points are the body's own statements and 112 belong to 41 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 · InboundDecoder._on_message (cognitive 136) · ×1
  • InboundDecoder._on_message (cognitive 136) REDACTED:40 — InboundDecoder._on_message has cognitive complexity 136 (threshold 15). Drivers by points: if/else 41 (86 pts), boolean chains 37, loops 3 (6 pts), ternaries 3 (6 pts), error handling 1 (nesting depth added 51). 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 · FilesWorkspace.FilesWorkspace (cognitive 131) · ×1
  • FilesWorkspace.FilesWorkspace (cognitive 131) console/src/features/files-workspace/FilesWorkspace.tsx:65 — FilesWorkspace.FilesWorkspace has cognitive complexity 131 (threshold 15). Drivers by points: if/else 41 (51 pts), boolean chains 38, ternaries 24 (35 pts), error handling 5 (6 pts), loops 1 (nesting depth added 22). Of this number, 24 points are the body's own statements and 107 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlanPage.PlanPage (cognitive 126) · ×1
  • PlanPage.PlanPage (cognitive 126) plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:40 — PlanPage.PlanPage has cognitive complexity 126 (threshold 15). Drivers by points: boolean chains 45, ternaries 32 (41 pts), if/else 34 (38 pts), error handling 2 (nesting depth added 13). Of this number, 41 points are the body's own statements and 85 belong to 31 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 · doctor_fix_runner._plan_fixes (cognitive 125) · ×1
  • doctor_fix_runner._plan_fixes (cognitive 125) src/qwenpaw/cli/doctor_fix_runner.py:278 — doctor_fix_runner._plan_fixes has cognitive complexity 125 (threshold 15). Drivers by points: if/else 39 (86 pts), loops 7 (14 pts), error handling 4 (11 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThinkingControl.ThinkingControl (cognitive 121) · ×1
  • ThinkingControl.ThinkingControl (cognitive 121) console/src/features/thinking/ThinkingControl.tsx:15 — ThinkingControl.ThinkingControl has cognitive complexity 121 (threshold 15). Drivers by points: ternaries 38 (85 pts), boolean chains 20, if/else 12 (16 pts) (nesting depth added 51). Of this number, 70 points are the body's own statements and 51 belong to 8 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · events.translate_frames (cognitive 119) · ×1
  • events.translate_frames (cognitive 119) plugins/apps/qwenpaw-data/backend/bridge/events.py:210 — events.translate_frames has cognitive complexity 119 (threshold 15). Drivers by points: if/else 28 (98 pts), loops 4 (11 pts), boolean chains 10 (nesting depth added 77). 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.Evaluation (cognitive 119) · ×1
  • index.Evaluation (cognitive 119) website/src/pages/Evaluation/index.tsx:45 — index.Evaluation has cognitive complexity 119 (threshold 15). Drivers by points: ternaries 37 (80 pts), boolean chains 29, if/else 9 (10 pts) (nesting depth added 44). Of this number, 61 points are the body's own statements and 58 belong to 16 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.ModelsPage (cognitive 115) · ×1
  • index.ModelsPage (cognitive 115) console/src/pages/Settings/Models/index.tsx:47 — index.ModelsPage has cognitive complexity 115 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 36, ternaries 14 (33 pts), loops 4 (nesting depth added 35). Of this number, 41 points are the body's own statements and 74 belong to 17 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 · creatorMessagePresentation.toolCallPresentations (cognitive 115) · ×1
  • creatorMessagePresentation.toolCallPresentations (cognitive 115) REDACTED:923 — creatorMessagePresentation.toolCallPresentations has cognitive complexity 115 (threshold 15). Drivers by points: if/else 41 (58 pts), ternaries 22 (31 pts), boolean chains 21, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 29). None of this is in the body itself: all 115 points belong to 6 function items inside it that branch (a function literal at line 1030, a function literal at line 953, a function literal at line 1178, …). 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 · SidebarSessionList.SidebarSessionList (cognitive 110) · ×1
  • SidebarSessionList.SidebarSessionList (cognitive 110) console/src/layouts/SidebarSessionList.tsx:274 — SidebarSessionList.SidebarSessionList has cognitive complexity 110 (threshold 15). Drivers by points: if/else 39 (47 pts), ternaries 21 (29 pts), boolean chains 28, loops 4 (5 pts), error handling 1 (nesting depth added 17). Of this number, 28 points are the body's own statements and 82 belong to 31 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.HubPage (cognitive 109) · ×1
  • index.HubPage (cognitive 109) console/src/pages/Hub/index.tsx:76 — index.HubPage has cognitive complexity 109 (threshold 15). Drivers by points: ternaries 20 (42 pts), boolean chains 33, if/else 23 (25 pts), error handling 8, loops 1 (nesting depth added 24). Of this number, 28 points are the body's own statements and 81 belong to 18 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 · dependency_transaction.prepare_payload (cognitive 108) · ×1
  • dependency_transaction.prepare_payload (cognitive 108) src/qwenpaw/plugins/dependency_transaction.py:296 — dependency_transaction.prepare_payload has cognitive complexity 108 (threshold 15). Drivers by points: if/else 22 (66 pts), loops 9 (18 pts), ternaries 3 (10 pts), boolean chains 8, error handling 2 (6 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent 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 · FileSpecialistToolRegistry.invoke (cognitive 107) · ×1
  • FileSpecialistToolRegistry.invoke (cognitive 107) plugins/apps/qwenpaw-creator/backend/services/specialist_tools.py:1266 — FileSpecialistToolRegistry.invoke has cognitive complexity 107 (threshold 15). Drivers by points: if/else 37 (56 pts), ternaries 15 (31 pts), boolean chains 15, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent 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 · Project._validate_graph (cognitive 106) · ×1
  • Project._validate_graph (cognitive 106) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:1482 — Project._validate_graph has cognitive complexity 106 (threshold 15). Drivers by points: if/else 29 (78 pts), loops 12 (21 pts), boolean chains 7 (nesting depth added 58). To reduce it, split the body into named stages: move each independent 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 · doctor_checks.enabled_channel_notes (cognitive 105) · ×1
  • doctor_checks.enabled_channel_notes (cognitive 105) src/qwenpaw/cli/doctor_checks.py:777 — doctor_checks.enabled_channel_notes has cognitive complexity 105 (threshold 15). Drivers by points: if/else 18 (64 pts), boolean chains 36, loops 3 (5 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KanbanBoard (cognitive 103) · ×1
  • KanbanBoard (cognitive 103) REDACTED:1037 — KanbanBoard has cognitive complexity 103 (threshold 15). Drivers by points: if/else 34 (46 pts), boolean chains 25, error handling 16 (17 pts), ternaries 15 (nesting depth added 13). Most of this is not in the body itself: 11 of the 103 points are its own statements and the rest belongs to 69 function items inside it that branch (moveIssue, subscribeStream::onmessage, onRun, …). 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 · file_search._walk_and_grep (cognitive 101) · ×1
  • file_search._walk_and_grep (cognitive 101) src/qwenpaw/agents/tools/file_search.py:384 — file_search._walk_and_grep has cognitive complexity 101 (threshold 15). Drivers by points: if/else 20 (63 pts), ternaries 4 (18 pts), loops 6 (14 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 66). 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 · init_cmd.init_cmd (cognitive 101) · ×1
  • init_cmd.init_cmd (cognitive 101) src/qwenpaw/cli/init_cmd.py:216 — init_cmd.init_cmd has cognitive complexity 101 (threshold 15). Drivers by points: if/else 53 (84 pts), boolean chains 14, ternaries 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent 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.CommunityPage (cognitive 101) · ×1
  • index.CommunityPage (cognitive 101) console/src/pages/Market/Community/index.tsx:103 — index.CommunityPage has cognitive complexity 101 (threshold 15). Drivers by points: ternaries 20 (42 pts), boolean chains 34, if/else 19 (25 pts) (nesting depth added 28). Of this number, 28 points are the body's own statements and 73 belong to 19 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 · native_media.source_intelligence_content_parts (cognitive 100) · ×1
  • native_media.source_intelligence_content_parts (cognitive 100) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:260 — native_media.source_intelligence_content_parts has cognitive complexity 100 (threshold 15). Drivers by points: if/else 31 (77 pts), boolean chains 13, loops 4 (6 pts), ternaries 2 (4 pts) (nesting depth added 50). 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 · OpenAIChatModelCompat._parse_stream_response (cognitive 100) · ×1
  • OpenAIChatModelCompat._parse_stream_response (cognitive 100) src/qwenpaw/providers/openai_chat_model_compat.py:968 — OpenAIChatModelCompat._parse_stream_response has cognitive complexity 100 (threshold 15). Drivers by points: if/else 17 (61 pts), loops 6 (19 pts), ternaries 6 (16 pts), boolean chains 4 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceMediaAnalysisService.commit_agent_intelligence (cognitive 98) · ×1
  • SourceMediaAnalysisService.commit_agent_intelligence (cognitive 98) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:843 — SourceMediaAnalysisService.commit_agent_intelligence has cognitive complexity 98 (threshold 15). Drivers by points: if/else 21 (42 pts), ternaries 22 (27 pts), boolean chains 17, error handling 4 (9 pts), loops 1 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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.SettingsCenter (cognitive 96) · ×1
  • index.SettingsCenter (cognitive 96) console/src/pages/SettingsCenter/index.tsx:346 — index.SettingsCenter has cognitive complexity 96 (threshold 15). Drivers by points: boolean chains 32, ternaries 24 (32 pts), if/else 21 (27 pts), loops 4 (5 pts) (nesting depth added 15). Of this number, 27 points are the body's own statements and 69 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DingTalkTransport._send_media_part_via_webhook (cognitive 95) · ×1
  • DingTalkTransport._send_media_part_via_webhook (cognitive 95) REDACTED:883 — DingTalkTransport._send_media_part_via_webhook has cognitive complexity 95 (threshold 15). Drivers by points: if/else 34 (63 pts), boolean chains 29, ternaries 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_transaction.apply_operation (cognitive 95) · ×1
  • dependency_transaction.apply_operation (cognitive 95) src/qwenpaw/plugins/dependency_transaction.py:1119 — dependency_transaction.apply_operation has cognitive complexity 95 (threshold 15). Drivers by points: if/else 29 (55 pts), boolean chains 11, loops 7 (11 pts), error handling 3 (9 pts), ternaries 4 (9 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · channel_config_compat.normalize_channel_config (cognitive 94) · ×1
  • channel_config_compat.normalize_channel_config (cognitive 94) src/qwenpaw/config/channel_config_compat.py:30 — channel_config_compat.normalize_channel_config has cognitive complexity 94 (threshold 15). Drivers by points: loops 22 (48 pts), boolean chains 25, if/else 7 (12 pts), ternaries 3 (9 pts) (nesting depth added 37). 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 · ElementDetail.ElementDetail (cognitive 94) · ×1
  • ElementDetail.ElementDetail (cognitive 94) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:322 — ElementDetail.ElementDetail has cognitive complexity 94 (threshold 15). Drivers by points: boolean chains 64, if/else 16, ternaries 10 (13 pts), error handling 1 (nesting depth added 3). Of this number, 66 points are the body's own statements and 28 belong to 30 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 · main._execute_run (cognitive 93) · ×1
  • main._execute_run (cognitive 93) plugins/apps/agent-kanban/backend/main.py:497 — main._execute_run has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (74 pts), loops 4 (11 pts), error handling 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 57). 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 · MessageRenderer._message_to_presented_parts (cognitive 92) · ×1
  • MessageRenderer._message_to_presented_parts (cognitive 92) src/qwenpaw/app/channels/renderer.py:189 — MessageRenderer._message_to_presented_parts has cognitive complexity 92 (threshold 15). Drivers by points: if/else 17 (45 pts), ternaries 5 (25 pts), boolean chains 16, loops 2 (6 pts) (nesting depth added 52). 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 · image_execution._resolve_request (cognitive 90) · ×1
  • image_execution._resolve_request (cognitive 90) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:977 — image_execution._resolve_request has cognitive complexity 90 (threshold 15). Drivers by points: if/else 28 (45 pts), ternaries 14 (23 pts), boolean chains 22 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectCommitBoundary.commit (cognitive 89) · ×1
  • ProjectCommitBoundary.commit (cognitive 89) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:408 — ProjectCommitBoundary.commit has cognitive complexity 89 (threshold 15). Drivers by points: if/else 37 (54 pts), boolean chains 17, error handling 6 (9 pts), ternaries 5 (6 pts), loops 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatSenderTabsPanel.ChatSenderTabsPanel (cognitive 89) · ×1
  • ChatSenderTabsPanel.ChatSenderTabsPanel (cognitive 89) console/src/pages/Chat/components/ChatSenderTabsPanel.tsx:45 — ChatSenderTabsPanel.ChatSenderTabsPanel has cognitive complexity 89 (threshold 15). Drivers by points: ternaries 33 (52 pts), boolean chains 28, if/else 8, loops 1 (nesting depth added 19). Of this number, 61 points are the body's own statements and 28 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 · TimelineLivePreview.TimelineLivePreview (cognitive 89) · ×1
  • TimelineLivePreview.TimelineLivePreview (cognitive 89) REDACTED:533 — TimelineLivePreview.TimelineLivePreview has cognitive complexity 89 (threshold 15). Drivers by points: if/else 40 (50 pts), boolean chains 31, ternaries 5 (8 pts) (nesting depth added 13). Most of this is not in the body itself: 10 of the 89 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 678, 904, 795, …). 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 · EmbeddingModelCard.EmbeddingModelCard (cognitive 88) · ×1
  • EmbeddingModelCard.EmbeddingModelCard (cognitive 88) console/src/pages/Agent/Config/components/EmbeddingModelCard.tsx:44 — EmbeddingModelCard.EmbeddingModelCard has cognitive complexity 88 (threshold 15). Drivers by points: ternaries 29 (57 pts), boolean chains 24, error handling 4, if/else 3 (nesting depth added 28). Of this number, 69 points are the body's own statements and 19 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 · DependencyUpgradeManager._collect_consumers (cognitive 87) · ×1
  • DependencyUpgradeManager._collect_consumers (cognitive 87) src/qwenpaw/plugins/dependency_upgrade.py:830 — DependencyUpgradeManager._collect_consumers has cognitive complexity 87 (threshold 15). Drivers by points: if/else 22 (52 pts), ternaries 8 (17 pts), boolean chains 14, loops 3 (4 pts) (nesting depth added 40). 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 · BrowserUseCard.getBrowserTitle (cognitive 87) · ×1
  • BrowserUseCard.getBrowserTitle (cognitive 87) console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:105 — BrowserUseCard.getBrowserTitle has cognitive complexity 87 (threshold 15). Drivers by points: ternaries 22 (70 pts), boolean chains 13, match/switch 2 (3 pts), if/else 1 (nesting depth added 49). Of this number, 16 points are the body's own statements and 71 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 · motion_design._validated_design (cognitive 86) · ×1
  • motion_design._validated_design (cognitive 86) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:593 — motion_design._validated_design has cognitive complexity 86 (threshold 15). Drivers by points: if/else 30 (37 pts), boolean chains 26, ternaries 12 (15 pts), error handling 5 (8 pts) (nesting depth added 13). 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 · browser_control.browser (cognitive 86) · ×1
  • browser_control.browser (cognitive 86) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5056 — browser_control.browser has cognitive complexity 86 (threshold 15). Drivers by points: if/else 48 (56 pts), boolean chains 14, ternaries 5 (9 pts), error handling 4 (7 pts) (nesting depth added 15). 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 · ConsoleChannel.stream_one (cognitive 86) · ×1
  • ConsoleChannel.stream_one (cognitive 86) src/qwenpaw/app/channels/console/channel.py:372 — ConsoleChannel.stream_one has cognitive complexity 86 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 22, loops 6 (14 pts), ternaries 3 (9 pts), error handling 5 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · R2VWorkbenchPage.WorkbenchSurface (cognitive 85) · ×1
  • R2VWorkbenchPage.WorkbenchSurface (cognitive 85) plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284 — R2VWorkbenchPage.WorkbenchSurface has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 102, if/else 70 (90 pts), ternaries 55 (81 pts), loops 3, error handling 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (R2VWorkbenchPage.WorkbenchSurface::regenerateNode) 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 · renderer._render_dense_atlas_page (cognitive 83) · ×1
  • renderer._render_dense_atlas_page (cognitive 83) src/qwenpaw/agents/context/visual_compression/rendering/renderer.py:596 — renderer._render_dense_atlas_page has cognitive complexity 83 (threshold 15). Drivers by points: if/else 12 (51 pts), loops 5 (16 pts), ternaries 5 (11 pts), boolean chains 5 (nesting depth added 56). To reduce it, split the body into named stages: move each independent 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 · MentionInput.MentionInput (cognitive 83) · ×1
  • MentionInput.MentionInput (cognitive 83) plugins/apps/qwenpaw-creator/ui/src/components/agent/MentionInput.tsx:173 — MentionInput.MentionInput has cognitive complexity 83 (threshold 15). Drivers by points: if/else 40 (47 pts), boolean chains 16, ternaries 12 (16 pts), error handling 2 (3 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 2 of the 83 points are its own statements and the rest belongs to 21 function items inside it that branch (handleKeyDown, fragmentFromClipboard, a function literal at line 415, …). 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 · QwenPawAgent._reasoning (cognitive 82) · ×1
  • QwenPawAgent._reasoning (cognitive 82) src/qwenpaw/agents/react_agent.py:1177 — QwenPawAgent._reasoning has cognitive complexity 82 (threshold 15). Drivers by points: if/else 31 (59 pts), boolean chains 19, loops 2 (3 pts), error handling 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · dependencyUpgrade.followUpgrade (cognitive 82) · ×1
  • dependencyUpgrade.followUpgrade (cognitive 82) console/src/pages/Settings/PluginManager/dependencyUpgrade.tsx:123 — dependencyUpgrade.followUpgrade has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (61 pts), error handling 3 (10 pts), boolean chains 6, ternaries 1 (4 pts), loops 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent 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 · DingTalkTransport.send_content_parts (cognitive 81) · ×1
  • DingTalkTransport.send_content_parts (cognitive 81) REDACTED:1215 — DingTalkTransport.send_content_parts has cognitive complexity 81 (threshold 15). Drivers by points: if/else 20 (43 pts), boolean chains 12, loops 4 (10 pts), ternaries 6 (10 pts), error handling 2 (6 pts) (nesting depth added 37). 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 · run_tool_batch._run_steps (cognitive 81) · ×1
  • run_tool_batch._run_steps (cognitive 81) src/qwenpaw/agents/tools/run_tool_batch.py:693 — run_tool_batch._run_steps has cognitive complexity 81 (threshold 15). Drivers by points: if/else 21 (52 pts), error handling 4 (10 pts), ternaries 3 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent 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 · Envelope.translate_event (cognitive 79) · ×1
  • Envelope.translate_event (cognitive 79) src/qwenpaw/runtime/envelope.py:196 — Envelope.translate_event has cognitive complexity 79 (threshold 15). Drivers by points: if/else 28 (55 pts), loops 3 (10 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppMarket.AppMarket (cognitive 79) · ×1
  • AppMarket.AppMarket (cognitive 79) console/src/pages/AppCenter/AppMarket.tsx:124 — AppMarket.AppMarket has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 19 (28 pts), boolean chains 25, if/else 20 (24 pts), error handling 2 (nesting depth added 13). Of this number, 17 points are the body's own statements and 62 belong to 14 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.AgentSelector (cognitive 78) · ×1
  • index.AgentSelector (cognitive 78) console/src/components/AgentSelector/index.tsx:35 — index.AgentSelector has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 22 (31 pts), boolean chains 24, if/else 16 (20 pts), error handling 3 (nesting depth added 13). Most of this is not in the body itself: 15 of the 78 points are its own statements and the rest belongs to 17 function items inside it that branch (renderAgentDetails, renderToggleButton, handleToggleAgent, …). 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 · shell._execute_subprocess_sync (cognitive 76) · ×1
  • shell._execute_subprocess_sync (cognitive 76) src/qwenpaw/agents/tools/shell.py:704 — shell._execute_subprocess_sync has cognitive complexity 76 (threshold 15). Drivers by points: if/else 28 (44 pts), error handling 8 (20 pts), boolean chains 7, loops 3, ternaries 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.startBackgroundQueue (cognitive 76) · ×1
  • index.startBackgroundQueue (cognitive 76) console/src/pages/Chat/index.tsx:388 — index.startBackgroundQueue has cognitive complexity 76 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 10, ternaries 2 (6 pts), error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 36). Most of this is not in the body itself: 4 of the 76 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 409, 559). 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 · SkillsConfigPane.SkillsConfigPane (cognitive 76) · ×1
  • SkillsConfigPane.SkillsConfigPane (cognitive 76) plugins/apps/qwenpaw-creator/ui/src/components/creator/SkillsConfigPane.tsx:62 — SkillsConfigPane.SkillsConfigPane has cognitive complexity 76 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 22, ternaries 14 (22 pts), error handling 8 (nesting depth added 10). Of this number, 26 points are the body's own statements and 50 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 · model_resolution.resolve_model_info (cognitive 74) · ×1
  • model_resolution.resolve_model_info (cognitive 74) src/qwenpaw/providers/model_resolution.py:22 — model_resolution.resolve_model_info has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 21, ternaries 5 (11 pts), loops 7 (10 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockableSidebar.DockableSidebar (cognitive 74) · ×1
  • DockableSidebar.DockableSidebar (cognitive 74) console/src/layouts/DockableSidebar.tsx:25 — DockableSidebar.DockableSidebar has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 25 (29 pts), if/else 21 (24 pts), boolean chains 21 (nesting depth added 7). Of this number, 31 points are the body's own statements and 43 belong to 11 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 · RemoteModelManageModal.RemoteModelManageModal (cognitive 74) · ×1
  • RemoteModelManageModal.RemoteModelManageModal (cognitive 74) console/src/pages/Settings/Models/components/modals/RemoteModelManageModal.tsx:43 — RemoteModelManageModal.RemoteModelManageModal has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 29, ternaries 20 (24 pts), if/else 15 (16 pts), error handling 5 (nesting depth added 5). Most of this is not in the body itself: 15 of the 74 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 420, test, discover, …). 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 · useSkillPool.useSkillPool.handleBroadcast (cognitive 74) · ×1
  • useSkillPool.useSkillPool.handleBroadcast (cognitive 74) console/src/pages/Settings/SkillPool/useSkillPool.tsx:556 — useSkillPool.useSkillPool.handleBroadcast has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 11 (29 pts), if/else 10 (26 pts), boolean chains 11, loops 4 (5 pts), error handling 2 (3 pts) (nesting depth added 36). Of this number, 47 points are the body's own statements and 27 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 · compatibility_testing._validate_plugin_api_calls (cognitive 73) · ×1
  • compatibility_testing._validate_plugin_api_calls (cognitive 73) src/qwenpaw/portability/compatibility_testing.py:367 — compatibility_testing._validate_plugin_api_calls has cognitive complexity 73 (threshold 15). Drivers by points: if/else 16 (47 pts), loops 4 (10 pts), boolean chains 8, error handling 2 (7 pts), ternaries 1 (nesting depth added 42). 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 · dependencies._read_installed_metadata (cognitive 72) · ×1
  • dependencies._read_installed_metadata (cognitive 72) src/qwenpaw/plugins/execution/dependencies.py:629 — dependencies._read_installed_metadata has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 8 (14 pts), boolean chains 9, ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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 · AccessControlDrawer.AccessControlDrawer (cognitive 72) · ×1
  • AccessControlDrawer.AccessControlDrawer (cognitive 72) console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:51 — AccessControlDrawer.AccessControlDrawer has cognitive complexity 72 (threshold 15). Drivers by points: if/else 36 (41 pts), boolean chains 15, ternaries 8 (10 pts), error handling 6 (nesting depth added 7). Most of this is not in the body itself: 6 of the 72 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 139, handleAdd, handleBatchRemove, …). 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.ImportWorkflow (cognitive 71) · ×1
  • index.ImportWorkflow (cognitive 71) console/src/pages/Import/index.tsx:189 — index.ImportWorkflow has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 38, ternaries 13 (17 pts), if/else 15, error handling 1 (nesting depth added 4). Of this number, 36 points are the body's own statements and 35 belong to 29 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 · manage_prd.manage_prd (cognitive 70) · ×1
  • manage_prd.manage_prd (cognitive 70) plugins/bundle/cloudpaw/tools/manage_prd.py:254 — manage_prd.manage_prd has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (53 pts), error handling 4 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader._unload_plugin_reserved (cognitive 70) · ×1
  • PluginLoader._unload_plugin_reserved (cognitive 70) src/qwenpaw/plugins/loader.py:4427 — PluginLoader._unload_plugin_reserved has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 15, error handling 4 (8 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegLocalMediaRunner._apply_overlay (cognitive 69) · ×1
  • FfmpegLocalMediaRunner._apply_overlay (cognitive 69) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1420 — FfmpegLocalMediaRunner._apply_overlay has cognitive complexity 69 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 20, ternaries 6 (17 pts), loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_catalog.update_model_metadata (cognitive 69) · ×1
  • model_catalog.update_model_metadata (cognitive 69) REDACTED:541 — model_catalog.update_model_metadata has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 5 (14 pts), ternaries 2 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionProjectDirectory.SessionProjectDirectory (cognitive 68) · ×1
  • SessionProjectDirectory.SessionProjectDirectory (cognitive 68) console/src/features/project-directory/SessionProjectDirectory.tsx:114 — SessionProjectDirectory.SessionProjectDirectory has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 50 (75 pts), if/else 47 (51 pts), boolean chains 45, error handling 7 (10 pts) (nesting depth added 32). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (SessionProjectDirectory.SessionProjectDirectory::commitSessionList) 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 · search.search_visual_refs (cognitive 67) · ×1
  • search.search_visual_refs (cognitive 67) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/search.py:386 — search.search_visual_refs has cognitive complexity 67 (threshold 15). Drivers by points: if/else 17 (42 pts), error handling 3 (10 pts), ternaries 3 (7 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent 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 · hub._fetch_bundle_from_repo_and_skill_hint (cognitive 67) · ×1
  • hub._fetch_bundle_from_repo_and_skill_hint (cognitive 67) src/qwenpaw/agents/skill_system/hub.py:1421 — hub._fetch_bundle_from_repo_and_skill_hint has cognitive complexity 67 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 5 (10 pts), error handling 2 (8 pts), ternaries 3 (7 pts), boolean chains 6 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader._reload_plugin_transaction (cognitive 67) · ×1
  • PluginLoader._reload_plugin_transaction (cognitive 67) src/qwenpaw/plugins/loader.py:2681 — PluginLoader._reload_plugin_transaction has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 16, ternaries 8 (13 pts), error handling 3, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.ChromeSetupPage (cognitive 67) · ×1
  • index.ChromeSetupPage (cognitive 67) plugins/bundle/chrome/frontend/src/index.tsx:885 — index.ChromeSetupPage has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 20 (35 pts), if/else 14 (16 pts), boolean chains 12, error handling 4 (nesting depth added 17). Of this number, 30 points are the body's own statements and 37 belong to 12 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 · model_factory._fixup_media_list (cognitive 66) · ×1
  • model_factory._fixup_media_list (cognitive 66) src/qwenpaw/agents/model_factory.py:1509 — model_factory._fixup_media_list has cognitive complexity 66 (threshold 15). Drivers by points: if/else 11 (31 pts), ternaries 8 (25 pts), boolean chains 9, loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_message_utils._coerce_tool_inputs_to_json (cognitive 66) · ×1
  • tool_message_utils._coerce_tool_inputs_to_json (cognitive 66) src/qwenpaw/agents/utils/tool_message_utils.py:437 — tool_message_utils._coerce_tool_inputs_to_json has cognitive complexity 66 (threshold 15). Drivers by points: if/else 16 (48 pts), error handling 2 (10 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migration._do_migrate_legacy_skills (cognitive 66) · ×1
  • migration._do_migrate_legacy_skills (cognitive 66) src/qwenpaw/app/migration.py:339 — migration._do_migrate_legacy_skills has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (48 pts), loops 8 (12 pts), boolean chains 4, error handling 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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 · JobDrawer.JobDrawer (cognitive 66) · ×1
  • JobDrawer.JobDrawer (cognitive 66) console/src/pages/Control/CronJobs/components/JobDrawer.tsx:70 — JobDrawer.JobDrawer has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 33, if/else 22 (23 pts), ternaries 9, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 12 of the 66 points are its own statements and the rest belongs to 25 function items inside it that branch (a function literal at line 206, a function literal at line 288, a function literal at line 395, …). 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 · browser_control._action_start (cognitive 65) · ×1
  • browser_control._action_start (cognitive 65) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1806 — browser_control._action_start has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (42 pts), ternaries 4 (10 pts), boolean chains 9, error handling 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopOS.DesktopOS (cognitive 65) · ×1
  • DesktopOS.DesktopOS (cognitive 65) console/src/os/DesktopOS.tsx:73 — DesktopOS.DesktopOS has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 14 (25 pts), if/else 17 (19 pts), boolean chains 16, error handling 2 (3 pts), loops 2 (nesting depth added 14). Most of this is not in the body itself: 8 of the 65 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 453, a function literal at line 150, handleUninstall, …). 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 · MCPAccessModal.MCPAccessModal (cognitive 65) · ×1
  • MCPAccessModal.MCPAccessModal (cognitive 65) console/src/pages/Agent/MCP/components/MCPAccessModal.tsx:44 — MCPAccessModal.MCPAccessModal has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 15 (38 pts), if/else 15 (19 pts), boolean chains 5, error handling 3 (nesting depth added 27). Most of this is not in the body itself: 8 of the 65 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 68, handleSave, a function literal at line 223, …). 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 · AgentProgressOverview.AgentProgressOverview (cognitive 65) · ×1
  • AgentProgressOverview.AgentProgressOverview (cognitive 65) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentProgressOverview.tsx:214 — AgentProgressOverview.AgentProgressOverview has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 23 (48 pts), boolean chains 12, if/else 5 (nesting depth added 25). Of this number, 45 points are the body's own statements and 20 belong to 12 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 · AgentDock.ToolCallCard (cognitive 65) · ×1
  • AgentDock.ToolCallCard (cognitive 65) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:760 — AgentDock.ToolCallCard has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 19 (43 pts), boolean chains 22 (nesting depth added 24). 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 · fileProjectReviewPresentation.fileReviewPresentation (cognitive 65) · ×1
  • fileProjectReviewPresentation.fileReviewPresentation (cognitive 65) plugins/apps/qwenpaw-creator/ui/src/lib/fileProjectReviewPresentation.ts:127 — fileProjectReviewPresentation.fileReviewPresentation has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 22 (37 pts), boolean chains 17, if/else 9 (11 pts) (nesting depth added 17). Of this number, 56 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · service.recover_interrupted_source_analysis (cognitive 64) · ×1
  • service.recover_interrupted_source_analysis (cognitive 64) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:2638 — service.recover_interrupted_source_analysis has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (42 pts), boolean chains 8, error handling 2 (6 pts), loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager.compress (cognitive 64) · ×1
  • ScrollContextManager.compress (cognitive 64) src/qwenpaw/agents/context/scroll/manager.py:465 — ScrollContextManager.compress has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · hub._http_fetch (cognitive 64) · ×1
  • hub._http_fetch (cognitive 64) src/qwenpaw/agents/skill_system/hub.py:490 — hub._http_fetch has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (38 pts), error handling 6 (16 pts), boolean chains 7, ternaries 1 (2 pts), loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent 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 · main.stream_issue (cognitive 63) · ×1
  • main.stream_issue (cognitive 63) plugins/apps/agent-kanban/backend/main.py:770 — main.stream_issue has cognitive complexity 63 (threshold 15). Drivers by points: if/else 13 (52 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 43). 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 · wheel_additions.validate_additions (cognitive 63) · ×1
  • wheel_additions.validate_additions (cognitive 63) src/qwenpaw/plugins/wheel_additions.py:469 — wheel_additions.validate_additions has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 9, loops 4 (9 pts), ternaries 2 (6 pts), error handling 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.Docs (cognitive 63) · ×1
  • index.Docs (cognitive 63) website/src/pages/Docs/index.tsx:27 — index.Docs has cognitive complexity 63 (threshold 15). Drivers by points: if/else 32 (34 pts), boolean chains 15, ternaries 10, loops 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 14 of the 63 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 119, a function literal at line 213, handleTocItemClick, …). 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 · WorkGraphScheduler._prepare_changed_prompts (cognitive 62) · ×1
  • WorkGraphScheduler._prepare_changed_prompts (cognitive 62) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:852 — WorkGraphScheduler._prepare_changed_prompts has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 16, error handling 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.sync_sessions_to_history (cognitive 62) · ×1
  • sync.sync_sessions_to_history (cognitive 62) src/qwenpaw/agents/context/scroll/sync.py:577 — sync.sync_sessions_to_history has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 12, ternaries 6 (11 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.SessionItem (cognitive 62) · ×1
  • index.SessionItem (cognitive 62) console/src/components/SessionItem/index.tsx:69 — index.SessionItem has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 21 (24 pts), boolean chains 23, if/else 11 (14 pts), error handling 1 (nesting depth added 6). Of this number, 34 points are the body's own statements and 28 belong to 12 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 · FileCreatorAgentRuntime._queue_yolo_completion_resume (cognitive 61) · ×1
  • FileCreatorAgentRuntime._queue_yolo_completion_resume (cognitive 61) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8170 — FileCreatorAgentRuntime._queue_yolo_completion_resume has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (34 pts), ternaries 7 (11 pts), boolean chains 9, error handling 3 (4 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform._on_room_encrypted_media_event (cognitive 61) · ×1
  • MatrixPlatform._on_room_encrypted_media_event (cognitive 61) REDACTED:2037 — MatrixPlatform._on_room_encrypted_media_event has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (30 pts), ternaries 5 (18 pts), boolean chains 13 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tools.get_tool_config (cognitive 61) · ×1
  • tools.get_tool_config (cognitive 61) src/qwenpaw/app/routers/tools.py:367 — tools.get_tool_config has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (39 pts), ternaries 2 (8 pts), boolean chains 7, loops 2 (7 pts) (nesting depth added 38). 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 · PluginLoader._load_plugin_from_path_unlocked (cognitive 61) · ×1
  • PluginLoader._load_plugin_from_path_unlocked (cognitive 61) src/qwenpaw/plugins/loader.py:3845 — PluginLoader._load_plugin_from_path_unlocked has cognitive complexity 61 (threshold 15). Drivers by points: if/else 25 (41 pts), boolean chains 12, error handling 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · message_convert._request_input_to_msgs (cognitive 61) · ×1
  • message_convert._request_input_to_msgs (cognitive 61) src/qwenpaw/runtime/message_convert.py:73 — message_convert._request_input_to_msgs has cognitive complexity 61 (threshold 15). Drivers by points: if/else 10 (30 pts), error handling 3 (11 pts), ternaries 2 (10 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 37). 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 · MemoryGraphView.MemoryGraphView (cognitive 61) · ×1
  • MemoryGraphView.MemoryGraphView (cognitive 61) REDACTED:701 — MemoryGraphView.MemoryGraphView has cognitive complexity 61 (threshold 15). Drivers by points: if/else 24 (25 pts), ternaries 16 (18 pts), boolean chains 17, error handling 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 42 belong to 20 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 · BackgroundTaskPanel.BackgroundTaskPanel (cognitive 61) · ×1
  • BackgroundTaskPanel.BackgroundTaskPanel (cognitive 61) console/src/pages/Chat/components/BackgroundTaskPanel.tsx:61 — BackgroundTaskPanel.BackgroundTaskPanel has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 24, ternaries 19 (23 pts), if/else 10, error handling 1 (2 pts), loops 2 (nesting depth added 5). Of this number, 43 points are the body's own statements and 18 belong to 12 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 · prompt_contract.check_changed_r2v_prompt_contracts (cognitive 60) · ×1
  • prompt_contract.check_changed_r2v_prompt_contracts (cognitive 60) plugins/apps/qwenpaw-creator/backend/services/run_review/prompt_contract.py:314 — prompt_contract.check_changed_r2v_prompt_contracts has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 4 (11 pts), boolean chains 9, ternaries 3 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GovernancePolicy.evaluate (cognitive 60) · ×1
  • GovernancePolicy.evaluate (cognitive 60) src/qwenpaw/governance/policy.py:702 — GovernancePolicy.evaluate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 16, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main._dispatch_loop (cognitive 59) · ×1
  • main._dispatch_loop (cognitive 59) plugins/apps/agent-kanban/backend/main.py:1162 — main._dispatch_loop has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 5 (12 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent 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 · ProjectCommitRecoveryCoordinator._finalize_runtime (cognitive 59) · ×1
  • ProjectCommitRecoveryCoordinator._finalize_runtime (cognitive 59) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:983 — ProjectCommitRecoveryCoordinator._finalize_runtime has cognitive complexity 59 (threshold 15). Drivers by points: if/else 30 (45 pts), boolean chains 9, ternaries 4 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · search.search_web (cognitive 59) · ×1
  • search.search_web (cognitive 59) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/search.py:156 — search.search_web has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (38 pts), error handling 3 (9 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · PluginLoader._load_plugin_unlocked (cognitive 59) · ×1
  • PluginLoader._load_plugin_unlocked (cognitive 59) src/qwenpaw/plugins/loader.py:2121 — PluginLoader._load_plugin_unlocked has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 12, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runtime.run (cognitive 59) · ×1
  • Runtime.run (cognitive 59) src/qwenpaw/runtime/runtime.py:54 — Runtime.run has cognitive complexity 59 (threshold 15). Drivers by points: loops 11 (24 pts), if/else 14 (19 pts), boolean chains 8, error handling 6 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlueprintStructureArea.SingleBoard (cognitive 59) · ×1
  • BlueprintStructureArea.SingleBoard (cognitive 59) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintStructureArea.tsx:135 — BlueprintStructureArea.SingleBoard has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 27 (45 pts), boolean chains 12, if/else 2 (nesting depth added 18). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 146, 382, 233, …). 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 · CodexMigrationProvider._inventory (cognitive 58) · ×1
  • CodexMigrationProvider._inventory (cognitive 58) src/qwenpaw/portability/providers/codex.py:130 — CodexMigrationProvider._inventory has cognitive complexity 58 (threshold 15). Drivers by points: if/else 30 (36 pts), boolean chains 13, loops 3 (4 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SkillDrawer.SkillDrawer (cognitive 58) · ×1
  • SkillDrawer.SkillDrawer (cognitive 58) console/src/pages/Agent/Skills/components/SkillDrawer.tsx:53 — SkillDrawer.SkillDrawer has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (23 pts), ternaries 10 (18 pts), boolean chains 13, error handling 3 (4 pts) (nesting depth added 13). Of this number, 18 points are the body's own statements and 40 belong to 11 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 · OrganizationModels.OrganizationModels (cognitive 58) · ×1
  • OrganizationModels.OrganizationModels (cognitive 58) console/src/pages/Hub/governance/OrganizationModels.tsx:47 — OrganizationModels.OrganizationModels has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 20, ternaries 12 (14 pts), error handling 3 (nesting depth added 7). Of this number, 17 points are the body's own statements and 41 belong to 14 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 · model_routes._assemble_model_config (cognitive 57) · ×1
  • model_routes._assemble_model_config (cognitive 57) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:363 — model_routes._assemble_model_config has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 6 (13 pts), boolean chains 8, ternaries 4 (7 pts), error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tools.update_tool_config (cognitive 57) · ×1
  • tools.update_tool_config (cognitive 57) src/qwenpaw/app/routers/tools.py:470 — tools.update_tool_config has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (36 pts), error handling 4 (7 pts), loops 2 (7 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 32). 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 · external_state.discover_qoder_plugins (cognitive 57) · ×1
  • external_state.discover_qoder_plugins (cognitive 57) src/qwenpaw/portability/providers/external_state.py:881 — external_state.discover_qoder_plugins has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 7 (13 pts), boolean chains 10, loops 3 (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 · QoderMigrationProvider.inventory (cognitive 57) · ×1
  • QoderMigrationProvider.inventory (cognitive 57) src/qwenpaw/portability/providers/qoder.py:74 — QoderMigrationProvider.inventory has cognitive complexity 57 (threshold 15). Drivers by points: if/else 25 (44 pts), boolean chains 6, loops 3 (4 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MCPPage (cognitive 57) · ×1
  • index.MCPPage (cognitive 57) console/src/pages/Agent/MCP/index.tsx:78 — index.MCPPage has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 17, ternaries 10 (17 pts), error handling 1, loops 1 (nesting depth added 10). Of this number, 23 points are the body's own statements and 34 belong to 7 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 · main.get_issue_result (cognitive 56) · ×1
  • main.get_issue_result (cognitive 56) plugins/apps/agent-kanban/backend/main.py:844 — main.get_issue_result has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (37 pts), loops 3 (8 pts), ternaries 1 (6 pts), boolean chains 4, error handling 1 (nesting depth added 32). 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 · FileCreatorAgentRuntime._promote_grounding_visuals_sync (cognitive 56) · ×1
  • FileCreatorAgentRuntime._promote_grounding_visuals_sync (cognitive 56) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5139 — FileCreatorAgentRuntime._promote_grounding_visuals_sync has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 15, error handling 3 (7 pts), loops 1, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileImageExecutionService.execute (cognitive 56) · ×1
  • FileImageExecutionService.execute (cognitive 56) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1865 — FileImageExecutionService.execute has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (42 pts), error handling 4 (5 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegLocalMediaRunner._mix_audio_tracks (cognitive 56) · ×1
  • FfmpegLocalMediaRunner._mix_audio_tracks (cognitive 56) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:723 — FfmpegLocalMediaRunner._mix_audio_tracks has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 13, loops 5 (9 pts), ternaries 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentStatsService.get_summary (cognitive 56) · ×1
  • AgentStatsService.get_summary (cognitive 56) src/qwenpaw/agent_stats/service.py:276 — AgentStatsService.get_summary has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 7 (14 pts), error handling 3 (8 pts), boolean chains 4, ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor_fix_runner.run_doctor_fix (cognitive 56) · ×1
  • doctor_fix_runner.run_doctor_fix (cognitive 56) src/qwenpaw/cli/doctor_fix_runner.py:687 — doctor_fix_runner.run_doctor_fix has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (29 pts), ternaries 5 (9 pts), boolean chains 6, error handling 5 (6 pts), loops 5 (6 pts) (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 · SessionThinking.SessionThinking (cognitive 56) · ×1
  • SessionThinking.SessionThinking (cognitive 56) console/src/features/thinking/SessionThinking.tsx:30 — SessionThinking.SessionThinking has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 24, error handling 3, ternaries 3 (nesting depth added 6). Of this number, 17 points are the body's own statements and 39 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Chart.Chart (cognitive 56) · ×1
  • Chart.Chart (cognitive 56) website/src/pages/Evaluation/Chart.tsx:16 — Chart.Chart has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 17 (18 pts), if/else 12 (17 pts), boolean chains 16, loops 4 (5 pts) (nesting depth added 7). Of this number, 24 points are the body's own statements and 32 belong to 13 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 · _EnvelopeTracker.process (cognitive 55) · ×1
  • _EnvelopeTracker.process (cognitive 55) src/qwenpaw/agents/acp/server.py:261 — _EnvelopeTracker.process has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 10, loops 2 (7 pts) (nesting depth added 28). 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 · cdp_tree._text_by_backend (cognitive 55) · ×1
  • cdp_tree._text_by_backend (cognitive 55) src/qwenpaw/browser/control_link/cdp_tree.py:37 — cdp_tree._text_by_backend has cognitive complexity 55 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 16, ternaries 4 (13 pts), loops 3 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor_connectivity.collect_deep_channel_connectivity_notes (cognitive 55) · ×1
  • doctor_connectivity.collect_deep_channel_connectivity_notes (cognitive 55) src/qwenpaw/cli/doctor_connectivity.py:371 — doctor_connectivity.collect_deep_channel_connectivity_notes has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (37 pts), error handling 3 (10 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.AppCenterPage (cognitive 55) · ×1
  • index.AppCenterPage (cognitive 55) console/src/pages/AppCenter/index.tsx:77 — index.AppCenterPage has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 12 (22 pts), if/else 15 (17 pts), boolean chains 12, error handling 3, loops 1 (nesting depth added 12). Of this number, 23 points are the body's own statements and 32 belong to 15 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 · model_routes._probe_payload (cognitive 54) · ×1
  • model_routes._probe_payload (cognitive 54) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2647 — model_routes._probe_payload has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 9, ternaries 3 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vlm_model.chat_completion (cognitive 54) · ×1
  • vlm_model.chat_completion (cognitive 54) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:775 — vlm_model.chat_completion has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 22, error handling 3, ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolatedChannelProxy._buffer_response_text (cognitive 54) · ×1
  • IsolatedChannelProxy._buffer_response_text (cognitive 54) src/qwenpaw/app/channels/isolated_proxy.py:1403 — IsolatedChannelProxy._buffer_response_text has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (42 pts), ternaries 2 (9 pts), boolean chains 2, loops 1 (nesting depth added 33). 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 · RestoreBackupModal.RestoreBackupModal (cognitive 54) · ×1
  • RestoreBackupModal.RestoreBackupModal (cognitive 54) console/src/pages/Settings/Backups/restore/RestoreBackupModal.tsx:68 — RestoreBackupModal.RestoreBackupModal has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 18 (23 pts), boolean chains 18, if/else 10 (11 pts), error handling 2 (nesting depth added 6). Of this number, 23 points are the body's own statements and 31 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 · model_context.prepare_model_messages (cognitive 53) · ×1
  • model_context.prepare_model_messages (cognitive 53) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_context.py:253 — model_context.prepare_model_messages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 8 (14 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseChannel._stream_with_tracker (cognitive 53) · ×1
  • BaseChannel._stream_with_tracker (cognitive 53) src/qwenpaw/app/channels/base.py:888 — BaseChannel._stream_with_tracker has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 5 (10 pts), boolean chains 9, error handling 4 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_gate.evaluate_shared_dependencies (cognitive 53) · ×1
  • dependency_gate.evaluate_shared_dependencies (cognitive 53) src/qwenpaw/plugins/dependency_gate.py:562 — dependency_gate.evaluate_shared_dependencies has cognitive complexity 53 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 5 (13 pts), ternaries 7 (12 pts), boolean chains 7, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolCallControlPopover.OffloadBanner (cognitive 53) · ×1
  • ToolCallControlPopover.OffloadBanner (cognitive 53) console/src/components/Chat/ToolCards/shared/ToolCallControlPopover.tsx:79 — ToolCallControlPopover.OffloadBanner has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 18 (24 pts), if/else 10 (15 pts), boolean chains 13, error handling 1 (nesting depth added 11). Of this number, 30 points are the body's own statements and 23 belong to 7 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 · BrowserUseCard.formatBrowserResult (cognitive 53) · ×1
  • BrowserUseCard.formatBrowserResult (cognitive 53) console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:36 — BrowserUseCard.formatBrowserResult has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (35 pts), error handling 2 (9 pts), boolean chains 5, loops 1 (4 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ReMeLightMemoryCard.ReMeLightMemoryCard (cognitive 53) · ×1
  • ReMeLightMemoryCard.ReMeLightMemoryCard (cognitive 53) console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:27 — ReMeLightMemoryCard.ReMeLightMemoryCard has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 25 (30 pts), boolean chains 11, if/else 10 (11 pts), error handling 1 (nesting depth added 6). Of this number, 31 points are the body's own statements and 22 belong to 12 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 · index.CommunitySettings (cognitive 53) · ×1
  • index.CommunitySettings (cognitive 53) console/src/pages/Settings/Community/index.tsx:28 — index.CommunitySettings has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 32, if/else 13 (16 pts), error handling 5 (nesting depth added 3). Of this number, 26 points are the body's own statements and 27 belong to 11 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · dispatch._native_request (cognitive 52) · ×1
  • dispatch._native_request (cognitive 52) plugins/bundle/computer-use/computer_use/dispatch.py:424 — dispatch._native_request has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 10, ternaries 4 (8 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform._sync_loop (cognitive 52) · ×1
  • MatrixPlatform._sync_loop (cognitive 52) REDACTED:1557 — MatrixPlatform._sync_loop has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 4 (10 pts), error handling 4 (8 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._action_batch (cognitive 52) · ×1
  • browser_control._action_batch (cognitive 52) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4507 — browser_control._action_batch has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 25, if/else 11 (21 pts), error handling 2 (5 pts), loops 1 (nesting depth added 13). 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 · completed_text.project_completed_text (cognitive 52) · ×1
  • completed_text.project_completed_text (cognitive 52) src/qwenpaw/channel_protocol/completed_text.py:142 — completed_text.project_completed_text has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 4 (10 pts), boolean chains 7, ternaries 2 (6 pts), error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rule_guardian._extract_rm_targets (cognitive 52) · ×1
  • rule_guardian._extract_rm_targets (cognitive 52) src/qwenpaw/security/tool_guard/guardians/rule_guardian.py:209 — rule_guardian._extract_rm_targets has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 7 (13 pts), boolean chains 5, error handling 2 (4 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 · request.request (cognitive 52) · ×1
  • request.request (cognitive 52) console/src/api/request.ts:107 — request.request has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 7, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowFrame.WindowFrame (cognitive 52) · ×1
  • WindowFrame.WindowFrame (cognitive 52) console/src/os/WindowFrame.tsx:135 — WindowFrame.WindowFrame has cognitive complexity 52 (threshold 15). Drivers by points: if/else 32 (33 pts), boolean chains 11, ternaries 5 (6 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 12 of the 52 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 356, 312, 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 · useSkills.useSkills.importFromHub (cognitive 52) · ×1
  • useSkills.useSkills.importFromHub (cognitive 52) console/src/pages/Agent/Skills/useSkills.ts:360 — useSkills.useSkills.importFromHub has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 8, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSkillsPage.useSkillsPage.handleDownloadFromPool (cognitive 52) · ×1
  • useSkillsPage.useSkillsPage.handleDownloadFromPool (cognitive 52) console/src/pages/Agent/Skills/useSkillsPage.tsx:642 — useSkillsPage.useSkillsPage.handleDownloadFromPool has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 10 (25 pts), if/else 6 (13 pts), boolean chains 9, error handling 2 (3 pts), loops 2 (nesting depth added 23). Of this number, 27 points are the body's own statements and 25 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 · PostDetail.PostDetail (cognitive 52) · ×1
  • PostDetail.PostDetail (cognitive 52) console/src/pages/Market/Community/PostDetail.tsx:54 — PostDetail.PostDetail has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 28, if/else 15 (16 pts), ternaries 4, error handling 3, loops 1 (nesting depth added 1). Of this number, 21 points are the body's own statements and 31 belong to 15 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 · ProjectCommitRecoveryCoordinator._recover_entry (cognitive 51) · ×1
  • ProjectCommitRecoveryCoordinator._recover_entry (cognitive 51) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:286 — ProjectCommitRecoveryCoordinator._recover_entry has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 7, error handling 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_example_archive._materialize_remote_source_clips (cognitive 51) · ×1
  • build_example_archive._materialize_remote_source_clips (cognitive 51) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:223 — build_example_archive._materialize_remote_source_clips has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 9, loops 6 (9 pts), ternaries 2 (4 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 · browser_control._action_click (cognitive 51) · ×1
  • browser_control._action_click (cognitive 51) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2402 — browser_control._action_click has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 10, ternaries 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_schedules._normalise_task (cognitive 51) · ×1
  • codex_schedules._normalise_task (cognitive 51) src/qwenpaw/portability/providers/codex_schedules.py:339 — codex_schedules._normalise_task has cognitive complexity 51 (threshold 15). Drivers by points: if/else 29 (33 pts), boolean chains 13, ternaries 4, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · qoder_sessions.read_qoder_transcript (cognitive 51) · ×1
  • qoder_sessions.read_qoder_transcript (cognitive 51) src/qwenpaw/portability/providers/qoder_sessions.py:333 — qoder_sessions.read_qoder_transcript has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 13, ternaries 5, error handling 2 (3 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSettingsSearchTarget.useSettingsSearchTarget (cognitive 51) · ×1
  • useSettingsSearchTarget.useSettingsSearchTarget (cognitive 51) console/src/pages/SettingsCenter/useSettingsSearchTarget.ts:5 — useSettingsSearchTarget.useSettingsSearchTarget has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 24, if/else 13 (20 pts), ternaries 4 (5 pts), loops 2 (nesting depth added 8). None of this is in the body itself: all 51 points belong to 11 function literals inside it that branch (lines 44, 10, 90, …). 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 · BlueprintScriptPanel.BlueprintScriptPanel (cognitive 51) · ×1
  • BlueprintScriptPanel.BlueprintScriptPanel (cognitive 51) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintScriptPanel.tsx:252 — BlueprintScriptPanel.BlueprintScriptPanel has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 18 (28 pts), boolean chains 13, if/else 9, error handling 1 (nesting depth added 10). Of this number, 31 points are the body's own statements and 20 belong to 11 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 · native_content.native_content_blocks (cognitive 50) · ×1
  • native_content.native_content_blocks (cognitive 50) plugins/apps/qwenpaw-creator/backend/models/native_content.py:61 — native_content.native_content_blocks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (30 pts), ternaries 4 (10 pts), boolean chains 9, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · informal_launch_template.render_informal_launch_caption (cognitive 50) · ×1
  • informal_launch_template.render_informal_launch_caption (cognitive 50) plugins/apps/qwenpaw-creator/backend/services/media_files/informal_launch_template.py:361 — informal_launch_template.render_informal_launch_caption has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 18 (33 pts), if/else 7 (10 pts), boolean chains 7 (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 · a2a_call._build_result (cognitive 50) · ×1
  • a2a_call._build_result (cognitive 50) plugins/bundle/cloudpaw/tools/a2a_call.py:353 — a2a_call._build_result has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (44 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolResultPruningMiddleware._prune_tool_results (cognitive 50) · ×1
  • ToolResultPruningMiddleware._prune_tool_results (cognitive 50) src/qwenpaw/agents/middlewares.py:846 — ToolResultPruningMiddleware._prune_tool_results has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 6 (18 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · channel_env.read_channel_env (cognitive 50) · ×1
  • channel_env.read_channel_env (cognitive 50) src/qwenpaw/config/channel_env.py:7 — channel_env.read_channel_env has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (30 pts), ternaries 5 (10 pts), loops 2 (6 pts), boolean chains 4 (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 · dependency_maintenance.live_readers (cognitive 50) · ×1
  • dependency_maintenance.live_readers (cognitive 50) src/qwenpaw/plugins/dependency_maintenance.py:587 — dependency_maintenance.live_readers has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (29 pts), error handling 3 (11 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent 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 · AppBrand.AppBrand (cognitive 50) · ×1
  • AppBrand.AppBrand (cognitive 50) console/src/layouts/AppBrand.tsx:68 — AppBrand.AppBrand has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 24, ternaries 19 (21 pts), if/else 5 (nesting depth added 2). Of this number, 31 points are the body's own statements and 19 belong to 10 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 · task.createPawTaskWithScope (cognitive 50) · ×1
  • task.createPawTaskWithScope (cognitive 50) console/src/plugins/pawapp-sdk/task.ts:18 — task.createPawTaskWithScope has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (30 pts), error handling 3 (8 pts), loops 3 (5 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 17). Most of this is not in the body itself: 2 of the 50 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 87, emit, finalize, …). 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 · ToolCardShell.ToolCardShell (cognitive 50) · ×1
  • ToolCardShell.ToolCardShell (cognitive 50) console/src/components/Chat/ToolCards/shared/ToolCardShell.tsx:61 — ToolCardShell.ToolCardShell has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 24, ternaries 12 (15 pts), if/else 9 (10 pts), loops 1 (nesting depth added 4). Of this number, 31 points are the body's own statements and 19 belong to 7 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 · TerminalDock.Dock (cognitive 50) · ×1
  • TerminalDock.Dock (cognitive 50) console/src/features/terminal/TerminalDock.tsx:112 — TerminalDock.Dock has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 9, ternaries 4 (5 pts), error handling 3 (4 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 5 of the 50 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 192, run, a function literal at line 255, …). 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 · creatorMessagePresentation.actionEnvelopeFromText (cognitive 50) · ×1
  • creatorMessagePresentation.actionEnvelopeFromText (cognitive 50) REDACTED:307 — creatorMessagePresentation.actionEnvelopeFromText has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 7 (14 pts), boolean chains 12, error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_routes.test_model_connection (cognitive 49) · ×1
  • model_routes.test_model_connection (cognitive 49) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2830 — model_routes.test_model_connection has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 19, error handling 4, ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._reconcile_project (cognitive 49) · ×1
  • FileCreatorAgentRuntime._reconcile_project (cognitive 49) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:2463 — FileCreatorAgentRuntime._reconcile_project has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 9, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileLocalMediaExecutionService._prepare_spec (cognitive 49) · ×1
  • FileLocalMediaExecutionService._prepare_spec (cognitive 49) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4184 — FileLocalMediaExecutionService._prepare_spec has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 5 (11 pts), boolean chains 6, loops 2 (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 · motion_design.design_motion_overlays (cognitive 49) · ×1
  • motion_design.design_motion_overlays (cognitive 49) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1636 — motion_design.design_motion_overlays has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 17, ternaries 6 (8 pts), error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · source_intelligence.validated_source_analysis_versions (cognitive 49) · ×1
  • source_intelligence.validated_source_analysis_versions (cognitive 49) plugins/apps/qwenpaw-creator/backend/services/validators/source_intelligence.py:18 — source_intelligence.validated_source_analysis_versions has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 19, loops 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · model_factory._promote_tool_result_videos (cognitive 49) · ×1
  • model_factory._promote_tool_result_videos (cognitive 49) src/qwenpaw/agents/model_factory.py:1175 — model_factory._promote_tool_result_videos has cognitive complexity 49 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 6 (17 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · delegate_external_agent._stream_action_responses (cognitive 49) · ×1
  • delegate_external_agent._stream_action_responses (cognitive 49) src/qwenpaw/agents/tools/delegate_external_agent.py:521 — delegate_external_agent._stream_action_responses has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 6 (17 pts), boolean chains 6, loops 3 (6 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._action_type (cognitive 49) · ×1
  • browser_control._action_type (cognitive 49) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2590 — browser_control._action_type has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 8, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monitor.build_wake_trace (cognitive 49) · ×1
  • monitor.build_wake_trace (cognitive 49) REDACTED:801 — monitor.build_wake_trace has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wheel_additions._install_data (cognitive 49) · ×1
  • wheel_additions._install_data (cognitive 49) src/qwenpaw/plugins/wheel_additions.py:222 — wheel_additions._install_data has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.EnvironmentsPage (cognitive 49) · ×1
  • index.EnvironmentsPage (cognitive 49) console/src/pages/Settings/Environments/index.tsx:75 — index.EnvironmentsPage has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 16 (27 pts), boolean chains 12, if/else 8, error handling 2 (nesting depth added 11). Of this number, 23 points are the body's own statements and 26 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 · ProjectCommitRecoveryCoordinator._load_inputs (cognitive 48) · ×1
  • ProjectCommitRecoveryCoordinator._load_inputs (cognitive 48) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:530 — ProjectCommitRecoveryCoordinator._load_inputs has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (35 pts), boolean chains 10, ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triage._normalize_entities (cognitive 48) · ×1
  • triage._normalize_entities (cognitive 48) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:222 — triage._normalize_entities has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (34 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DingTalkChannelHandler.process (cognitive 48) · ×1
  • DingTalkChannelHandler.process (cognitive 48) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:390 — DingTalkChannelHandler.process has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 20, if/else 19 (20 pts), ternaries 4 (5 pts), loops 1 (2 pts), error handling 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, 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 · browser_control._action_fill_form (cognitive 48) · ×1
  • browser_control._action_fill_form (cognitive 48) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3636 — browser_control._action_fill_form has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 4 (14 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell.execute_shell_command (cognitive 48) · ×1
  • shell.execute_shell_command (cognitive 48) src/qwenpaw/agents/tools/shell.py:1425 — shell.execute_shell_command has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 5, error handling 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_adapter._ask_user_approval (cognitive 48) · ×1
  • tool_adapter._ask_user_approval (cognitive 48) src/qwenpaw/governance/tool_adapter.py:671 — tool_adapter._ask_user_approval has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 14, if/else 6 (7 pts), loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageQueuePanel.MessageQueuePanel (cognitive 48) · ×1
  • MessageQueuePanel.MessageQueuePanel (cognitive 48) console/src/pages/Chat/components/MessageQueuePanel.tsx:40 — MessageQueuePanel.MessageQueuePanel has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 16 (24 pts), boolean chains 17, if/else 6 (7 pts) (nesting depth added 9). Most of this is not in the body itself: 10 of the 48 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 256, 96, 65, …). 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 · AgentDock.AgentDock (cognitive 48) · ×1
  • AgentDock.AgentDock (cognitive 48) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136 — AgentDock.AgentDock has cognitive complexity 48 (threshold 15). Drivers by points: if/else 59 (79 pts), boolean chains 70, ternaries 15 (21 pts), error handling 4 (5 pts), loops 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AgentDock.AgentDock::submit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · visual_jobs._expand_visual_query_jobs (cognitive 47) · ×1
  • visual_jobs._expand_visual_query_jobs (cognitive 47) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:448 — visual_jobs._expand_visual_query_jobs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 11, loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelegramPlatform.update_stream (cognitive 47) · ×1
  • TelegramPlatform.update_stream (cognitive 47) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:1179 — TelegramPlatform.update_stream has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 7 (17 pts), boolean chains 5, ternaries 3 (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 · create_helpers.add_agent_workspaces (cognitive 47) · ×1
  • create_helpers.add_agent_workspaces (cognitive 47) src/qwenpaw/backup/_ops/create_helpers.py:37 — create_helpers.add_agent_workspaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackendExecution._produce (cognitive 47) · ×1
  • BackendExecution._produce (cognitive 47) src/qwenpaw/runtime/backends/execution.py:467 — BackendExecution._produce has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 5 (8 pts), boolean chains 6, error handling 4 (6 pts), loops 3 (4 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 · PendingApprovalsDrawer.PendingApprovalsDrawer (cognitive 47) · ×1
  • PendingApprovalsDrawer.PendingApprovalsDrawer (cognitive 47) console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:60 — PendingApprovalsDrawer.PendingApprovalsDrawer has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 13, error handling 5, ternaries 3 (nesting depth added 4). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 17 function items inside it that branch (a function literal at line 125, handleAction, handleBatchAction, …). 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 · SelectionToolbar.SelectionToolbar (cognitive 47) · ×1
  • SelectionToolbar.SelectionToolbar (cognitive 47) plugins/apps/qwenpaw-creator/ui/src/components/agent/SelectionToolbar.tsx:78 — SelectionToolbar.SelectionToolbar has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 14). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 87, 174, 222, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · model_routes._validate_section_connectivity (cognitive 46) · ×1
  • model_routes._validate_section_connectivity (cognitive 46) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:938 — model_routes._validate_section_connectivity has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 13, error handling 6 (8 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit_impact._apply_element_path (cognitive 46) · ×1
  • edit_impact._apply_element_path (cognitive 46) plugins/apps/qwenpaw-creator/backend/services/project_files/edit_impact.py:357 — edit_impact._apply_element_path has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 15, error handling 1 (3 pts), loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Project._coerce_edit_duration (cognitive 46) · ×1
  • Project._coerce_edit_duration (cognitive 46) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:1397 — Project._coerce_edit_duration has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · catalog.config_fields (cognitive 46) · ×1
  • catalog.config_fields (cognitive 46) src/qwenpaw/app/channels/catalog.py:39 — catalog.config_fields has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 5 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils._build_media_message_from_block (cognitive 46) · ×1
  • utils._build_media_message_from_block (cognitive 46) src/qwenpaw/app/chats/utils.py:397 — utils._build_media_message_from_block has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (29 pts), boolean chains 8, error handling 1 (6 pts), loops 1 (3 pts) (nesting depth added 28). 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 · dependency_transaction._owned (cognitive 46) · ×1
  • dependency_transaction._owned (cognitive 46) src/qwenpaw/plugins/dependency_transaction.py:162 — dependency_transaction._owned has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 6, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLifecycle._update_config_transaction (cognitive 46) · ×1
  • PluginLifecycle._update_config_transaction (cognitive 46) src/qwenpaw/plugins/lifecycle.py:759 — PluginLifecycle._update_config_transaction has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 9, error handling 5 (7 pts), ternaries 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api.eventsForApp (cognitive 46) · ×1
  • api.eventsForApp (cognitive 46) console/src/plugins/pawapp-sdk/api.ts:228 — api.eventsForApp has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (26 pts), ternaries 8 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSkillPool.useSkillPool.handleSavePoolSkill (cognitive 46) · ×1
  • useSkillPool.useSkillPool.handleSavePoolSkill (cognitive 46) console/src/pages/Settings/SkillPool/useSkillPool.tsx:923 — useSkillPool.useSkillPool.handleSavePoolSkill has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 18, ternaries 7 (15 pts), error handling 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill) 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.TokenUsagePage (cognitive 46) · ×1
  • index.TokenUsagePage (cognitive 46) console/src/pages/Settings/TokenUsage/index.tsx:33 — index.TokenUsagePage has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 9 (15 pts), boolean chains 8, error handling 2 (nesting depth added 12). Most of this is not in the body itself: 15 of the 46 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 76, a function literal at line 105, a function literal at line 60, …). 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 · AgentEventFeed.EventCard (cognitive 46) · ×1
  • AgentEventFeed.EventCard (cognitive 46) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:167 — AgentEventFeed.EventCard has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 13 (31 pts), boolean chains 11, if/else 4 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HomePage.HomePage (cognitive 46) · ×1
  • HomePage.HomePage (cognitive 46) plugins/apps/qwenpaw-creator/ui/src/pages/HomePage.tsx:234 — HomePage.HomePage has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 14, if/else 5 (8 pts), error handling 6 (nesting depth added 8). Of this number, 20 points are the body's own statements and 26 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · r2v_execution._resolve_request (cognitive 45) · ×1
  • r2v_execution._resolve_request (cognitive 45) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:1271 — r2v_execution._resolve_request has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 16, ternaries 3 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · fork_project.forks_merged_into_head (cognitive 45) · ×1
  • fork_project.forks_merged_into_head (cognitive 45) src/qwenpaw/agents/fork_project.py:1564 — fork_project.forks_merged_into_head has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 9, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor_checks.check_enabled_agents_model_connections (cognitive 45) · ×1
  • doctor_checks.check_enabled_agents_model_connections (cognitive 45) src/qwenpaw/cli/doctor_checks.py:1132 — doctor_checks.check_enabled_agents_model_connections has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 8, error handling 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader._acquire_dependency_wheels (cognitive 45) · ×1
  • PluginLoader._acquire_dependency_wheels (cognitive 45) src/qwenpaw/plugins/loader.py:1326 — PluginLoader._acquire_dependency_wheels has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 12, loops 3 (6 pts), ternaries 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionActions.SessionActions (cognitive 45) · ×1
  • SessionActions.SessionActions (cognitive 45) console/src/components/SessionItem/SessionActions.tsx:31 — SessionActions.SessionActions has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 24 (30 pts), boolean chains 8, if/else 7 (nesting depth added 6). Of this number, 19 points are the body's own statements and 26 belong to 7 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.ConsolePollService (cognitive 45) · ×1
  • index.ConsolePollService (cognitive 45) console/src/components/ConsolePollService/index.tsx:30 — index.ConsolePollService has cognitive complexity 45 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 3, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 10). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 73, 118, 146, …). 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.CheckpointsPage (cognitive 45) · ×1
  • index.CheckpointsPage (cognitive 45) console/src/pages/Agent/Checkpoints/index.tsx:51 — index.CheckpointsPage has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 12, if/else 10 (11 pts), error handling 7 (nesting depth added 4). Most of this is not in the body itself: 13 of the 45 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 82, runGc, a function literal at line 143, …). 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 · useSkillsPage.useSkillsPage.handleSubmit (cognitive 45) · ×1
  • useSkillsPage.useSkillsPage.handleSubmit (cognitive 45) console/src/pages/Agent/Skills/useSkillsPage.tsx:487 — useSkillsPage.useSkillsPage.handleSubmit has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 8, ternaries 3 (8 pts), error handling 1 (2 pts) (nesting depth added 21). Of this number, 30 points are the body's own statements and 15 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarketPluginList.MarketPluginList (cognitive 45) · ×1
  • MarketPluginList.MarketPluginList (cognitive 45) console/src/pages/Settings/PluginManager/components/MarketPluginList.tsx:108 — MarketPluginList.MarketPluginList has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 23, ternaries 15 (20 pts), if/else 2 (nesting depth added 5). Most of this is not in the body itself: 12 of the 45 points are its own statements and the rest belongs to 10 function items inside it that branch (renderInstallButton, a function literal at line 344, a function literal at line 405, …). 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 · WorkspaceEmptyState.WorkspaceEmptyState (cognitive 45) · ×1
  • WorkspaceEmptyState.WorkspaceEmptyState (cognitive 45) plugins/apps/qwenpaw-creator/ui/src/components/WorkspaceEmptyState.tsx:24 — WorkspaceEmptyState.WorkspaceEmptyState has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 11 (40 pts), boolean chains 4, if/else 1 (nesting depth added 29). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · source_intelligence.parse_source_intelligence_files (cognitive 44) · ×1
  • source_intelligence.parse_source_intelligence_files (cognitive 44) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:475 — source_intelligence.parse_source_intelligence_files has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 3 (9 pts), boolean chains 7, error handling 1, 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 · FileR2VExecutionService._drive_until_idle (cognitive 44) · ×1
  • FileR2VExecutionService._drive_until_idle (cognitive 44) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3029 — FileR2VExecutionService._drive_until_idle has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), error handling 7 (10 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileR2VExecutionService.recover_all (cognitive 44) · ×1
  • FileR2VExecutionService.recover_all (cognitive 44) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5239 — FileR2VExecutionService.recover_all has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (24 pts), error handling 4 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · DataBridgeMiddleware.on_reply (cognitive 44) · ×1
  • DataBridgeMiddleware.on_reply (cognitive 44) plugins/apps/qwenpaw-data/backend/bridge/middleware.py:123 — DataBridgeMiddleware.on_reply has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 8 (15 pts), boolean chains 9, error handling 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscordPlatform._on_message (cognitive 44) · ×1
  • DiscordPlatform._on_message (cognitive 44) plugins/channel/discord/qwenpaw_channel_discord/platform.py:158 — DiscordPlatform._on_message has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 9 (12 pts), boolean chains 9, loops 3 (7 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 · OneBotPlatform._stop_ws_server (cognitive 44) · ×1
  • OneBotPlatform._stop_ws_server (cognitive 44) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:506 — OneBotPlatform._stop_ws_server has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (25 pts), error handling 4 (7 pts), boolean chains 6, loops 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 · ScrollContextManager._persist_new (cognitive 44) · ×1
  • ScrollContextManager._persist_new (cognitive 44) src/qwenpaw/agents/context/scroll/manager.py:1886 — ScrollContextManager._persist_new has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (35 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwenPawAgent._strip_media_blocks_from_memory (cognitive 44) · ×1
  • QwenPawAgent._strip_media_blocks_from_memory (cognitive 44) src/qwenpaw/agents/react_agent.py:1772 — QwenPawAgent._strip_media_blocks_from_memory has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (31 pts), ternaries 2 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 28). 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 · tool_message_utils._repair_empty_tool_inputs (cognitive 44) · ×1
  • tool_message_utils._repair_empty_tool_inputs (cognitive 44) src/qwenpaw/agents/utils/tool_message_utils.py:347 — tool_message_utils._repair_empty_tool_inputs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (23 pts), error handling 2 (10 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 29). 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 · dependency_gate._host_observation_roots (cognitive 44) · ×1
  • dependency_gate._host_observation_roots (cognitive 44) src/qwenpaw/plugins/dependency_gate.py:368 — dependency_gate._host_observation_roots has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 4 (8 pts), boolean chains 7, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyUpgradeManager.stage (cognitive 44) · ×1
  • DependencyUpgradeManager.stage (cognitive 44) src/qwenpaw/plugins/dependency_upgrade.py:1642 — DependencyUpgradeManager.stage has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 10, loops 2 (3 pts), ternaries 3, error handling 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 · skill_transfer.read_bounded_tree (cognitive 44) · ×1
  • skill_transfer.read_bounded_tree (cognitive 44) src/qwenpaw/portability/skill_transfer.py:83 — skill_transfer.read_bounded_tree has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsSearch.settingsSearchTarget (cognitive 44) · ×1
  • settingsSearch.settingsSearchTarget (cognitive 44) console/src/pages/SettingsCenter/settingsSearch.ts:386 — settingsSearch.settingsSearchTarget has cognitive complexity 44 (threshold 15). Drivers by points: if/else 31 (32 pts), boolean chains 7, ternaries 3 (5 pts) (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 · timelines.duplicateTimelineOperations (cognitive 44) · ×1
  • timelines.duplicateTimelineOperations (cognitive 44) plugins/apps/qwenpaw-creator/ui/src/api/creator/timelines.ts:98 — timelines.duplicateTimelineOperations has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 9 (18 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 17). Of this number, 30 points are the body's own statements and 14 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 · AgentDock.AgentDock · ×1
  • AgentDock.AgentDock::submit (cognitive 44) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1852 — AgentDock.AgentDock::submit has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 4 (7 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (2 pts) (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. This shape REPEATS in the file: one other method here (AgentDock.AgentDock) 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 · FileCreatorAgentRuntime._invoke_specialist_tool (cognitive 43) · ×1
  • FileCreatorAgentRuntime._invoke_specialist_tool (cognitive 43) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6861 — FileCreatorAgentRuntime._invoke_specialist_tool has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 6 (11 pts), boolean chains 10 (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 · motion_overlay.prepare_motion_layer (cognitive 43) · ×1
  • motion_overlay.prepare_motion_layer (cognitive 43) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1708 — motion_overlay.prepare_motion_layer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 9 (12 pts), error handling 3 (7 pts), boolean chains 5 (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 · json_pointer.apply_changes (cognitive 43) · ×1
  • json_pointer.apply_changes (cognitive 43) plugins/apps/qwenpaw-creator/backend/services/project_files/json_pointer.py:217 — json_pointer.apply_changes has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (36 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verification.verify_visual_grounding_with_vlm (cognitive 43) · ×1
  • verification.verify_visual_grounding_with_vlm (cognitive 43) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:182 — verification.verify_visual_grounding_with_vlm has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 15, error handling 2 (4 pts), loops 3, ternaries 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 · WeComPlatform.send_parts (cognitive 43) · ×1
  • WeComPlatform.send_parts (cognitive 43) REDACTED:900 — WeComPlatform.send_parts has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 6 (11 pts), boolean chains 8, loops 2, error handling 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 · tools._build_tool_info (cognitive 43) · ×1
  • tools._build_tool_info (cognitive 43) src/qwenpaw/app/routers/tools.py:145 — tools._build_tool_info has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 5, loops 2 (5 pts), ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 21). 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 · SharedResponseDriver._admit_event (cognitive 43) · ×1
  • SharedResponseDriver._admit_event (cognitive 43) src/qwenpaw/channel_protocol/shared_response_driver.py:613 — SharedResponseDriver._admit_event has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 6, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_gate.prepare_shared_dependencies (cognitive 43) · ×1
  • dependency_gate.prepare_shared_dependencies (cognitive 43) src/qwenpaw/plugins/dependency_gate.py:704 — dependency_gate.prepare_shared_dependencies has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, ternaries 4 (8 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · messageQueueStore.useMessageQueueStore (cognitive 43) · ×1
  • messageQueueStore.useMessageQueueStore (cognitive 43) console/src/stores/messageQueueStore.ts:486 — messageQueueStore.useMessageQueueStore has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 9 (12 pts), boolean chains 11, error handling 1 (nesting depth added 5). None of this is in the body itself: all 43 points belong to 14 function literals inside it that branch (lines 492, 613, 722, …). 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 · useToolCallControl.useToolCallControl (cognitive 43) · ×1
  • useToolCallControl.useToolCallControl (cognitive 43) console/src/hooks/useToolCallControl.ts:41 — useToolCallControl.useToolCallControl has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 10, ternaries 4 (6 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 234, 311, 379, …). 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 · useWorkspaceWatch._runLoop (cognitive 43) · ×1
  • useWorkspaceWatch._runLoop (cognitive 43) console/src/hooks/useWorkspaceWatch.ts:43 — useWorkspaceWatch._runLoop has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (23 pts), error handling 2 (6 pts), loops 3 (6 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.ChatHeaderTitle (cognitive 43) · ×1
  • index.ChatHeaderTitle (cognitive 43) console/src/pages/Chat/components/ChatHeaderTitle/index.tsx:17 — index.ChatHeaderTitle has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 17, if/else 10 (13 pts), ternaries 10 (12 pts), error handling 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 26 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ProjectLayout.ProjectLayout (cognitive 43) · ×1
  • ProjectLayout.ProjectLayout (cognitive 43) plugins/apps/qwenpaw-creator/ui/src/components/layout/ProjectLayout.tsx:142 — ProjectLayout.ProjectLayout has cognitive complexity 43 (threshold 15). Drivers by points: if/else 26, boolean chains 14, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 218, 326, 386, …). 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 · R2VWorkbenchPage.WorkbenchSurface · ×1
  • R2VWorkbenchPage.WorkbenchSurface::regenerateNode (cognitive 43) plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:764 — R2VWorkbenchPage.WorkbenchSurface::regenerateNode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (R2VWorkbenchPage.WorkbenchSurface) 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 · document_reader._read_document_sync (cognitive 42) · ×1
  • document_reader._read_document_sync (cognitive 42) plugins/apps/qwenpaw-creator/backend/services/document_reader.py:123 — document_reader._read_document_sync has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 11, ternaries 2, error handling 1, 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 · challenge.parse_challenge_verdicts (cognitive 42) · ×1
  • challenge.parse_challenge_verdicts (cognitive 42) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:225 — challenge.parse_challenge_verdicts has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 10, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · providers_cmd.list_cmd (cognitive 42) · ×1
  • providers_cmd.list_cmd (cognitive 42) src/qwenpaw/cli/providers_cmd.py:528 — providers_cmd.list_cmd has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 5 (15 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalize.normalize_update (cognitive 42) · ×1
  • normalize.normalize_update (cognitive 42) src/qwenpaw/cli/tui/normalize.py:217 — normalize.normalize_update has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 17, if/else 12 (16 pts), ternaries 4 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_adapter._policy_tool_check_permissions (cognitive 42) · ×1
  • tool_adapter._policy_tool_check_permissions (cognitive 42) src/qwenpaw/governance/tool_adapter.py:282 — tool_adapter._policy_tool_check_permissions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 18, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CodexRolloutReader._index (cognitive 42) · ×1
  • CodexRolloutReader._index (cognitive 42) src/qwenpaw/portability/providers/codex_rollout_reader.py:277 — CodexRolloutReader._index has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 7, loops 3 (7 pts), ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetsPage.assetItems (cognitive 42) · ×1
  • AssetsPage.assetItems (cognitive 42) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:303 — AssetsPage.assetItems has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 22 (24 pts), boolean chains 14, if/else 3, loops 1 (nesting depth added 2). None of this is in the body itself: all 42 points belong to 12 function literals inside it that branch (lines 466, 413, 532, …). 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 · vidu.build_submit_request (cognitive 41) · ×1
  • vidu.build_submit_request (cognitive 41) plugins/apps/qwenpaw-creator/backend/models/video_backends/vidu.py:88 — vidu.build_submit_request has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 17, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · local_execution._timeline_execution (cognitive 41) · ×1
  • local_execution._timeline_execution (cognitive 41) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3082 — local_execution._timeline_execution has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 16 (27 pts), if/else 7 (9 pts), boolean chains 3, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkTransport.send_parts (cognitive 41) · ×1
  • DingTalkTransport.send_parts (cognitive 41) REDACTED:1831 — DingTalkTransport.send_parts has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 6 (12 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemorySpace._search_saved_tool_files (cognitive 41) · ×1
  • MemorySpace._search_saved_tool_files (cognitive 41) src/qwenpaw/agents/context/scroll/memoryspace.py:1577 — MemorySpace._search_saved_tool_files has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config._migrate_access_control_fields (cognitive 41) · ×1
  • config._migrate_access_control_fields (cognitive 41) src/qwenpaw/config/config.py:3586 — config._migrate_access_control_fields has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (28 pts), error handling 2 (8 pts), boolean chains 4, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_schedules._rrule_to_cron (cognitive 41) · ×1
  • codex_schedules._rrule_to_cron (cognitive 41) src/qwenpaw/portability/providers/codex_schedules.py:134 — codex_schedules._rrule_to_cron has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 3, loops 1 (3 pts), error handling 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 · OpenRouterProvider._normalize_models_payload (cognitive 41) · ×1
  • OpenRouterProvider._normalize_models_payload (cognitive 41) src/qwenpaw/providers/openrouter_provider.py:141 — OpenRouterProvider._normalize_models_payload has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 11, loops 2 (5 pts), error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApprovalCard.ApprovalCard (cognitive 41) · ×1
  • ApprovalCard.ApprovalCard (cognitive 41) console/src/components/ApprovalCard/ApprovalCard.tsx:39 — ApprovalCard.ApprovalCard has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 17, ternaries 10 (16 pts), if/else 6, error handling 2 (nesting depth added 6). Of this number, 28 points are the body's own statements and 13 belong to 7 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 · useCronJobs.useCronJobs.getDisplayErrorMessage (cognitive 41) · ×1
  • useCronJobs.useCronJobs.getDisplayErrorMessage (cognitive 41) console/src/pages/Control/CronJobs/useCronJobs.ts:73 — useCronJobs.useCronJobs.getDisplayErrorMessage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 33 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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.HeartbeatPage (cognitive 41) · ×1
  • index.HeartbeatPage (cognitive 41) console/src/pages/Control/Heartbeat/index.tsx:69 — index.HeartbeatPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 13, ternaries 8 (12 pts), error handling 2 (nesting depth added 7). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 150, a function literal at line 85, onFinish, …). 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 · InlineReviewDiff.matchReviewOperations (cognitive 41) · ×1
  • InlineReviewDiff.matchReviewOperations (cognitive 41) plugins/apps/qwenpaw-creator/ui/src/components/agent/InlineReviewDiff.tsx:80 — InlineReviewDiff.matchReviewOperations has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (29 pts), ternaries 2 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · projectSnapshotStore.useProjectSnapshotStore.pollOnce (cognitive 41) · ×1
  • projectSnapshotStore.useProjectSnapshotStore.pollOnce (cognitive 41) plugins/apps/qwenpaw-creator/ui/src/store/projectSnapshotStore.ts:173 — projectSnapshotStore.useProjectSnapshotStore.pollOnce has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 9 (13 pts), boolean chains 10, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 194, 191, 297, …). 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 · YuanbaoPlatform._parse_msg_body (cognitive 40) · ×1
  • YuanbaoPlatform._parse_msg_body (cognitive 40) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:484 — YuanbaoPlatform._parse_msg_body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolResultPruningMiddleware._detect_exempt_tool_ids (cognitive 40) · ×1
  • ToolResultPruningMiddleware._detect_exempt_tool_ids (cognitive 40) src/qwenpaw/agents/middlewares.py:929 — ToolResultPruningMiddleware._detect_exempt_tool_ids has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (22 pts), ternaries 3 (9 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._normalize_bundle (cognitive 40) · ×1
  • hub._normalize_bundle (cognitive 40) src/qwenpaw/agents/skill_system/hub.py:818 — hub._normalize_bundle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (28 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityConnectionService.sync_once (cognitive 40) · ×1
  • CommunityConnectionService.sync_once (cognitive 40) src/qwenpaw/app/community_connection.py:1228 — CommunityConnectionService.sync_once has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 10, ternaries 3 (9 pts), loops 2 (3 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteControlLink.handle_frame (cognitive 40) · ×1
  • RemoteControlLink.handle_frame (cognitive 40) REDACTED:203 — RemoteControlLink.handle_frame has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 6, error handling 1 (4 pts), ternaries 1 (4 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PawApp._dispatch (cognitive 40) · ×1
  • PawApp._dispatch (cognitive 40) src/qwenpaw/cli/tui/app.py:931 — PawApp._dispatch has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencySnapshot.from_mapping (cognitive 40) · ×1
  • DependencySnapshot.from_mapping (cognitive 40) src/qwenpaw/plugins/execution/dependencies.py:95 — DependencySnapshot.from_mapping has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 12, loops 4 (5 pts), ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader.activate_plugin_unlocked (cognitive 40) · ×1
  • PluginLoader.activate_plugin_unlocked (cognitive 40) src/qwenpaw/plugins/loader.py:5300 — PluginLoader.activate_plugin_unlocked has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 2 (8 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (4 pts) (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 · Dock.Dock (cognitive 40) · ×1
  • Dock.Dock (cognitive 40) console/src/os/Dock.tsx:26 — Dock.Dock has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 10, ternaries 10, error handling 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 40 points are its own statements and the rest belongs to 8 function items inside it that branch (handlePointerEnd, renderApp, handlePointerMove, …). 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 · DurationWheel.DurationColumn (cognitive 40) · ×1
  • DurationWheel.DurationColumn (cognitive 40) console/src/components/interaction/DurationWheel.tsx:9 — DurationWheel.DurationColumn has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 11, ternaries 7 (10 pts) (nesting depth added 5). None of this is in the body itself: all 40 points belong to 8 function items inside it that branch (finishDrag, a function literal at line 177, a function literal at line 36, …). 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 · MailAccessControlDrawer.MailAccessControlDrawer (cognitive 40) · ×1
  • MailAccessControlDrawer.MailAccessControlDrawer (cognitive 40) console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:85 — MailAccessControlDrawer.MailAccessControlDrawer has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 13, ternaries 10 (11 pts), error handling 9, if/else 7 (nesting depth added 1). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 21 function items inside it that branch (handleAddToList, a function literal at line 241, handleBatchRemove, …). 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 · DecisionTray.DecisionTray (cognitive 40) · ×1
  • DecisionTray.DecisionTray (cognitive 40) plugins/apps/qwenpaw-creator/ui/src/components/agent/DecisionTray.tsx:77 — DecisionTray.DecisionTray has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 17 (19 pts), boolean chains 13, if/else 5 (6 pts), error handling 1, loops 1 (nesting depth added 3). Of this number, 25 points are the body's own statements and 15 belong to 13 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 · useProjectLaunch.continueLaunchInBackground (cognitive 40) · ×1
  • useProjectLaunch.continueLaunchInBackground (cognitive 40) plugins/apps/qwenpaw-creator/ui/src/components/creator/useProjectLaunch.tsx:163 — useProjectLaunch.continueLaunchInBackground has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 6 (11 pts), loops 4 (8 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 20). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.Downloads (cognitive 40) · ×1
  • index.Downloads (cognitive 40) website/src/pages/Downloads/index.tsx:67 — index.Downloads has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (15 pts), ternaries 4 (6 pts), error handling 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 24 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · project_file_routes.decide_project_review (cognitive 39) · ×1
  • project_file_routes.decide_project_review (cognitive 39) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1084 — project_file_routes.decide_project_review has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (22 pts), error handling 8 (15 pts), boolean chains 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkGraphScheduler.tick (cognitive 39) · ×1
  • WorkGraphScheduler.tick (cognitive 39) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:597 — WorkGraphScheduler.tick has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 4, ternaries 1 (4 pts), error handling 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · motion_design._design_document (cognitive 39) · ×1
  • motion_design._design_document (cognitive 39) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:1076 — motion_design._design_document has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 5 (13 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QQPlatform._handle_ws_payload (cognitive 39) · ×1
  • QQPlatform._handle_ws_payload (cognitive 39) plugins/channel/qq/qwenpaw_channel_qq/platform.py:950 — QQPlatform._handle_ws_payload has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · format.chunk_slack_text (cognitive 39) · ×1
  • format.chunk_slack_text (cognitive 39) plugins/channel/slack/qwenpaw_channel_slack/format.py:147 — format.chunk_slack_text has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (8 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · platform._build_content_parts_from_message (cognitive 39) · ×1
  • platform._build_content_parts_from_message (cognitive 39) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:202 — platform._build_content_parts_from_message has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexBackend._convert_notification (cognitive 39) · ×1
  • CodexBackend._convert_notification (cognitive 39) plugins/harness/codex/adapter.py:977 — CodexBackend._convert_notification has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 22, if/else 13 (17 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · service._process_session_file (cognitive 39) · ×1
  • service._process_session_file (cognitive 39) src/qwenpaw/agent_stats/service.py:159 — service._process_session_file has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (4 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync._sync_file (cognitive 39) · ×1
  • sync._sync_file (cognitive 39) src/qwenpaw/agents/context/scroll/sync.py:290 — sync._sync_file has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 8, loops 3 (5 pts), error handling 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PayloadStore._cleanup_files (cognitive 39) · ×1
  • PayloadStore._cleanup_files (cognitive 39) src/qwenpaw/plugins/execution/payloads.py:582 — PayloadStore._cleanup_files has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 4 (11 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external_state.discover_codex_plugins (cognitive 39) · ×1
  • external_state.discover_codex_plugins (cognitive 39) src/qwenpaw/portability/providers/external_state.py:776 — external_state.discover_codex_plugins has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 4 (9 pts), boolean chains 5, loops 4, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoopModeSelector.LoopModeSelector (cognitive 39) · ×1
  • LoopModeSelector.LoopModeSelector (cognitive 39) console/src/components/LoopInput/LoopModeSelector.tsx:60 — LoopModeSelector.LoopModeSelector has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (12 pts), ternaries 10 (11 pts), error handling 1 (2 pts) (nesting depth added 6). Of this number, 23 points are the body's own statements and 16 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.useMessageHistoryNavigation (cognitive 39) · ×1
  • index.useMessageHistoryNavigation (cognitive 39) console/src/pages/Chat/index.tsx:992 — index.useMessageHistoryNavigation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 7, loops 1 (nesting depth added 9). None of this is in the body itself: all 39 points belong to 4 function items inside it that branch (a function literal at line 1063, a function literal at line 1004, findMessageInDirection, …). 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 · PostAssistance.PostAssistance (cognitive 39) · ×1
  • PostAssistance.PostAssistance (cognitive 39) console/src/pages/CommunityFeedback/PostAssistance.tsx:58 — PostAssistance.PostAssistance has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 52, if/else 26 (30 pts), ternaries 17 (22 pts), error handling 4 (nesting depth added 9). 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 (PostAssistance.PostAssistance::generate) 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 · HubModelIdentityFields.HubModelIdentityFields (cognitive 39) · ×1
  • HubModelIdentityFields.HubModelIdentityFields (cognitive 39) console/src/pages/Hub/governance/HubModelIdentityFields.tsx:20 — HubModelIdentityFields.HubModelIdentityFields has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (11 pts), ternaries 11, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 152, 75, 54, …). 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 · ArticleTocCard.ArticleToc (cognitive 39) · ×1
  • ArticleTocCard.ArticleToc (cognitive 39) console/src/pages/Market/Community/ArticleTocCard.tsx:21 — ArticleTocCard.ArticleToc has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (28 pts), ternaries 8, boolean chains 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 55, handleClick, revealActive, …). 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 · SecureR2VVideoMaterializer._stream_remote (cognitive 38) · ×1
  • SecureR2VVideoMaterializer._stream_remote (cognitive 38) plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py:827 — SecureR2VVideoMaterializer._stream_remote has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 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 · faithfulness.build_faithfulness_elements (cognitive 38) · ×1
  • faithfulness.build_faithfulness_elements (cognitive 38) plugins/apps/qwenpaw-creator/backend/services/run_review/faithfulness.py:65 — faithfulness.build_faithfulness_elements has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 8 (14 pts), boolean chains 6 (nesting depth added 20). 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 · SourceMediaAnalysisService._prepare_sync (cognitive 38) · ×1
  • SourceMediaAnalysisService._prepare_sync (cognitive 38) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:1703 — SourceMediaAnalysisService._prepare_sync has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 10, ternaries 3, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adapters._normalize_tavily_images (cognitive 38) · ×1
  • adapters._normalize_tavily_images (cognitive 38) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:231 — adapters._normalize_tavily_images has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 8, loops 3 (8 pts) (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 · XiaoYiPlatform._outbound_frames (cognitive 38) · ×1
  • XiaoYiPlatform._outbound_frames (cognitive 38) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:577 — XiaoYiPlatform._outbound_frames has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 8, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recall_tool._render_row_blocks (cognitive 38) · ×1
  • recall_tool._render_row_blocks (cognitive 38) src/qwenpaw/agents/context/scroll/recall_tool.py:464 — recall_tool._render_row_blocks has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · message_request_normalizer._strip_media_blocks_in_place (cognitive 38) · ×1
  • message_request_normalizer._strip_media_blocks_in_place (cognitive 38) src/qwenpaw/agents/utils/message_request_normalizer.py:400 — message_request_normalizer._strip_media_blocks_in_place has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Workspace.bootstrap_plugins (cognitive 38) · ×1
  • Workspace.bootstrap_plugins (cognitive 38) src/qwenpaw/app/workspace/workspace.py:311 — Workspace.bootstrap_plugins has cognitive complexity 38 (threshold 15). Drivers by points: error handling 7 (18 pts), if/else 8 (10 pts), loops 5 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ws_handler.nm_bridge_ws (cognitive 38) · ×1
  • ws_handler.nm_bridge_ws (cognitive 38) src/qwenpaw/browser/control_link/chrome/ws_handler.py:173 — ws_handler.nm_bridge_ws has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 8, ternaries 2 (5 pts), error handling 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyUpgradeManager._prepare_payload (cognitive 38) · ×1
  • DependencyUpgradeManager._prepare_payload (cognitive 38) src/qwenpaw/plugins/dependency_upgrade.py:1458 — DependencyUpgradeManager._prepare_payload has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 7 (9 pts), loops 4, boolean chains 3, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external_state.discover_codex_plugin_mcp (cognitive 38) · ×1
  • external_state.discover_codex_plugin_mcp (cognitive 38) src/qwenpaw/portability/providers/external_state.py:602 — external_state.discover_codex_plugin_mcp has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryTagsNavigator.MemoryTagsNavigator (cognitive 38) · ×1
  • MemoryTagsNavigator.MemoryTagsNavigator (cognitive 38) console/src/features/files-workspace/MemoryTagsNavigator.tsx:29 — MemoryTagsNavigator.MemoryTagsNavigator has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 13 (25 pts), boolean chains 9, if/else 4 (nesting depth added 12). Of this number, 22 points are the body's own statements and 16 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MCPOAuthSection.MCPOAuthSection (cognitive 38) · ×1
  • MCPOAuthSection.MCPOAuthSection (cognitive 38) console/src/pages/Agent/MCP/components/MCPOAuthSection.tsx:50 — MCPOAuthSection.MCPOAuthSection has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 12, if/else 7 (8 pts), error handling 3 (nesting depth added 8). Of this number, 24 points are the body's own statements and 14 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 · index.ToolsPage (cognitive 38) · ×1
  • index.ToolsPage (cognitive 38) console/src/pages/Agent/Tools/index.tsx:164 — index.ToolsPage has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 25, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). Most of this is not in the body itself: 12 of the 38 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 350, handleAvailableItemClick, a function literal at line 204, …). 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 · traceUtils.buildTraceDisplayItems (cognitive 38) · ×1
  • traceUtils.buildTraceDisplayItems (cognitive 38) console/src/pages/Inbox/utils/traceUtils.ts:248 — traceUtils.buildTraceDisplayItems has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 8, ternaries 4 (6 pts), loops 1 (nesting depth added 14). Of this number, 29 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlueprintPrepDrawer.BlueprintPrepDrawer (cognitive 38) · ×1
  • BlueprintPrepDrawer.BlueprintPrepDrawer (cognitive 38) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:670 — BlueprintPrepDrawer.BlueprintPrepDrawer has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 16, ternaries 10 (13 pts), if/else 9 (nesting depth added 3). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 733, 772, 875, …). 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 · TimelineLivePreview.MotionOverlayLayer (cognitive 38) · ×1
  • TimelineLivePreview.MotionOverlayLayer (cognitive 38) REDACTED:340 — TimelineLivePreview.MotionOverlayLayer has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (12 pts), ternaries 10 (12 pts) (nesting depth added 4). Of this number, 29 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · agentLiveStatus.deriveAgentLiveStatus (cognitive 38) · ×1
  • agentLiveStatus.deriveAgentLiveStatus (cognitive 38) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:400 — agentLiveStatus.deriveAgentLiveStatus has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 22, if/else 10, ternaries 3 (6 pts) (nesting depth added 3). Of this number, 36 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 · thread_store.compute_mailbox_stats (cognitive 37) · ×1
  • thread_store.compute_mailbox_stats (cognitive 37) REDACTED:800 — thread_store.compute_mailbox_stats has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (6 pts), boolean chains 4, ternaries 3 (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 · ProjectCommitBoundary._reconcile_existing_review (cognitive 37) · ×1
  • ProjectCommitBoundary._reconcile_existing_review (cognitive 37) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1453 — ProjectCommitBoundary._reconcile_existing_review has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 2 (7 pts), boolean chains 4, loops 2 (3 pts) (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 · AssetIndex._validate_index (cognitive 37) · ×1
  • AssetIndex._validate_index (cognitive 37) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:326 — AssetIndex._validate_index has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._discover_decision_journals (cognitive 37) · ×1
  • ProjectReviewService._discover_decision_journals (cognitive 37) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:777 — ProjectReviewService._discover_decision_journals has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, error handling 1 (3 pts), loops 2 (3 pts) (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 · OneBotPlatform.send_message (cognitive 37) · ×1
  • OneBotPlatform.send_message (cognitive 37) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:943 — OneBotPlatform.send_message has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 5 (10 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeChatMessageParser._item (cognitive 37) · ×1
  • WeChatMessageParser._item (cognitive 37) REDACTED:62 — WeChatMessageParser._item has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 8 (13 pts), boolean chains 9 (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 · continuation_summary.validate_summary_quality (cognitive 37) · ×1
  • continuation_summary.validate_summary_quality (cognitive 37) src/qwenpaw/agents/context/scroll/continuation_summary.py:690 — continuation_summary.validate_summary_quality has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent_management._spawn_forked_subagent (cognitive 37) · ×1
  • agent_management._spawn_forked_subagent (cognitive 37) src/qwenpaw/agents/tools/agent_management.py:1601 — agent_management._spawn_forked_subagent has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, if/else 11 (15 pts), error handling 2 (4 pts), ternaries 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 · MailMonitorService._process_new_email (cognitive 37) · ×1
  • MailMonitorService._process_new_email (cognitive 37) REDACTED:2027 — MailMonitorService._process_new_email has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (22 pts), error handling 3 (7 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MCPClientMixin.list_tools (cognitive 37) · ×1
  • _MCPClientMixin.list_tools (cognitive 37) src/qwenpaw/drivers/handlers/mcp_stateful_client.py:466 — _MCPClientMixin.list_tools has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdvisorMiddleware._consume_new_results (cognitive 37) · ×1
  • AdvisorMiddleware._consume_new_results (cognitive 37) src/qwenpaw/modes/advisor/middleware.py:832 — AdvisorMiddleware._consume_new_results has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (22 pts), error handling 1 (4 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 3 (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 · qoder_plugin_adapter.discover_qoder_custom_skill_adapter (cognitive 37) · ×1
  • qoder_plugin_adapter.discover_qoder_custom_skill_adapter (cognitive 37) src/qwenpaw/portability/qoder_plugin_adapter.py:70 — qoder_plugin_adapter.discover_qoder_custom_skill_adapter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 12, error handling 5 (7 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 · cache_policy.cache_request (cognitive 37) · ×1
  • cache_policy.cache_request (cognitive 37) src/qwenpaw/providers/adapters/cache_policy.py:10 — cache_policy.cache_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 9, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunToolBatchCard.collectRawBlocks (cognitive 37) · ×1
  • RunToolBatchCard.collectRawBlocks (cognitive 37) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:54 — RunToolBatchCard.collectRawBlocks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, loops 5 (8 pts), error handling 1 (3 pts), ternaries 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 · GitPanel.GitPanel (cognitive 37) · ×1
  • GitPanel.GitPanel (cognitive 37) console/src/pages/Coding/GitPanel.tsx:66 — GitPanel.GitPanel has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), error handling 9, ternaries 6 (7 pts) (nesting depth added 2). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 252, 508, 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.
D2 · Cognitive Complexity · NotificationSettings.NotificationSettings (cognitive 37) · ×1
  • NotificationSettings.NotificationSettings (cognitive 37) console/src/notifications/NotificationSettings.tsx:54 — NotificationSettings.NotificationSettings has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (11 pts), ternaries 9 (10 pts), error handling 2 (nesting depth added 2). Of this number, 18 points are the body's own statements and 19 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ReleaseNotes.ReleaseNotes (cognitive 37) · ×1
  • ReleaseNotes.ReleaseNotes (cognitive 37) website/src/pages/ReleaseNotes.tsx:16 — ReleaseNotes.ReleaseNotes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, ternaries 6 (8 pts), error handling 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 34, handleVersionClick, 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.
D2 · Cognitive Complexity · driver._live_operation_editing_context (cognitive 36) · ×1
  • driver._live_operation_editing_context (cognitive 36) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:400 — driver._live_operation_editing_context has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileLocalMediaExecutionService.execute (cognitive 36) · ×1
  • FileLocalMediaExecutionService.execute (cognitive 36) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3690 — FileLocalMediaExecutionService.execute has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (25 pts), error handling 6 (7 pts), boolean chains 4 (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 · tracing.read_trace_records (cognitive 36) · ×1
  • tracing.read_trace_records (cognitive 36) plugins/apps/qwenpaw-creator/backend/services/observability/tracing.py:534 — tracing.read_trace_records has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 6 (13 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectCommitBoundary._record_review (cognitive 36) · ×1
  • ProjectCommitBoundary._record_review (cognitive 36) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1328 — ProjectCommitBoundary._record_review has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 6 (10 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._rejection_targets (cognitive 36) · ×1
  • ProjectReviewService._rejection_targets (cognitive 36) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1502 — ProjectReviewService._rejection_targets has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 11, 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 · window._wrap_bubble_text (cognitive 36) · ×1
  • window._wrap_bubble_text (cognitive 36) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/window.py:67 — window._wrap_bubble_text has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (10 pts), ternaries 1 (3 pts), boolean chains 2 (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 · MatrixPlatform._on_room_media_event (cognitive 36) · ×1
  • MatrixPlatform._on_room_media_event (cognitive 36) REDACTED:2466 — MatrixPlatform._on_room_media_event has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QQPlatform._message (cognitive 36) · ×1
  • QQPlatform._message (cognitive 36) plugins/channel/qq/qwenpaw_channel_qq/platform.py:804 — QQPlatform._message has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 11, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlackEventHandler._handle_event (cognitive 36) · ×1
  • SlackEventHandler._handle_event (cognitive 36) plugins/channel/slack/qwenpaw_channel_slack/handler.py:144 — SlackEventHandler._handle_event has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 12, error handling 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · IsolatedChannelProxy._response_scope (cognitive 36) · ×1
  • IsolatedChannelProxy._response_scope (cognitive 36) src/qwenpaw/app/channels/isolated_proxy.py:2501 — IsolatedChannelProxy._response_scope has cognitive complexity 36 (threshold 15). Drivers by points: error handling 7 (20 pts), if/else 5 (9 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManagementResult.from_mapping (cognitive 36) · ×1
  • ManagementResult.from_mapping (cognitive 36) src/qwenpaw/channel_protocol/management.py:297 — ManagementResult.from_mapping has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (9 pts), boolean chains 6, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detectors.detect_dangerous_patterns (cognitive 36) · ×1
  • detectors.detect_dangerous_patterns (cognitive 36) src/qwenpaw/governance/detectors.py:368 — detectors.detect_dangerous_patterns has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · legacy_cloudpaw._cleanup_factory_files (cognitive 36) · ×1
  • legacy_cloudpaw._cleanup_factory_files (cognitive 36) src/qwenpaw/plugins/legacy_cloudpaw.py:358 — legacy_cloudpaw._cleanup_factory_files has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 10, loops 3 (5 pts), ternaries 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 · WireProtocol.request (cognitive 36) · ×1
  • WireProtocol.request (cognitive 36) src/qwenpaw/providers/adapters/wire_protocol.py:46 — WireProtocol.request has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (25 pts), ternaries 3 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gemini_provider._sanitize_schema_for_gemini (cognitive 36) · ×1
  • gemini_provider._sanitize_schema_for_gemini (cognitive 36) src/qwenpaw/providers/gemini_provider.py:108 — gemini_provider._sanitize_schema_for_gemini has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 4 (7 pts), boolean chains 4 (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 · Provider.get_agent_thinking_kwargs (cognitive 36) · ×1
  • Provider.get_agent_thinking_kwargs (cognitive 36) src/qwenpaw/providers/provider.py:894 — Provider.get_agent_thinking_kwargs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 6 (14 pts), boolean chains 5 (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 · Sidebar.Sidebar (cognitive 36) · ×1
  • Sidebar.Sidebar (cognitive 36) console/src/layouts/Sidebar.tsx:119 — Sidebar.Sidebar has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 43 (56 pts), if/else 37 (41 pts), boolean chains 28, error handling 4 (nesting depth added 17). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (Sidebar.Sidebar::handleUpdateProfile) 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 · AppStore.AppStore (cognitive 36) · ×1
  • AppStore.AppStore (cognitive 36) console/src/os/AppStore.tsx:58 — AppStore.AppStore has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 16, ternaries 13 (16 pts), error handling 2, if/else 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 383, a function literal at line 286, a function literal at line 125, …). 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 · ReMeStatusModal.ReMeStatusModal (cognitive 36) · ×1
  • ReMeStatusModal.ReMeStatusModal (cognitive 36) console/src/pages/Agent/Config/components/ReMeStatusModal.tsx:23 — ReMeStatusModal.ReMeStatusModal has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (32 pts), boolean chains 3, if/else 1 (nesting depth added 21). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.startAllBackgroundQueues (cognitive 36) · ×1
  • index.startAllBackgroundQueues (cognitive 36) console/src/pages/Chat/index.tsx:658 — index.startAllBackgroundQueues has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (7 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (nesting depth added 15). Of this number, 35 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 · UserManagement.UserManagement (cognitive 36) · ×1
  • UserManagement.UserManagement (cognitive 36) console/src/pages/Hub/governance/UserManagement.tsx:56 — UserManagement.UserManagement has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 12, if/else 5, error handling 4 (nesting depth added 4). Most of this is not in the body itself: 9 of the 36 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 236, saveBudget, a function literal at line 109, …). 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 · usePluginManager.usePluginManager.loadUpdates (cognitive 36) · ×1
  • usePluginManager.usePluginManager.loadUpdates (cognitive 36) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts:84 — usePluginManager.usePluginManager.loadUpdates has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 5 (9 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSkillPool.useSkillPool.handleZipImport (cognitive 36) · ×1
  • useSkillPool.useSkillPool.handleZipImport (cognitive 36) console/src/pages/Settings/SkillPool/useSkillPool.tsx:1151 — useSkillPool.useSkillPool.handleZipImport has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 2 (7 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 17). Of this number, 33 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 · Post.BlogPost (cognitive 36) · ×1
  • Post.BlogPost (cognitive 36) website/src/pages/Blog/Post.tsx:61 — Post.BlogPost has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13, ternaries 11 (13 pts), boolean chains 10 (nesting depth added 2). Most of this is not in the body itself: 14 of the 36 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 122, 89, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · driver._compact_wire_project_snapshots (cognitive 35) · ×1
  • driver._compact_wire_project_snapshots (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:9709 — driver._compact_wire_project_snapshots has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (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 · model_client.records_to_agentscope_messages (cognitive 35) · ×1
  • model_client.records_to_agentscope_messages (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_client.py:562 — model_client.records_to_agentscope_messages has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 6, ternaries 2 (5 pts), loops 2 (4 pts) (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 · migrations._stamp_missing_audio_roles (cognitive 35) · ×1
  • migrations._stamp_missing_audio_roles (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:592 — migrations._stamp_missing_audio_roles has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media_review.parse_media_report (cognitive 35) · ×1
  • media_review.parse_media_report (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:394 — media_review.parse_media_report has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, ternaries 5 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectExecutionStore.append_task_attempt (cognitive 35) · ×1
  • ProjectExecutionStore.append_task_attempt (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:837 — ProjectExecutionStore.append_task_attempt has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 9, ternaries 8 (9 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 · verification._normalized_visual_verification (cognitive 35) · ×1
  • verification._normalized_visual_verification (cognitive 35) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:57 — verification._normalized_visual_verification has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 10, error handling 2 (4 pts), loops 4 (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 · _StepTracker.process (cognitive 35) · ×1
  • _StepTracker.process (cognitive 35) plugins/bundle/cloudpaw/tools/a2a_call.py:238 — _StepTracker.process has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 2 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 19). 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 · proposal_choice._normalize_proposals (cognitive 35) · ×1
  • proposal_choice._normalize_proposals (cognitive 35) plugins/bundle/cloudpaw/tools/proposal_choice.py:117 — proposal_choice._normalize_proposals has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (5 pts), boolean chains 4 (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 · AzureBotPlatform._send_parts (cognitive 35) · ×1
  • AzureBotPlatform._send_parts (cognitive 35) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:597 — AzureBotPlatform._send_parts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 3 (6 pts), boolean chains 3, loops 2 (3 pts), error handling 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 · serialize.msg_to_entries (cognitive 35) · ×1
  • serialize.msg_to_entries (cognitive 35) src/qwenpaw/agents/context/scroll/serialize.py:194 — serialize.msg_to_entries has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AsMsgHandler.stat_message (cognitive 35) · ×1
  • AsMsgHandler.stat_message (cognitive 35) src/qwenpaw/agents/utils/as_msg_handler.py:137 — AsMsgHandler.stat_message has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 6, loops 2 (5 pts), error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseChannel._access_control_gate (cognitive 35) · ×1
  • BaseChannel._access_control_gate (cognitive 35) src/qwenpaw/app/channels/base.py:378 — BaseChannel._access_control_gate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 10, ternaries 6 (10 pts), error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BaseChannel._extract_query_from_payload (cognitive 35) · ×1
  • BaseChannel._extract_query_from_payload (cognitive 35) src/qwenpaw/app/channels/base.py:1434 — BaseChannel._extract_query_from_payload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 11, loops 2 (5 pts) (nesting depth added 15). 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 · config.list_channel_schemas (cognitive 35) · ×1
  • config.list_channel_schemas (cognitive 35) src/qwenpaw/app/routers/config.py:299 — config.list_channel_schemas has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, ternaries 4 (6 pts), loops 3 (5 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 · HttpStatelessClient.list_tools (cognitive 35) · ×1
  • HttpStatelessClient.list_tools (cognitive 35) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:635 — HttpStatelessClient.list_tools has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_recovery.recover_additions (cognitive 35) · ×1
  • dependency_recovery.recover_additions (cognitive 35) src/qwenpaw/plugins/dependency_recovery.py:312 — dependency_recovery.recover_additions has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (7 pts), error handling 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginContext._produce_tool (cognitive 35) · ×1
  • PluginContext._produce_tool (cognitive 35) src/qwenpaw/plugins/sdk.py:454 — PluginContext._produce_tool has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 6, loops 2 (4 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShellGuard._monitor (cognitive 35) · ×1
  • ShellGuard._monitor (cognitive 35) src/qwenpaw/utils/shell_resources.py:127 — ShellGuard._monitor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 3 (10 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelCapabilityTags.CapabilityTags (cognitive 35) · ×1
  • ModelCapabilityTags.CapabilityTags (cognitive 35) console/src/pages/Settings/Models/components/modals/ModelCapabilityTags.tsx:115 — ModelCapabilityTags.CapabilityTags has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (30 pts), boolean chains 5 (nesting depth added 20). 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 · parseCron.parseDaysOfWeek (cognitive 35) · ×1
  • parseCron.parseDaysOfWeek (cognitive 35) console/src/pages/Control/CronJobs/components/parseCron.ts:199 — parseCron.parseDaysOfWeek has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarketPanel.MarketPanel (cognitive 35) · ×1
  • MarketPanel.MarketPanel (cognitive 35) console/src/pages/Settings/Market/MarketPanel.tsx:237 — MarketPanel.MarketPanel has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (21 pts), boolean chains 11, if/else 3 (nesting depth added 15). Of this number, 29 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · monitor.installStartupMonitor (cognitive 35) · ×1
  • monitor.installStartupMonitor (cognitive 35) console/src/startup/monitor.ts:45 — monitor.installStartupMonitor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 10, ternaries 4 (6 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (onError, fail, a function literal at line 234, …). 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 · FileProjectReviewPanel.FileProjectReviewPanel (cognitive 35) · ×1
  • FileProjectReviewPanel.FileProjectReviewPanel (cognitive 35) plugins/apps/qwenpaw-creator/ui/src/components/agent/FileProjectReviewPanel.tsx:115 — FileProjectReviewPanel.FileProjectReviewPanel has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 10, if/else 9, error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AssetsPage.resolveProvenanceRef (cognitive 35) · ×1
  • AssetsPage.resolveProvenanceRef (cognitive 35) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:783 — AssetsPage.resolveProvenanceRef has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 6 (15 pts), boolean chains 4 (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 · elementPlaybackSelectors.resolveElementPlayback (cognitive 35) · ×1
  • elementPlaybackSelectors.resolveElementPlayback (cognitive 35) plugins/apps/qwenpaw-creator/ui/src/selectors/elementPlaybackSelectors.ts:201 — elementPlaybackSelectors.resolveElementPlayback has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 9, if/else 7 (8 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 · workgraph_execution._publication_artifacts (cognitive 34) · ×1
  • workgraph_execution._publication_artifacts (cognitive 34) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:279 — workgraph_execution._publication_artifacts has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 6 (12 pts), boolean chains 5, 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 · protocol.parse_review_report (cognitive 34) · ×1
  • protocol.parse_review_report (cognitive 34) plugins/apps/qwenpaw-creator/backend/services/render_review/protocol.py:224 — protocol.parse_review_report has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10, ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safe_remote_download.safe_curl_download_to_file (cognitive 34) · ×1
  • safe_remote_download.safe_curl_download_to_file (cognitive 34) plugins/apps/qwenpaw-creator/backend/services/runtime_files/safe_remote_download.py:287 — safe_remote_download.safe_curl_download_to_file has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 4 (8 pts), boolean chains 6, error handling 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceMediaAnalysisService._assert_agent_ranges (cognitive 34) · ×1
  • SourceMediaAnalysisService._assert_agent_ranges (cognitive 34) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:750 — SourceMediaAnalysisService._assert_agent_ranges has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4, loops 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkTransport._guess_filename_and_ext (cognitive 34) · ×1
  • DingTalkTransport._guess_filename_and_ext (cognitive 34) REDACTED:1711 — DingTalkTransport._guess_filename_and_ext has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, error handling 2 (6 pts), ternaries 3 (6 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 · QQPlatform._handle_approval (cognitive 34) · ×1
  • QQPlatform._handle_approval (cognitive 34) plugins/channel/qq/qwenpaw_channel_qq/platform.py:685 — QQPlatform._handle_approval has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 10, loops 2 (5 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager._prune_bookkeeping_to_live_context (cognitive 34) · ×1
  • ScrollContextManager._prune_bookkeeping_to_live_context (cognitive 34) src/qwenpaw/agents/context/scroll/manager.py:2155 — ScrollContextManager._prune_bookkeeping_to_live_context has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (10 pts), boolean chains 3, loops 2 (3 pts) (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 · browser_control._action_screenshot (cognitive 34) · ×1
  • browser_control._action_screenshot (cognitive 34) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2280 — browser_control._action_screenshot has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (18 pts), if/else 9 (12 pts), boolean chains 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AsMsgHandler._format_tool_result_output (cognitive 34) · ×1
  • AsMsgHandler._format_tool_result_output (cognitive 34) src/qwenpaw/agents/utils/as_msg_handler.py:74 — AsMsgHandler._format_tool_result_output has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (6 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 20). 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 · catalog._assemble_channel_catalog (cognitive 34) · ×1
  • catalog._assemble_channel_catalog (cognitive 34) src/qwenpaw/app/channels/catalog.py:202 — catalog._assemble_channel_catalog has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 5 (9 pts), loops 5, boolean chains 4 (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 · IsolatedChannelProxy._admit_batch (cognitive 34) · ×1
  • IsolatedChannelProxy._admit_batch (cognitive 34) src/qwenpaw/app/channels/isolated_proxy.py:643 — IsolatedChannelProxy._admit_batch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 4 (8 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · console.post_mark_inbox_read (cognitive 34) · ×1
  • console.post_mark_inbox_read (cognitive 34) src/qwenpaw/app/routers/console.py:902 — console.post_mark_inbox_read has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 2 (6 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.load_agent_config (cognitive 34) · ×1
  • config.load_agent_config (cognitive 34) src/qwenpaw/config/config.py:3755 — config.load_agent_config has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 9 (13 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PluginLoader._rollback_reload (cognitive 34) · ×1
  • PluginLoader._rollback_reload (cognitive 34) src/qwenpaw/plugins/loader.py:3341 — PluginLoader._rollback_reload has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 11, error handling 4 (6 pts), ternaries 1 (nesting depth added 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 · module_isolation.clear_plugin_bytecode (cognitive 34) · ×1
  • module_isolation.clear_plugin_bytecode (cognitive 34) src/qwenpaw/plugins/module_isolation.py:84 — module_isolation.clear_plugin_bytecode has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (10 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · import_conversations.import_conversations (cognitive 34) · ×1
  • import_conversations.import_conversations (cognitive 34) src/qwenpaw/portability/import_conversations.py:36 — import_conversations.import_conversations has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 3 (7 pts), boolean chains 5, loops 2, 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 · Runtime._inject_partial_response (cognitive 34) · ×1
  • Runtime._inject_partial_response (cognitive 34) src/qwenpaw/runtime/runtime.py:389 — Runtime._inject_partial_response has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (6 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 17). 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 · osNotifyStore.useOsNotify (cognitive 34) · ×1
  • osNotifyStore.useOsNotify (cognitive 34) console/src/os/osNotifyStore.ts:77 — osNotifyStore.useOsNotify has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 18, if/else 4 (7 pts), ternaries 5, loops 3 (4 pts) (nesting depth added 4). None of this is in the body itself: all 34 points belong to 9 function literals inside it that branch (lines 87, 197, 193, …). 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.LoginPage (cognitive 34) · ×1
  • index.LoginPage (cognitive 34) console/src/pages/Login/index.tsx:20 — index.LoginPage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 11, ternaries 6, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 8 function items inside it that branch (submitCredentials, a function literal at line 61, onFinish, …). 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 · ModelConfigModal.ModelConfigModal (cognitive 34) · ×1
  • ModelConfigModal.ModelConfigModal (cognitive 34) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1012 — ModelConfigModal.ModelConfigModal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 118 (157 pts), boolean chains 156, ternaries 67 (129 pts), error handling 13 (17 pts), loops 5 (7 pts) (nesting depth added 107). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (ModelConfigModal.ModelConfigModal::protocolsFor, ModelConfigModal.ModelConfigModal::getPresetForType, ModelConfigModal.ModelConfigModal::getModelOptions, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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 · PromptTokenEditor.PromptTokenEditor (cognitive 34) · ×1
  • PromptTokenEditor.PromptTokenEditor (cognitive 34) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptTokenEditor.tsx:129 — PromptTokenEditor.PromptTokenEditor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 34 points belong to 8 function items inside it that branch (handleClick, a function literal at line 140, insertionRange, …). 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 · agentLiveStatus.toolActivityPhase (cognitive 34) · ×1
  • agentLiveStatus.toolActivityPhase (cognitive 34) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:53 — agentLiveStatus.toolActivityPhase has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 4, ternaries 2 (3 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 · creatorEditBufferStore.collectAffectedRanges (cognitive 34) · ×1
  • creatorEditBufferStore.collectAffectedRanges (cognitive 34) plugins/apps/qwenpaw-creator/ui/src/store/creatorEditBufferStore.ts:177 — creatorEditBufferStore.collectAffectedRanges has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 3, loops 1 (nesting depth added 18). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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 · ShinyText.ShinyText (cognitive 34) · ×1
  • ShinyText.ShinyText (cognitive 34) website/src/components/ShinyText.tsx:24 — ShinyText.ShinyText has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 12 (14 pts), boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 46, 112, 116, …). 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 · file_execution_routes._decide_authorization (cognitive 33) · ×1
  • file_execution_routes._decide_authorization (cognitive 33) plugins/apps/qwenpaw-creator/backend/api/file_execution_routes.py:786 — file_execution_routes._decide_authorization has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 6, error handling 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · smoke_web_grounding.evaluate_result (cognitive 33) · ×1
  • smoke_web_grounding.evaluate_result (cognitive 33) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:88 — smoke_web_grounding.evaluate_result has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 11, loops 3, error handling 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 · FileImageExecutionService._apply_result (cognitive 33) · ×1
  • FileImageExecutionService._apply_result (cognitive 33) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3288 — FileImageExecutionService._apply_result has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · r2v_execution._resolve_reference_versions (cognitive 33) · ×1
  • r2v_execution._resolve_reference_versions (cognitive 33) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:618 — r2v_execution._resolve_reference_versions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scene_review._collect_evidence (cognitive 33) · ×1
  • scene_review._collect_evidence (cognitive 33) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:144 — scene_review._collect_evidence has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rendering.render_grounded_context (cognitive 33) · ×1
  • rendering.render_grounded_context (cognitive 33) plugins/apps/qwenpaw-creator/backend/services/web_grounding/rendering.py:27 — rendering.render_grounded_context has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (12 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · a2a_call.a2a_call (cognitive 33) · ×1
  • a2a_call.a2a_call (cognitive 33) plugins/bundle/cloudpaw/tools/a2a_call.py:27 — a2a_call.a2a_call has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoryStore.reconcile_session_rows (cognitive 33) · ×1
  • HistoryStore.reconcile_session_rows (cognitive 33) src/qwenpaw/agents/context/scroll/history.py:951 — HistoryStore.reconcile_session_rows has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (7 pts), boolean chains 2 (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 · recall_tool._render_rows (cognitive 33) · ×1
  • recall_tool._render_rows (cognitive 33) src/qwenpaw/agents/context/scroll/recall_tool.py:506 — recall_tool._render_rows has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._sync_browser_launch (cognitive 33) · ×1
  • browser_control._sync_browser_launch (cognitive 33) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:955 — browser_control._sync_browser_launch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 3 (7 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community_drafts._rich_markdown (cognitive 33) · ×1
  • community_drafts._rich_markdown (cognitive 33) src/qwenpaw/app/community_drafts.py:233 — community_drafts._rich_markdown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (21 pts), ternaries 4 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · doctor_checks.scan_unknown_config_keys (cognitive 33) · ×1
  • doctor_checks.scan_unknown_config_keys (cognitive 33) src/qwenpaw/cli/doctor_checks.py:366 — doctor_checks.scan_unknown_config_keys has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 6 (11 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.migrate_legacy_config_to_multi_agent (cognitive 33) · ×1
  • config.migrate_legacy_config_to_multi_agent (cognitive 33) src/qwenpaw/config/config.py:4132 — config.migrate_legacy_config_to_multi_agent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 9, loops 2, error handling 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 · protocol.upstream_payload (cognitive 33) · ×1
  • protocol.upstream_payload (cognitive 33) src/qwenpaw/hub/model_service/protocol.py:106 — protocol.upstream_payload has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 15). 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 · dependency_worker.run (cognitive 33) · ×1
  • dependency_worker.run (cognitive 33) src/qwenpaw/plugins/dependency_worker.py:77 — dependency_worker.run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, error handling 2 (4 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerDiscoveryMixin.discover_provider_models (cognitive 33) · ×1
  • ProviderManagerDiscoveryMixin.discover_provider_models (cognitive 33) src/qwenpaw/providers/provider_manager_discovery.py:236 — ProviderManagerDiscoveryMixin.discover_provider_models has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PatternAnalyzer.analyze (cognitive 33) · ×1
  • PatternAnalyzer.analyze (cognitive 33) src/qwenpaw/security/skill_scanner/analyzers/pattern_analyzer.py:265 — PatternAnalyzer.analyze has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryGraphView.applyGraphVisualState (cognitive 33) · ×1
  • MemoryGraphView.applyGraphVisualState (cognitive 33) REDACTED:464 — MemoryGraphView.applyGraphVisualState has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 11, boolean chains 9 (nesting depth added 2). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 473, a function literal at line 554, a function literal at line 536, …). 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 · replayFastForward.wrapReplayFastForward (cognitive 33) · ×1
  • replayFastForward.wrapReplayFastForward (cognitive 33) console/src/pages/Chat/replayFastForward.ts:41 — replayFastForward.wrapReplayFastForward has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 16). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · traceUtils.extractTraceText (cognitive 33) · ×1
  • traceUtils.extractTraceText (cognitive 33) console/src/pages/Inbox/utils/traceUtils.ts:69 — traceUtils.extractTraceText has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 13). Of this number, 26 points are the body's own statements and 7 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 · InstalledPluginList.InstalledPluginList (cognitive 33) · ×1
  • InstalledPluginList.InstalledPluginList (cognitive 33) console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:47 — InstalledPluginList.InstalledPluginList has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (16 pts), if/else 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (renderActivation, renderUpdateAction, a function literal at line 186, …). 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 · ChatGPTAccountPanel.ChatGPTAccountPanel (cognitive 33) · ×1
  • ChatGPTAccountPanel.ChatGPTAccountPanel (cognitive 33) console/src/pages/Settings/Models/components/cards/ChatGPTAccountPanel.tsx:34 — ChatGPTAccountPanel.ChatGPTAccountPanel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, ternaries 5 (10 pts), error handling 1 (nesting depth added 8). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (action, a function literal at line 167, 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 · WorkGraphPanel.NodeRow (cognitive 33) · ×1
  • WorkGraphPanel.NodeRow (cognitive 33) plugins/apps/qwenpaw-creator/ui/src/components/agent/WorkGraphPanel.tsx:102 — WorkGraphPanel.NodeRow has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (29 pts), boolean chains 4 (nesting depth added 16). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModelBadges.ModelBadges · ×1
  • ModelBadges.ModelBadges::status (cognitive 33) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelBadges.tsx:55 — ModelBadges.ModelBadges::status has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 8 (11 pts), boolean chains 6 (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 · FileCreatorAgentRuntime._await_execution_authorization (cognitive 32) · ×1
  • FileCreatorAgentRuntime._await_execution_authorization (cognitive 32) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:7547 — FileCreatorAgentRuntime._await_execution_authorization has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 9, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceMemoryService.recover_interrupted (cognitive 32) · ×1
  • SourceMemoryService.recover_interrupted (cognitive 32) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1619 — SourceMemoryService.recover_interrupted has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (21 pts), error handling 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_scratch.project_storage_profile (cognitive 32) · ×1
  • task_scratch.project_storage_profile (cognitive 32) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:727 — task_scratch.project_storage_profile has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prompt_sync.derive_prompt_sync_changes (cognitive 32) · ×1
  • prompt_sync.derive_prompt_sync_changes (cognitive 32) plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:366 — prompt_sync.derive_prompt_sync_changes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 8, loops 2 (3 pts), ternaries 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 · ProjectExecutionStore.append_continuation_event (cognitive 32) · ×1
  • ProjectExecutionStore.append_continuation_event (cognitive 32) plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:512 — ProjectExecutionStore.append_continuation_event has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7, ternaries 5 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FeishuDriver._perform_send (cognitive 32) · ×1
  • FeishuDriver._perform_send (cognitive 32) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:476 — FeishuDriver._perform_send has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · management.manage (cognitive 32) · ×1
  • management.manage (cognitive 32) plugins/channel/feishu/qwenpaw_channel_feishu/management.py:45 — management.manage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 4 (6 pts), error handling 4 (5 pts), boolean chains 4 (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 · MatrixPlatform._record_media_history (cognitive 32) · ×1
  • MatrixPlatform._record_media_history (cognitive 32) REDACTED:1869 — MatrixPlatform._record_media_history has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 8, ternaries 4 (8 pts) (nesting depth added 13). 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 · SlackPlatform.effect_call (cognitive 32) · ×1
  • SlackPlatform.effect_call (cognitive 32) plugins/channel/slack/qwenpaw_channel_slack/platform.py:359 — SlackPlatform.effect_call has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 3 (9 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoicePlatform._close_resources (cognitive 32) · ×1
  • VoicePlatform._close_resources (cognitive 32) plugins/channel/voice/qwenpaw_channel_voice/platform.py:749 — VoicePlatform._close_resources has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 8, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · YuanbaoPlatform._handle_chat_message (cognitive 32) · ×1
  • YuanbaoPlatform._handle_chat_message (cognitive 32) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:709 — YuanbaoPlatform._handle_chat_message has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 12, ternaries 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · QwenPawACPAgent.prompt (cognitive 32) · ×1
  • QwenPawACPAgent.prompt (cognitive 32) src/qwenpaw/agents/acp/server.py:729 — QwenPawACPAgent.prompt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 5 (7 pts), boolean chains 2, loops 1, ternaries 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 · ScrollContextManager._summary_archived_records (cognitive 32) · ×1
  • ScrollContextManager._summary_archived_records (cognitive 32) src/qwenpaw/agents/context/scroll/manager.py:976 — ScrollContextManager._summary_archived_records has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 3 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._hydrate_clawhub_payload (cognitive 32) · ×1
  • hub._hydrate_clawhub_payload (cognitive 32) src/qwenpaw/agents/skill_system/hub.py:1973 — hub._hydrate_clawhub_payload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillService.import_from_zip (cognitive 32) · ×1
  • SkillService.import_from_zip (cognitive 32) src/qwenpaw/agents/skill_system/workspace_service.py:624 — SkillService.import_from_zip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (8 pts), boolean chains 5, ternaries 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 · browser_snapshot.build_role_snapshot_from_aria (cognitive 32) · ×1
  • browser_snapshot.build_role_snapshot_from_aria (cognitive 32) src/qwenpaw/agents/tools/deprecated_browser/browser_snapshot.py:185 — browser_snapshot.build_role_snapshot_from_aria has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_message_utils._reorder_tool_results (cognitive 32) · ×1
  • tool_message_utils._reorder_tool_results (cognitive 32) src/qwenpaw/agents/utils/tool_message_utils.py:125 — tool_message_utils._reorder_tool_results has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community_feedback.resolve_feedback_link (cognitive 32) · ×1
  • community_feedback.resolve_feedback_link (cognitive 32) src/qwenpaw/app/community_feedback.py:55 — community_feedback.resolve_feedback_link has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, ternaries 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiAgentManager._reload_agent (cognitive 32) · ×1
  • MultiAgentManager._reload_agent (cognitive 32) src/qwenpaw/app/multi_agent_manager.py:921 — MultiAgentManager._reload_agent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agents._validate_mail_config (cognitive 32) · ×1
  • agents._validate_mail_config (cognitive 32) src/qwenpaw/app/routers/agents.py:2207 — agents._validate_mail_config has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SharedResponseDriver._checkpoint_reserve (cognitive 32) · ×1
  • SharedResponseDriver._checkpoint_reserve (cognitive 32) src/qwenpaw/channel_protocol/shared_response_driver.py:429 — SharedResponseDriver._checkpoint_reserve has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), boolean chains 6, ternaries 2 (5 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 · doctor_checks.workspace_hygiene_notes (cognitive 32) · ×1
  • doctor_checks.workspace_hygiene_notes (cognitive 32) src/qwenpaw/cli/doctor_checks.py:600 — doctor_checks.workspace_hygiene_notes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 3 (8 pts), loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils._get_linux_default_browser (cognitive 32) · ×1
  • utils._get_linux_default_browser (cognitive 32) src/qwenpaw/config/utils.py:331 — utils._get_linux_default_browser has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (7 pts), error handling 2 (3 pts), boolean chains 2, ternaries 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 · dependencies.observe_dependencies (cognitive 32) · ×1
  • dependencies.observe_dependencies (cognitive 32) src/qwenpaw/plugins/execution/dependencies.py:875 — dependencies.observe_dependencies has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader.load_plugin_from_path (cognitive 32) · ×1
  • PluginLoader.load_plugin_from_path (cognitive 32) src/qwenpaw/plugins/loader.py:3678 — PluginLoader.load_plugin_from_path has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, ternaries 2 (4 pts), error handling 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 · PluginLoader._uninstall_without_instance (cognitive 32) · ×1
  • PluginLoader._uninstall_without_instance (cognitive 32) src/qwenpaw/plugins/loader.py:4950 — PluginLoader._uninstall_without_instance has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, error handling 4 (6 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PortabilityImportJobManager._project_progress (cognitive 32) · ×1
  • PortabilityImportJobManager._project_progress (cognitive 32) src/qwenpaw/portability/import_jobs.py:824 — PortabilityImportJobManager._project_progress has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6, ternaries 2 (5 pts), error handling 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_schedules._parse_rrule (cognitive 32) · ×1
  • codex_schedules._parse_rrule (cognitive 32) src/qwenpaw/portability/providers/codex_schedules.py:59 — codex_schedules._parse_rrule has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, loops 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · control.parse_args (cognitive 32) · ×1
  • control.parse_args (cognitive 32) src/qwenpaw/runtime/commands/control/__init__.py:203 — control.parse_args has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (7 pts), boolean chains 5 (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 · ChannelDrawer.ChannelDrawer (cognitive 32) · ×1
  • ChannelDrawer.ChannelDrawer (cognitive 32) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183 — ChannelDrawer.ChannelDrawer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 42 (55 pts), boolean chains 49, ternaries 28 (41 pts), error handling 4 (6 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChannelDrawer.ChannelDrawer::prepareSave) 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 · ApprovalLevelToggle.ApprovalLevelToggle (cognitive 32) · ×1
  • ApprovalLevelToggle.ApprovalLevelToggle (cognitive 32) console/src/pages/Chat/components/ApprovalLevelToggle.tsx:57 — ApprovalLevelToggle.ApprovalLevelToggle has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 11, if/else 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 109, 230, 74, …). 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 · parseCron.parseCron (cognitive 32) · ×1
  • parseCron.parseCron (cognitive 32) console/src/pages/Control/CronJobs/components/parseCron.ts:63 — parseCron.parseCron has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, ternaries 2 (5 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 · TimelineSnapshotPanel.TimelineSnapshotPanel (cognitive 32) · ×1
  • TimelineSnapshotPanel.TimelineSnapshotPanel (cognitive 32) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSnapshotPanel.tsx:48 — TimelineSnapshotPanel.TimelineSnapshotPanel has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 12, ternaries 8 (9 pts), if/else 8, error handling 3 (nesting depth added 1). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 241, snapshotTitle, createSnapshot, …). 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 · agentLiveStatus.activeMainToolLabel (cognitive 32) · ×1
  • agentLiveStatus.activeMainToolLabel (cognitive 32) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:298 — agentLiveStatus.activeMainToolLabel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 3 (9 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 · timelineEditing.resolveSpanDrag (cognitive 32) · ×1
  • timelineEditing.resolveSpanDrag (cognitive 32) plugins/apps/qwenpaw-creator/ui/src/lib/timelineEditing.ts:135 — timelineEditing.resolveSpanDrag has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 11). Of this number, 30 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 · creatorSessionStore.useCreatorSessionStore.bootstrap (cognitive 32) · ×1
  • creatorSessionStore.useCreatorSessionStore.bootstrap (cognitive 32) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:636 — creatorSessionStore.useCreatorSessionStore.bootstrap has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 9, ternaries 4, error handling 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 12 belong to 7 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 · project_file_routes.patch_project (cognitive 31) · ×1
  • project_file_routes.patch_project (cognitive 31) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:696 — project_file_routes.patch_project has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 8 (11 pts), ternaries 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 · DashScopeImageModel._poll_task (cognitive 31) · ×1
  • DashScopeImageModel._poll_task (cognitive 31) REDACTED:365 — DashScopeImageModel._poll_task has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 3 (10 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashScopeImageModel._decode (cognitive 31) · ×1
  • DashScopeImageModel._decode (cognitive 31) REDACTED:488 — DashScopeImageModel._decode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (11 pts), boolean chains 4, loops 2 (4 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 · WorkGraphScheduler._emit_graph_transitions (cognitive 31) · ×1
  • WorkGraphScheduler._emit_graph_transitions (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:1391 — WorkGraphScheduler._emit_graph_transitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, ternaries 3 (7 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workgraph_execution.requested_work_node (cognitive 31) · ×1
  • workgraph_execution.requested_work_node (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:452 — workgraph_execution.requested_work_node has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceMemoryService.query_memory (cognitive 31) · ×1
  • SourceMemoryService.query_memory (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1750 — SourceMemoryService.query_memory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_execution._resolve_version_references (cognitive 31) · ×1
  • image_execution._resolve_version_references (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:809 — image_execution._resolve_version_references has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileR2VExecutionService.dispatch (cognitive 31) · ×1
  • FileR2VExecutionService.dispatch (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2064 — FileR2VExecutionService.dispatch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 4, error handling 2 (3 pts), loops 1, ternaries 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 · r2v_execution._assert_r2v_reference_budget (cognitive 31) · ×1
  • r2v_execution._assert_r2v_reference_budget (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:961 — r2v_execution._assert_r2v_reference_budget has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 10, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · r2v_execution.recover_interrupted_image_tasks (cognitive 31) · ×1
  • r2v_execution.recover_interrupted_image_tasks (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5363 — r2v_execution.recover_interrupted_image_tasks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media_review._focused_frame_targets (cognitive 31) · ×1
  • media_review._focused_frame_targets (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:584 — media_review._focused_frame_targets has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (13 pts), loops 2 (5 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 · media_review.review_media_artifact (cognitive 31) · ×1
  • media_review.review_media_artifact (cognitive 31) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:721 — media_review.review_media_artifact has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, ternaries 2 (4 pts), error handling 1 (2 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · events.parse_clarification (cognitive 31) · ×1
  • events.parse_clarification (cognitive 31) plugins/apps/qwenpaw-data/backend/bridge/events.py:86 — events.parse_clarification has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, loops 3 (4 pts), error handling 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 · AzureBotPlatform._attachment (cognitive 31) · ×1
  • AzureBotPlatform._attachment (cognitive 31) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:372 — AzureBotPlatform._attachment has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkPlatform._create_ai_card (cognitive 31) · ×1
  • DingTalkPlatform._create_ai_card (cognitive 31) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:863 — DingTalkPlatform._create_ai_card has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, error handling 4, ternaries 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MattermostPlatform._websocket_loop (cognitive 31) · ×1
  • MattermostPlatform._websocket_loop (cognitive 31) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:126 — MattermostPlatform._websocket_loop has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · management._execute (cognitive 31) · ×1
  • management._execute (cognitive 31) plugins/channel/qq/qwenpaw_channel_qq/management.py:99 — management._execute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 7 (10 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WeChatPlatform.send_parts (cognitive 31) · ×1
  • WeChatPlatform.send_parts (cognitive 31) REDACTED:325 — WeChatPlatform.send_parts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts), error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager._tool_result_fold_candidates (cognitive 31) · ×1
  • ScrollContextManager._tool_result_fold_candidates (cognitive 31) src/qwenpaw/agents/context/scroll/manager.py:1675 — ScrollContextManager._tool_result_fold_candidates has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, ternaries 3 (6 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_call_coerce._coerce_node (cognitive 31) · ×1
  • tool_call_coerce._coerce_node (cognitive 31) src/qwenpaw/agents/utils/tool_call_coerce.py:133 — tool_call_coerce._coerce_node has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (7 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelIngressService._original_url (cognitive 31) · ×1
  • ChannelIngressService._original_url (cognitive 31) src/qwenpaw/app/channels/ingress.py:464 — ChannelIngressService._original_url has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 4 (7 pts), loops 1 (2 pts), error handling 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 · IsolatedChannelProxy._send_completed_event (cognitive 31) · ×1
  • IsolatedChannelProxy._send_completed_event (cognitive 31) src/qwenpaw/app/channels/isolated_proxy.py:2284 — IsolatedChannelProxy._send_completed_event has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelManagementService.execute (cognitive 31) · ×1
  • ChannelManagementService.execute (cognitive 31) src/qwenpaw/app/channels/management.py:109 — ChannelManagementService.execute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8, error handling 5, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CronExecutor.execute (cognitive 31) · ×1
  • CronExecutor.execute (cognitive 31) src/qwenpaw/app/crons/executor.py:118 — CronExecutor.execute has cognitive complexity 31 (threshold 15). Drivers by points: error handling 6 (9 pts), boolean chains 8, if/else 8, ternaries 5 (6 pts) (nesting depth added 4). 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 · qoder_schedules._normalize_task (cognitive 31) · ×1
  • qoder_schedules._normalize_task (cognitive 31) src/qwenpaw/portability/providers/qoder_schedules.py:274 — qoder_schedules._normalize_task has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20, ternaries 6 (7 pts), boolean chains 4 (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 · hooks._topo_sort (cognitive 31) · ×1
  • hooks._topo_sort (cognitive 31) src/qwenpaw/runtime/hooks.py:170 — hooks._topo_sort has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 6 (12 pts) (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 · markdown_cjk.normalize_cjk_emphasis (cognitive 31) · ×1
  • markdown_cjk.normalize_cjk_emphasis (cognitive 31) src/qwenpaw/utils/markdown_cjk.py:98 — markdown_cjk.normalize_cjk_emphasis has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.RuntimeAvailabilityGuard (cognitive 31) · ×1
  • App.RuntimeAvailabilityGuard (cognitive 31) console/src/App.tsx:197 — App.RuntimeAvailabilityGuard has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12, ternaries 6 (11 pts), boolean chains 7, error handling 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 12 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 · usePluginManager.usePluginManager.changeActivation (cognitive 31) · ×1
  • usePluginManager.usePluginManager.changeActivation (cognitive 31) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts:270 — usePluginManager.usePluginManager.changeActivation has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 3 (5 pts), error handling 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 · OfficialPluginList.OfficialPluginList (cognitive 31) · ×1
  • OfficialPluginList.OfficialPluginList (cognitive 31) console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:59 — OfficialPluginList.OfficialPluginList has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (9 pts), if/else 6 (nesting depth added 1). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 11 function items inside it that branch (renderInstallButton, renderUninstallButton, a function literal at line 100, …). 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 · LocalRuntimePanel.LocalRuntimePanel (cognitive 31) · ×1
  • LocalRuntimePanel.LocalRuntimePanel (cognitive 31) console/src/pages/Settings/Models/components/modals/local-models/LocalRuntimePanel.tsx:27 — LocalRuntimePanel.LocalRuntimePanel has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 16 (24 pts), boolean chains 7 (nesting depth added 8). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reviewFocus.useReviewFieldFocus (cognitive 31) · ×1
  • reviewFocus.useReviewFieldFocus (cognitive 31) plugins/apps/qwenpaw-creator/ui/src/routing/reviewFocus.ts:222 — reviewFocus.useReviewFieldFocus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 11 (nesting depth added 1). None of this is in the body itself: all 31 points belong to 9 function literals inside it that branch (lines 349, 282, 308, …). 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 · parseBlogMarkdown.normalizeRelated (cognitive 31) · ×1
  • parseBlogMarkdown.normalizeRelated (cognitive 31) website/src/lib/parseBlogMarkdown.ts:81 — parseBlogMarkdown.normalizeRelated has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 5 (9 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuickStart.QuickStart (cognitive 31) · ×1
  • QuickStart.QuickStart (cognitive 31) website/src/pages/Home/components/QuickStart.tsx:228 — QuickStart.QuickStart has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 17 (29 pts), error handling 1, if/else 1 (nesting depth added 12). Of this number, 19 points are the body's own statements and 12 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 · vlm_model._convert_to_gemini_content (cognitive 30) · ×1
  • vlm_model._convert_to_gemini_content (cognitive 30) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:686 — vlm_model._convert_to_gemini_content has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (12 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegLocalMediaRunner._render_sync (cognitive 30) · ×1
  • FfmpegLocalMediaRunner._render_sync (cognitive 30) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:407 — FfmpegLocalMediaRunner._render_sync has cognitive complexity 30 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 10 (11 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegLocalMediaRunner._render_one_segment (cognitive 30) · ×1
  • FfmpegLocalMediaRunner._render_one_segment (cognitive 30) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1238 — FfmpegLocalMediaRunner._render_one_segment has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 10, loops 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 · review_admission._pending_media_artifacts (cognitive 30) · ×1
  • review_admission._pending_media_artifacts (cognitive 30) plugins/apps/qwenpaw-creator/backend/services/media_files/review_admission.py:51 — review_admission._pending_media_artifacts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visual_reference_resolution.resolve_r2v_visual_reference_version_ids (cognitive 30) · ×1
  • visual_reference_resolution.resolve_r2v_visual_reference_version_ids (cognitive 30) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_reference_resolution.py:135 — visual_reference_resolution.resolve_r2v_visual_reference_version_ids has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · text_review._settle_sync_review_job (cognitive 30) · ×1
  • text_review._settle_sync_review_job (cognitive 30) plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:405 — text_review._settle_sync_review_job has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codec.parse_segments (cognitive 30) · ×1
  • codec.parse_segments (cognitive 30) plugins/channel/onebot/qwenpaw_channel_onebot/codec.py:37 — codec.parse_segments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 3 (10 pts), boolean chains 7, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XiaoYiPlatform._handle_a2a_request (cognitive 30) · ×1
  • XiaoYiPlatform._handle_a2a_request (cognitive 30) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:409 — XiaoYiPlatform._handle_a2a_request has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · message._coerce_block (cognitive 30) · ×1
  • message._coerce_block (cognitive 30) src/qwenpaw/_compat/message.py:127 — message._coerce_block has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (7 pts), boolean chains 4 (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 · continuation_summary.parse_plain_markdown (cognitive 30) · ×1
  • continuation_summary.parse_plain_markdown (cognitive 30) src/qwenpaw/agents/context/scroll/continuation_summary.py:610 — continuation_summary.parse_plain_markdown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, loops 3, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · history._history_batches (cognitive 30) · ×1
  • history._history_batches (cognitive 30) src/qwenpaw/agents/context/visual_compression/pipeline/history.py:185 — history._history_batches has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._ensure_browser (cognitive 30) · ×1
  • browser_control._ensure_browser (cognitive 30) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1657 — browser_control._ensure_browser has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 3 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · message_processing.process_file_and_media_blocks_in_message (cognitive 30) · ×1
  • message_processing.process_file_and_media_blocks_in_message (cognitive 30) src/qwenpaw/agents/utils/message_processing.py:519 — message_processing.process_file_and_media_blocks_in_message has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts), ternaries 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelManager._consume_queue (cognitive 30) · ×1
  • ChannelManager._consume_queue (cognitive 30) src/qwenpaw/app/channels/manager.py:1147 — ChannelManager._consume_queue has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), error handling 3 (7 pts), ternaries 1 (2 pts) (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 · CommunityConnectionService.community_request (cognitive 30) · ×1
  • CommunityConnectionService.community_request (cognitive 30) src/qwenpaw/app/community_connection.py:1112 — CommunityConnectionService.community_request has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, error handling 3 (5 pts), 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 · cdp_tree.resolve_spec (cognitive 30) · ×1
  • cdp_tree.resolve_spec (cognitive 30) src/qwenpaw/browser/control_link/cdp_tree.py:230 — cdp_tree.resolve_spec has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 3, 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 · PawAppContext.get_session_history (cognitive 30) · ×1
  • PawAppContext.get_session_history (cognitive 30) src/qwenpaw/pawapp/context.py:279 — PawAppContext.get_session_history has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3 (9 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _messages._build_block (cognitive 30) · ×1
  • _messages._build_block (cognitive 30) src/qwenpaw/plugins/_messages.py:181 — _messages._build_block has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 4 (9 pts), boolean chains 6 (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 · DependencyUpgradeManager._legacy_collect_consumers (cognitive 30) · ×1
  • DependencyUpgradeManager._legacy_collect_consumers (cognitive 30) src/qwenpaw/plugins/dependency_upgrade.py:517 — DependencyUpgradeManager._legacy_collect_consumers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, ternaries 2 (6 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planner.tool_asset_fingerprints (cognitive 30) · ×1
  • planner.tool_asset_fingerprints (cognitive 30) src/qwenpaw/portability/planner.py:363 — planner.tool_asset_fingerprints has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (14 pts), loops 5 (7 pts), if/else 2 (6 pts), error handling 1 (3 pts) (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 · BackendExecution._content_from_request (cognitive 30) · ×1
  • BackendExecution._content_from_request (cognitive 30) src/qwenpaw/runtime/backends/execution.py:640 — BackendExecution._content_from_request has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · outbound_media._cleanup (cognitive 30) · ×1
  • outbound_media._cleanup (cognitive 30) src/qwenpaw/utils/outbound_media.py:91 — outbound_media._cleanup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (8 pts), boolean chains 2, error handling 1 (2 pts) (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 · SessionApi.patchLastUserMessage (cognitive 30) · ×1
  • SessionApi.patchLastUserMessage (cognitive 30) console/src/pages/Chat/sessionApi/index.ts:1122 — SessionApi.patchLastUserMessage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunToolBatchCard.extractMediaFromBlocks (cognitive 30) · ×1
  • RunToolBatchCard.extractMediaFromBlocks (cognitive 30) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:222 — RunToolBatchCard.extractMediaFromBlocks has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 3 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). 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.ACPPage · ×1
  • index.ACPPage::handleSubmit (cognitive 30) console/src/pages/Agent/ACP/index.tsx:467 — index.ACPPage::handleSubmit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 11, 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 · index.SessionsPage (cognitive 30) · ×1
  • index.SessionsPage (cognitive 30) console/src/pages/Control/Sessions/index.tsx:31 — index.SessionsPage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, ternaries 5 (7 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 96, a function literal at line 381, handleSubmit, …). 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 · ModelUsage.ModelUsage (cognitive 30) · ×1
  • ModelUsage.ModelUsage (cognitive 30) console/src/pages/Hub/governance/ModelUsage.tsx:24 — ModelUsage.ModelUsage has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 8, if/else 4 (5 pts), error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 42, 67, 103, …). 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 · ExecutionAuthorizationCard.authorizationJumpTarget (cognitive 30) · ×1
  • ExecutionAuthorizationCard.authorizationJumpTarget (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:198 — ExecutionAuthorizationCard.authorizationJumpTarget has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 7 (11 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Breadcrumb.useBreadcrumbs (cognitive 30) · ×1
  • Breadcrumb.useBreadcrumbs (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/components/layout/Breadcrumb.tsx:21 — Breadcrumb.useBreadcrumbs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, ternaries 1 (2 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 · creatorPresentation.creatorTargetLabel (cognitive 30) · ×1
  • creatorPresentation.creatorTargetLabel (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/lib/creatorPresentation.ts:138 — creatorPresentation.creatorTargetLabel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 3 (7 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetsPage.visualItemGroups (cognitive 30) · ×1
  • AssetsPage.visualItemGroups (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:593 — AssetsPage.visualItemGroups has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 11). Of this number, 27 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 · blueprintSelectors.roughCutFrameForElement (cognitive 30) · ×1
  • blueprintSelectors.roughCutFrameForElement (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/selectors/blueprintSelectors.ts:206 — blueprintSelectors.roughCutFrameForElement has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, ternaries 1 (3 pts), loops 2 (nesting depth added 7). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileProjectReviewStore.useFileProjectReviewStore.pollOnce (cognitive 30) · ×1
  • fileProjectReviewStore.useFileProjectReviewStore.pollOnce (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:174 — fileProjectReviewStore.useFileProjectReviewStore.pollOnce has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, ternaries 4 (5 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 198, 192, 182, …). 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 · fileProjectReviewStore.useFileProjectReviewStore.decide (cognitive 30) · ×1
  • fileProjectReviewStore.useFileProjectReviewStore.decide (cognitive 30) plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:317 — fileProjectReviewStore.useFileProjectReviewStore.decide has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, ternaries 4 (5 pts), error handling 2 (nesting depth added 4). Of this number, 20 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · project_file_routes._build_patch_candidate (cognitive 29) · ×1
  • project_file_routes._build_patch_candidate (cognitive 29) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:552 — project_file_routes._build_patch_candidate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), ternaries 1 (3 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 · BaseImageModel.generate (cognitive 29) · ×1
  • BaseImageModel.generate (cognitive 29) REDACTED:725 — BaseImageModel.generate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, error handling 6 (7 pts), ternaries 1 (2 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 · video_model.check_task_status (cognitive 29) · ×1
  • video_model.check_task_status (cognitive 29) plugins/apps/qwenpaw-creator/backend/models/video_model.py:1400 — video_model.check_task_status has cognitive complexity 29 (threshold 15). Drivers by points: error handling 6 (9 pts), boolean chains 7, ternaries 4 (7 pts), if/else 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audio_execution.execute_file_voice_enrollment_command (cognitive 29) · ×1
  • audio_execution.execute_file_voice_enrollment_command (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:784 — audio_execution.execute_file_voice_enrollment_command has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, ternaries 6 (9 pts), if/else 6 (7 pts) (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 · FileR2VExecutionService._frozen_inputs_still_current (cognitive 29) · ×1
  • FileR2VExecutionService._frozen_inputs_still_current (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4679 — FileR2VExecutionService._frozen_inputs_still_current has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visual_reference_resolution.preview_r2v_reference_order (cognitive 29) · ×1
  • visual_reference_resolution.preview_r2v_reference_order (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_reference_resolution.py:278 — visual_reference_resolution.preview_r2v_reference_order has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 5 (7 pts), error handling 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · facade._sweep_legacy_lock_artifacts (cognitive 29) · ×1
  • facade._sweep_legacy_lock_artifacts (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:146 — facade._sweep_legacy_lock_artifacts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (9 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._decide_locked (cognitive 29) · ×1
  • ProjectReviewService._decide_locked (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1002 — ProjectReviewService._decide_locked has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media_review._parse_probes (cognitive 29) · ×1
  • media_review._parse_probes (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:329 — media_review._parse_probes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 9, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · status_projection.build_agent_status_bar (cognitive 29) · ×1
  • status_projection.build_agent_status_bar (cognitive 29) plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py:248 — status_projection.build_agent_status_bar has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (17 pts), ternaries 6 (8 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · recall_tool.search_sources (cognitive 29) · ×1
  • recall_tool.search_sources (cognitive 29) src/qwenpaw/agents/context/visual_compression/runtime/recall_tool.py:236 — recall_tool.search_sources has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._action_tabs (cognitive 29) · ×1
  • browser_control._action_tabs (cognitive 29) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4188 — browser_control._action_tabs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._action_clear_browser_cache (cognitive 29) · ×1
  • browser_control._action_clear_browser_cache (cognitive 29) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4390 — browser_control._action_clear_browser_cache has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 3 (8 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolatedChannelProxy.build_agent_request_from_native (cognitive 29) · ×1
  • IsolatedChannelProxy.build_agent_request_from_native (cognitive 29) src/qwenpaw/app/channels/isolated_proxy.py:966 — IsolatedChannelProxy.build_agent_request_from_native has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 9, error handling 1 (3 pts) (nesting depth added 11). 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 · ChannelQRCodeSessions.poll (cognitive 29) · ×1
  • ChannelQRCodeSessions.poll (cognitive 29) src/qwenpaw/app/channels/qrcode_sessions.py:642 — ChannelQRCodeSessions.poll has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 9, boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · monitor._authenticated_sender_from_headers (cognitive 29) · ×1
  • monitor._authenticated_sender_from_headers (cognitive 29) REDACTED:431 — monitor._authenticated_sender_from_headers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinkServer._handle_control_call (cognitive 29) · ×1
  • LinkServer._handle_control_call (cognitive 29) src/qwenpaw/browser/execution/subprocess_plane.py:193 — LinkServer._handle_control_call has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, ternaries 2 (4 pts), error handling 2 (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 · render.render_restore (cognitive 29) · ×1
  • render.render_restore (cognitive 29) src/qwenpaw/checkpoints/render.py:184 — render.render_restore has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, ternaries 3 (5 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · cron_cmd._resolve_update_spec (cognitive 29) · ×1
  • cron_cmd._resolve_update_spec (cognitive 29) src/qwenpaw/cli/cron_cmd.py:617 — cron_cmd._resolve_update_spec has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23 (24 pts), error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · skills_cmd.install_cmd (cognitive 29) · ×1
  • skills_cmd.install_cmd (cognitive 29) src/qwenpaw/cli/skills_cmd.py:976 — skills_cmd.install_cmd has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · channel_bootstrap.runtime_manifest (cognitive 29) · ×1
  • channel_bootstrap.runtime_manifest (cognitive 29) src/qwenpaw/plugins/channel_bootstrap.py:61 — channel_bootstrap.runtime_manifest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13, loops 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 · dependency_maintenance.state_root (cognitive 29) · ×1
  • dependency_maintenance.state_root (cognitive 29) src/qwenpaw/plugins/dependency_maintenance.py:262 — dependency_maintenance.state_root has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 17). 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 · PluginLoader._prepare_python_dependencies (cognitive 29) · ×1
  • PluginLoader._prepare_python_dependencies (cognitive 29) src/qwenpaw/plugins/loader.py:1044 — PluginLoader._prepare_python_dependencies has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, ternaries 4 (5 pts), error handling 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderAnnotationService.apply (cognitive 29) · ×1
  • ProviderAnnotationService.apply (cognitive 29) src/qwenpaw/providers/provider_annotations.py:18 — ProviderAnnotationService.apply has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentBuilder.build (cognitive 29) · ×1
  • AgentBuilder.build (cognitive 29) src/qwenpaw/runtime/builder.py:334 — AgentBuilder.build has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 7, ternaries 3, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · tool_guard._guarded_tool_check_permissions (cognitive 29) · ×1
  • tool_guard._guarded_tool_check_permissions (cognitive 29) src/qwenpaw/runtime/tool_guard.py:151 — tool_guard._guarded_tool_check_permissions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · turnUsage.wrapChatResponseUsageStream (cognitive 29) · ×1
  • turnUsage.wrapChatResponseUsageStream (cognitive 29) console/src/pages/Chat/turnUsage.ts:357 — turnUsage.wrapChatResponseUsageStream has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ResourcePicker.ResourcePicker (cognitive 29) · ×1
  • ResourcePicker.ResourcePicker (cognitive 29) console/src/pages/CommunityFeedback/ResourcePicker.tsx:33 — ResourcePicker.ResourcePicker has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (11 pts), ternaries 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 53, 229, 137, …). 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.ChannelsPage · ×1
  • index.ChannelsPage::submitJob (cognitive 29) console/src/pages/Control/Channels/index.tsx:181 — index.ChannelsPage::submitJob has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, error handling 2 (3 pts), 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 · index.SettingsPanel (cognitive 29) · ×1
  • index.SettingsPanel (cognitive 29) console/src/pages/Hub/index.tsx:1311 — index.SettingsPanel has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 20, ternaries 5 (8 pts), if/else 1 (nesting depth added 3). Of this number, 25 points are the body's own statements and 4 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 · locatorTargets.resolveCreatorLocator (cognitive 29) · ×1
  • locatorTargets.resolveCreatorLocator (cognitive 29) plugins/apps/qwenpaw-creator/ui/src/routing/locatorTargets.ts:4 — locatorTargets.resolveCreatorLocator has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, ternaries 1 (nesting depth added 7). Of this number, 28 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 · build-search-index.parseDoc (cognitive 29) · ×1
  • build-search-index.parseDoc (cognitive 29) website/scripts/build-search-index.mjs:36 — build-search-index.parseDoc has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, ternaries 3 (5 pts), loops 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIImageModel._poll_response (cognitive 28) · ×1
  • OpenAIImageModel._poll_response (cognitive 28) plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:391 — OpenAIImageModel._poll_response has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 6, ternaries 1 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileLocalMediaExecutionService.recover_project (cognitive 28) · ×1
  • FileLocalMediaExecutionService.recover_project (cognitive 28) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4932 — FileLocalMediaExecutionService.recover_project has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (8 pts), boolean chains 6, 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 · AssetFileStore._publish_staged_path_fallback (cognitive 28) · ×1
  • AssetFileStore._publish_staged_path_fallback (cognitive 28) plugins/apps/qwenpaw-creator/backend/services/project_files/assets.py:427 — AssetFileStore._publish_staged_path_fallback has cognitive complexity 28 (threshold 15). Drivers by points: error handling 8 (15 pts), if/else 6 (9 pts), boolean chains 4 (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 · edit_impact._rebind_motion_copy (cognitive 28) · ×1
  • edit_impact._rebind_motion_copy (cognitive 28) plugins/apps/qwenpaw-creator/backend/services/project_files/edit_impact.py:253 — edit_impact._rebind_motion_copy has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · models._validate_narration_overlap (cognitive 28) · ×1
  • models._validate_narration_overlap (cognitive 28) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:2028 — models._validate_narration_overlap has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 6 (13 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review.review_render (cognitive 28) · ×1
  • review.review_render (cognitive 28) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:551 — review.review_render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 5 (7 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DataBridgeMiddleware._build_clarification_answers (cognitive 28) · ×1
  • DataBridgeMiddleware._build_clarification_answers (cognitive 28) plugins/apps/qwenpaw-data/backend/bridge/middleware.py:399 — DataBridgeMiddleware._build_clarification_answers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (8 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension_setup.extension_install_status (cognitive 28) · ×1
  • extension_setup.extension_install_status (cognitive 28) plugins/bundle/chrome/extension_setup.py:707 — extension_setup.extension_install_status has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (8 pts), error handling 2 (4 pts), ternaries 3 (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 · DingTalkPlatform.health_check (cognitive 28) · ×1
  • DingTalkPlatform.health_check (cognitive 28) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:697 — DingTalkPlatform.health_check has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 4 (8 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LarkOapiPlatform._parse_message_content (cognitive 28) · ×1
  • LarkOapiPlatform._parse_message_content (cognitive 28) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:740 — LarkOapiPlatform._parse_message_content has cognitive complexity 28 (threshold 15). Drivers by points: error handling 3 (8 pts), ternaries 3 (7 pts), if/else 4 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform.send_parts (cognitive 28) · ×1
  • MatrixPlatform.send_parts (cognitive 28) REDACTED:2867 — MatrixPlatform.send_parts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (8 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeComDriver._perform_send (cognitive 28) · ×1
  • WeComDriver._perform_send (cognitive 28) plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:302 — WeComDriver._perform_send has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderer._split_visual_pages (cognitive 28) · ×1
  • renderer._split_visual_pages (cognitive 28) src/qwenpaw/agents/context/visual_compression/rendering/renderer.py:351 — renderer._split_visual_pages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 8, loops 2 (4 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 · fork_project._lock_file_acquire (cognitive 28) · ×1
  • fork_project._lock_file_acquire (cognitive 28) src/qwenpaw/agents/fork_project.py:156 — fork_project._lock_file_acquire has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (19 pts), error handling 3 (6 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fork_project.finalize_fork_for_task (cognitive 28) · ×1
  • fork_project.finalize_fork_for_task (cognitive 28) src/qwenpaw/agents/fork_project.py:1471 — fork_project.finalize_fork_for_task has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_factory._prepare_media_sources (cognitive 28) · ×1
  • model_factory._prepare_media_sources (cognitive 28) src/qwenpaw/agents/model_factory.py:466 — model_factory._prepare_media_sources has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_factory._fix_image_mime_types (cognitive 28) · ×1
  • model_factory._fix_image_mime_types (cognitive 28) src/qwenpaw/agents/model_factory.py:1333 — model_factory._fix_image_mime_types has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts) (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 · view_media.view_image (cognitive 28) · ×1
  • view_media.view_image (cognitive 28) src/qwenpaw/agents/tools/view_media.py:672 — view_media.view_image has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manager.instantiate_channel (cognitive 28) · ×1
  • manager.instantiate_channel (cognitive 28) src/qwenpaw/app/channels/manager.py:340 — manager.instantiate_channel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · console._extract_session_and_payload (cognitive 28) · ×1
  • console._extract_session_and_payload (cognitive 28) src/qwenpaw/app/routers/console.py:295 — console._extract_session_and_payload has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 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 · providers_cmd.configure_provider_api_key_interactive (cognitive 28) · ×1
  • providers_cmd.configure_provider_api_key_interactive (cognitive 28) src/qwenpaw/cli/providers_cmd.py:158 — providers_cmd.configure_provider_api_key_interactive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 7 (8 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mcp_card_builder.build_mcp_driver_card (cognitive 28) · ×1
  • mcp_card_builder.build_mcp_driver_card (cognitive 28) src/qwenpaw/drivers/adapters/mcp_card_builder.py:114 — mcp_card_builder.build_mcp_driver_card has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, loops 3 (4 pts), ternaries 3 (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 · api._bridge_to_runtime (cognitive 28) · ×1
  • api._bridge_to_runtime (cognitive 28) src/qwenpaw/plugins/api.py:162 — api._bridge_to_runtime has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexMigrationProvider._read_sessions (cognitive 28) · ×1
  • CodexMigrationProvider._read_sessions (cognitive 28) src/qwenpaw/portability/providers/codex.py:567 — CodexMigrationProvider._read_sessions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 2 (3 pts), error handling 1 (2 pts) (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 · external_state._qoder_mcp_servers (cognitive 28) · ×1
  • external_state._qoder_mcp_servers (cognitive 28) src/qwenpaw/portability/providers/external_state.py:479 — external_state._qoder_mcp_servers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external_state._qwen_plugin_source (cognitive 28) · ×1
  • external_state._qwen_plugin_source (cognitive 28) src/qwenpaw/portability/providers/external_state.py:688 — external_state._qwen_plugin_source has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qoder_schedules._map_schedule (cognitive 28) · ×1
  • qoder_schedules._map_schedule (cognitive 28) src/qwenpaw/portability/providers/qoder_schedules.py:578 — qoder_schedules._map_schedule has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 2, ternaries 1 (2 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 · dashscope_discovery.fetch_directory (cognitive 28) · ×1
  • dashscope_discovery.fetch_directory (cognitive 28) src/qwenpaw/providers/dashscope_discovery.py:67 — dashscope_discovery.fetch_directory has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · builtin_commands._skill_fallback_handler (cognitive 28) · ×1
  • builtin_commands._skill_fallback_handler (cognitive 28) src/qwenpaw/runtime/builtin_commands.py:757 — builtin_commands._skill_fallback_handler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (3 pts), error handling 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 · ModelCommandHandler._list_models (cognitive 28) · ×1
  • ModelCommandHandler._list_models (cognitive 28) src/qwenpaw/runtime/commands/control/model_handler.py:171 — ModelCommandHandler._list_models has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 2 (6 pts), loops 3 (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 · RuleBasedToolGuardian.guard (cognitive 28) · ×1
  • RuleBasedToolGuardian.guard (cognitive 28) src/qwenpaw/security/tool_guard/guardians/rule_guardian.py:762 — RuleBasedToolGuardian.guard has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolCoordinator._await_next_event (cognitive 28) · ×1
  • ToolCoordinator._await_next_event (cognitive 28) src/qwenpaw/tool_calls/_coordinator.py:655 — ToolCoordinator._await_next_event has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6 (8 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · shell_normalization.normalize_posix_line_continuations (cognitive 28) · ×1
  • shell_normalization.normalize_posix_line_continuations (cognitive 28) src/qwenpaw/utils/shell_normalization.py:20 — shell_normalization.normalize_posix_line_continuations has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSkills.useSkills.loadSkillsForAgent (cognitive 28) · ×1
  • useSkills.useSkills.loadSkillsForAgent (cognitive 28) console/src/pages/Agent/Skills/useSkills.ts:144 — useSkills.useSkills.loadSkillsForAgent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (7 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 9). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityInboxState.CommunityInboxState (cognitive 28) · ×1
  • CommunityInboxState.CommunityInboxState (cognitive 28) console/src/pages/Inbox/components/CommunityInboxState.tsx:13 — CommunityInboxState.CommunityInboxState has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 8, if/else 6 (7 pts), error handling 2 (nesting depth added 5). Of this number, 20 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimelineTracks.TimelineTracks · ×1
  • TimelineTracks.TimelineTracks::renderBlock (cognitive 28) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:735 — TimelineTracks.TimelineTracks::renderBlock has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (19 pts), boolean chains 9 (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. This shape REPEATS in the file: one other method here (TimelineTracks.TimelineTracks) 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 · RelatedAssetPicker.RelatedAssetPicker (cognitive 28) · ×1
  • RelatedAssetPicker.RelatedAssetPicker (cognitive 28) plugins/apps/qwenpaw-creator/ui/src/components/workbench/RelatedAssetPicker.tsx:22 — RelatedAssetPicker.RelatedAssetPicker has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 5 (7 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 159, a function literal at line 65, a function literal at line 42, …). 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 · agentProgressModel.operationLocator (cognitive 28) · ×1
  • agentProgressModel.operationLocator (cognitive 28) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:188 — agentProgressModel.operationLocator has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 7 (10 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · engine.applyStep (cognitive 28) · ×1
  • engine.applyStep (cognitive 28) src/qwenpaw/browser/control_link/injected/engine.js:164 — engine.applyStep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 4). Of this number, 21 points are the body's own statements and 7 belong to 5 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 · file_script_routes._read_script_payload (cognitive 27) · ×1
  • file_script_routes._read_script_payload (cognitive 27) plugins/apps/qwenpaw-creator/backend/api/file_script_routes.py:102 — file_script_routes._read_script_payload has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · asr_model._fun_asr (cognitive 27) · ×1
  • asr_model._fun_asr (cognitive 27) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:270 — asr_model._fun_asr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, loops 2 (4 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 · FileCreatorAgentRuntime._start_attached_source_understanding (cognitive 27) · ×1
  • FileCreatorAgentRuntime._start_attached_source_understanding (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3130 — FileCreatorAgentRuntime._start_attached_source_understanding has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 3 (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 · work_scheduler._review_scope (cognitive 27) · ×1
  • work_scheduler._review_scope (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:172 — work_scheduler._review_scope has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workgraph_execution.ready_request_context (cognitive 27) · ×1
  • workgraph_execution.ready_request_context (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:594 — workgraph_execution.ready_request_context has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, error handling 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · element_adapter.reconcile_candidate_span (cognitive 27) · ×1
  • element_adapter.reconcile_candidate_span (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/media_files/element_adapter.py:101 — element_adapter.reconcile_candidate_span has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auto_snapshot._remap_snapshot_elements (cognitive 27) · ×1
  • auto_snapshot._remap_snapshot_elements (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/project_files/auto_snapshot.py:100 — auto_snapshot._remap_snapshot_elements has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (5 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 · migrations._migrate_v4_drop_overlay_kind (cognitive 27) · ×1
  • migrations._migrate_v4_drop_overlay_kind (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:307 — migrations._migrate_v4_drop_overlay_kind has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (5 pts), boolean chains 1, ternaries 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 · model_view.project_snapshot_view (cognitive 27) · ×1
  • model_view.project_snapshot_view (cognitive 27) plugins/apps/qwenpaw-creator/backend/services/project_files/model_view.py:96 — model_view.project_snapshot_view has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 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 · ComputerUseClient.execute (cognitive 27) · ×1
  • ComputerUseClient.execute (cognitive 27) plugins/bundle/computer-use/computer_use/client.py:125 — ComputerUseClient.execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 2 (4 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkTransport._send_media_part_via_open_api (cognitive 27) · ×1
  • DingTalkTransport._send_media_part_via_open_api (cognitive 27) REDACTED:641 — DingTalkTransport._send_media_part_via_open_api has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 10, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · utils._extract_post_keys (cognitive 27) · ×1
  • utils._extract_post_keys (cognitive 27) plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:251 — utils._extract_post_keys has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMessagePlatform._send_parts (cognitive 27) · ×1
  • IMessagePlatform._send_parts (cognitive 27) plugins/channel/imessage/qwenpaw_channel_imessage/platform.py:274 — IMessagePlatform._send_parts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 3 (5 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixStateStore._migrate_previous_state (cognitive 27) · ×1
  • MatrixStateStore._migrate_previous_state (cognitive 27) plugins/channel/matrix/qwenpaw_channel_matrix/state.py:279 — MatrixStateStore._migrate_previous_state has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 4 (6 pts), boolean chains 2, ternaries 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 · YuanbaoPlatform.send_parts (cognitive 27) · ×1
  • YuanbaoPlatform.send_parts (cognitive 27) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:1070 — YuanbaoPlatform.send_parts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3 (5 pts), ternaries 4 (5 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 · recall_tool._recall_tool_media (cognitive 27) · ×1
  • recall_tool._recall_tool_media (cognitive 27) src/qwenpaw/agents/context/scroll/recall_tool.py:365 — recall_tool._recall_tool_media has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fork_project.register_fork (cognitive 27) · ×1
  • fork_project.register_fork (cognitive 27) src/qwenpaw/agents/fork_project.py:687 — fork_project.register_fork has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, loops 1 (2 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 · model_factory._substitute_video_blocks (cognitive 27) · ×1
  • model_factory._substitute_video_blocks (cognitive 27) src/qwenpaw/agents/model_factory.py:1088 — model_factory._substitute_video_blocks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillPoolService._check_download_conflict (cognitive 27) · ×1
  • SkillPoolService._check_download_conflict (cognitive 27) src/qwenpaw/agents/skill_system/pool_service.py:982 — SkillPoolService._check_download_conflict has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 9, error handling 1 (4 pts) (nesting depth added 11). 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 · registry.auto_update_builtin_skills (cognitive 27) · ×1
  • registry.auto_update_builtin_skills (cognitive 27) src/qwenpaw/agents/skill_system/registry.py:1753 — registry.auto_update_builtin_skills has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedQueueManager._cleanup_idle_queues (cognitive 27) · ×1
  • UnifiedQueueManager._cleanup_idle_queues (cognitive 27) src/qwenpaw/app/channels/unified_queue_manager.py:502 — UnifiedQueueManager._cleanup_idle_queues has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 3 (8 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MailMonitorService._drain_approved_replay (cognitive 27) · ×1
  • MailMonitorService._drain_approved_replay (cognitive 27) REDACTED:2550 — MailMonitorService._drain_approved_replay has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agents.update_agent (cognitive 27) · ×1
  • agents.update_agent (cognitive 27) src/qwenpaw/app/routers/agents.py:1209 — agents.update_agent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, error handling 3 (5 pts), ternaries 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · desktop_cmd.desktop_cmd (cognitive 27) · ×1
  • desktop_cmd.desktop_cmd (cognitive 27) REDACTED:232 — desktop_cmd.desktop_cmd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), error handling 3 (4 pts), boolean chains 3, ternaries 3 (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 · utils._load_and_validate_config (cognitive 27) · ×1
  • utils._load_and_validate_config (cognitive 27) src/qwenpaw/config/utils.py:563 — utils._load_and_validate_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 3 (5 pts), loops 1 (2 pts), ternaries 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 · contracts._validate_value_source_bindings (cognitive 27) · ×1
  • contracts._validate_value_source_bindings (cognitive 27) src/qwenpaw/drivers/contracts.py:256 — contracts._validate_value_source_bindings has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (21 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 · _MCPClientMixin._run_lifecycle (cognitive 27) · ×1
  • _MCPClientMixin._run_lifecycle (cognitive 27) src/qwenpaw/drivers/handlers/mcp_stateful_client.py:222 — _MCPClientMixin._run_lifecycle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 4 (11 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClawHubProvider._browse (cognitive 27) · ×1
  • ClawHubProvider._browse (cognitive 27) src/qwenpaw/market/providers/clawhub.py:82 — ClawHubProvider._browse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PawApp.register (cognitive 27) · ×1
  • PawApp.register (cognitive 27) src/qwenpaw/pawapp/app.py:858 — PawApp.register has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 11, boolean chains 4, ternaries 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent 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 · ChatReply.text (cognitive 27) · ×1
  • ChatReply.text (cognitive 27) src/qwenpaw/pawapp/context.py:752 — ChatReply.text has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4, 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 · DependencyRegistry.action (cognitive 27) · ×1
  • DependencyRegistry.action (cognitive 27) src/qwenpaw/pawapp/dependency.py:380 — DependencyRegistry.action has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (6 pts), boolean chains 3, error handling 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 · dependency_transaction._verify_publication_scope (cognitive 27) · ×1
  • dependency_transaction._verify_publication_scope (cognitive 27) src/qwenpaw/plugins/dependency_transaction.py:721 — dependency_transaction._verify_publication_scope has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · download_catalog._build_remote_plugin_catalog (cognitive 27) · ×1
  • download_catalog._build_remote_plugin_catalog (cognitive 27) REDACTED:201 — download_catalog._build_remote_plugin_catalog has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 11, error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · legacy_cloudpaw.remember (cognitive 27) · ×1
  • legacy_cloudpaw.remember (cognitive 27) src/qwenpaw/plugins/legacy_cloudpaw.py:134 — legacy_cloudpaw.remember has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (7 pts), boolean chains 5, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader._cleanup_plugin_tools (cognitive 27) · ×1
  • PluginLoader._cleanup_plugin_tools (cognitive 27) src/qwenpaw/plugins/loader.py:4732 — PluginLoader._cleanup_plugin_tools has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (5 pts), boolean chains 3, error handling 2 (3 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · official_channels.prepare_channel_upgrade (cognitive 27) · ×1
  • official_channels.prepare_channel_upgrade (cognitive 27) src/qwenpaw/plugins/official_channels.py:269 — official_channels.prepare_channel_upgrade has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external_state.discover_codex_memory (cognitive 27) · ×1
  • external_state.discover_codex_memory (cognitive 27) src/qwenpaw/portability/providers/external_state.py:134 — external_state.discover_codex_memory has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, loops 3 (4 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 · WireProtocol._anthropic_input (cognitive 27) · ×1
  • WireProtocol._anthropic_input (cognitive 27) src/qwenpaw/providers/adapters/wire_protocol.py:202 — WireProtocol._anthropic_input has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openai_chat_model_compat._sanitize_nullable_schemas (cognitive 27) · ×1
  • openai_chat_model_compat._sanitize_nullable_schemas (cognitive 27) src/qwenpaw/providers/openai_chat_model_compat.py:445 — openai_chat_model_compat._sanitize_nullable_schemas has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Provider.update_config (cognitive 27) · ×1
  • Provider.update_config (cognitive 27) src/qwenpaw/providers/provider.py:627 — Provider.update_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 10, loops 1 (2 pts), ternaries 1 (2 pts) (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 · RetryChatModel._wrap_stream (cognitive 27) · ×1
  • RetryChatModel._wrap_stream (cognitive 27) src/qwenpaw/providers/retry_chat_model.py:1081 — RetryChatModel._wrap_stream has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · project_directory.resolve_effective_project_dirs (cognitive 27) · ×1
  • project_directory.resolve_effective_project_dirs (cognitive 27) src/qwenpaw/services/project_directory.py:490 — project_directory.resolve_effective_project_dirs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 4 (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 · index.SessionGroupHeader (cognitive 27) · ×1
  • index.SessionGroupHeader (cognitive 27) console/src/components/SessionGroupHeader/index.tsx:34 — index.SessionGroupHeader has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 8, if/else 5 (6 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.CloneTab · ×1
  • index.CloneTab::handleClone (cognitive 27) console/src/components/ProjectSelectModal/index.tsx:105 — index.CloneTab::handleClone has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (5 pts), error handling 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportHubModal.ImportHubModal (cognitive 27) · ×1
  • ImportHubModal.ImportHubModal (cognitive 27) console/src/pages/Agent/Skills/components/ImportHubModal.tsx:66 — ImportHubModal.ImportHubModal has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 9, if/else 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DraftLibrary.DraftLibrary (cognitive 27) · ×1
  • DraftLibrary.DraftLibrary (cognitive 27) console/src/pages/CommunityFeedback/DraftLibrary.tsx:12 — DraftLibrary.DraftLibrary has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (11 pts), error handling 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 36, remove, importLegacy, …). 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 · useInboxData.mapEventToPushMessage (cognitive 27) · ×1
  • useInboxData.mapEventToPushMessage (cognitive 27) console/src/pages/Inbox/hooks/useInboxData.ts:173 — useInboxData.mapEventToPushMessage has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 9, if/else 3 (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 · index.AgentStatsPage (cognitive 27) · ×1
  • index.AgentStatsPage (cognitive 27) console/src/pages/Settings/AgentStats/index.tsx:107 — index.AgentStatsPage has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (9 pts), if/else 5, error handling 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AgentModal.AgentModal (cognitive 27) · ×1
  • AgentModal.AgentModal (cognitive 27) console/src/pages/Settings/Agents/components/AgentModal.tsx:81 — AgentModal.AgentModal has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 16, if/else 9, ternaries 2. Of this number, 15 points are the body's own statements and 12 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 · GeneralSettings.GeneralSettings (cognitive 27) · ×1
  • GeneralSettings.GeneralSettings (cognitive 27) console/src/pages/SettingsCenter/GeneralSettings.tsx:118 — GeneralSettings.GeneralSettings has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 7 (8 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 464, changeCloseBehavior, a function literal at line 121, …). 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 · agentProgressModel.buildAgentProgressModel.groupFor (cognitive 27) · ×1
  • agentProgressModel.buildAgentProgressModel.groupFor (cognitive 27) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:309 — agentProgressModel.buildAgentProgressModel.groupFor has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (25 pts), boolean chains 1, if/else 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workGraphStore.useWorkGraphStore (cognitive 27) · ×1
  • workGraphStore.useWorkGraphStore (cognitive 27) plugins/apps/qwenpaw-creator/ui/src/store/workGraphStore.ts:32 — workGraphStore.useWorkGraphStore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, error handling 3, ternaries 1 (nesting depth added 5). None of this is in the body itself: all 27 points belong to 6 function literals inside it that branch (lines 90, 39, 66, …). 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 · server.coerce_str_list (cognitive 26) · ×1
  • server.coerce_str_list (cognitive 26) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/server.py:45 — server.coerce_str_list has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 13). 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 · WorkGraph.model_required_nodes (cognitive 26) · ×1
  • WorkGraph.model_required_nodes (cognitive 26) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:242 — WorkGraph.model_required_nodes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_execution._image_authoring_fingerprint (cognitive 26) · ×1
  • image_execution._image_authoring_fingerprint (cognitive 26) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1700 — image_execution._image_authoring_fingerprint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 6 (12 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PromptSyncService.propose (cognitive 26) · ×1
  • PromptSyncService.propose (cognitive 26) plugins/apps/qwenpaw-creator/backend/services/prompt_sync_service.py:362 — PromptSyncService.propose has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8, ternaries 3, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · media_review._derive_plan_context (cognitive 26) · ×1
  • media_review._derive_plan_context (cognitive 26) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:251 — media_review._derive_plan_context has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, ternaries 2 (4 pts), loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adapters._normalize_dashscope_web_search_sources (cognitive 26) · ×1
  • adapters._normalize_dashscope_web_search_sources (cognitive 26) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:422 — adapters._normalize_dashscope_web_search_sources has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · middleware.parse_option_numbers (cognitive 26) · ×1
  • middleware.parse_option_numbers (cognitive 26) plugins/apps/qwenpaw-data/backend/bridge/middleware.py:47 — middleware.parse_option_numbers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (9 pts), boolean chains 6 (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 · windows_pipe._run_io (cognitive 26) · ×1
  • windows_pipe._run_io (cognitive 26) plugins/bundle/computer-use/computer_use/transport/windows_pipe.py:473 — windows_pipe._run_io has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MQTTPlatform._reconnect (cognitive 26) · ×1
  • MQTTPlatform._reconnect (cognitive 26) plugins/channel/mqtt/qwenpaw_channel_mqtt/platform.py:158 — MQTTPlatform._reconnect has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils._format_table (cognitive 26) · ×1
  • utils._format_table (cognitive 26) plugins/channel/wecom/qwenpaw_channel_wecom/utils.py:67 — utils._format_table has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (5 pts), ternaries 2 (5 pts), boolean chains 4 (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 · discovery.resolve_codex_binary_info (cognitive 26) · ×1
  • discovery.resolve_codex_binary_info (cognitive 26) plugins/harness/codex/discovery.py:90 — discovery.resolve_codex_binary_info has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wan27_tool.image_to_video_wan (cognitive 26) · ×1
  • wan27_tool.image_to_video_wan (cognitive 26) plugins/tool/wan27/wan27_tool.py:390 — wan27_tool.image_to_video_wan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 3 (6 pts), ternaries 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommandHandler._process_compact (cognitive 26) · ×1
  • CommandHandler._process_compact (cognitive 26) src/qwenpaw/agents/command_handler.py:384 — CommandHandler._process_compact has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 5 (7 pts), error handling 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, 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 · precision._extract_page (cognitive 26) · ×1
  • precision._extract_page (cognitive 26) src/qwenpaw/agents/context/visual_compression/pipeline/precision.py:161 — precision._extract_page has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 2 (8 pts), loops 3 (6 pts) (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 · reme_inbox.build_payload (cognitive 26) · ×1
  • reme_inbox.build_payload (cognitive 26) src/qwenpaw/agents/memory/reme_inbox.py:88 — reme_inbox.build_payload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_factory._resize_base64_images (cognitive 26) · ×1
  • model_factory._resize_base64_images (cognitive 26) src/qwenpaw/agents/model_factory.py:566 — model_factory._resize_base64_images has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view_media._download_remote_image (cognitive 26) · ×1
  • view_media._download_remote_image (cognitive 26) src/qwenpaw/agents/tools/view_media.py:237 — view_media._download_remote_image has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 4 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monitor._final_text_from_delta (cognitive 26) · ×1
  • monitor._final_text_from_delta (cognitive 26) REDACTED:757 — monitor._final_text_from_delta has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monitor.wake_agent_for_mail (cognitive 26) · ×1
  • monitor.wake_agent_for_mail (cognitive 26) REDACTED:930 — monitor.wake_agent_for_mail has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (10 pts), boolean chains 2, error handling 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 · worker.execute_request (cognitive 26) · ×1
  • worker.execute_request (cognitive 26) REDACTED:617 — worker.execute_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 9 (11 pts), boolean chains 2, ternaries 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 · render.render_timeline (cognitive 26) · ×1
  • render.render_timeline (cognitive 26) src/qwenpaw/checkpoints/render.py:12 — render.render_timeline has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (8 pts), loops 3 (5 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 · doctor_connectivity._managed_connectivity_notes (cognitive 26) · ×1
  • doctor_connectivity._managed_connectivity_notes (cognitive 26) src/qwenpaw/cli/doctor_connectivity.py:275 — doctor_connectivity._managed_connectivity_notes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 3 (5 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 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 · contextvars_hook._resolve_turn_project_dirs (cognitive 26) · ×1
  • contextvars_hook._resolve_turn_project_dirs (cognitive 26) src/qwenpaw/hooks/request_setup/contextvars_hook.py:254 — contextvars_hook._resolve_turn_project_dirs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelGateway._stream (cognitive 26) · ×1
  • ModelGateway._stream (cognitive 26) src/qwenpaw/hub/model_service/gateway.py:341 — ModelGateway._stream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 2, error handling 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _messages._from_block (cognitive 26) · ×1
  • _messages._from_block (cognitive 26) src/qwenpaw/plugins/_messages.py:268 — _messages._from_block has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 7, boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api._unbridge_from_runtime (cognitive 26) · ×1
  • api._unbridge_from_runtime (cognitive 26) src/qwenpaw/plugins/api.py:258 — api._unbridge_from_runtime has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (5 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyGate.evaluate (cognitive 26) · ×1
  • DependencyGate.evaluate (cognitive 26) src/qwenpaw/plugins/dependency_gate.py:203 — DependencyGate.evaluate has cognitive complexity 26 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 5 (7 pts), ternaries 3 (6 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_transaction.verify_payload (cognitive 26) · ×1
  • dependency_transaction.verify_payload (cognitive 26) src/qwenpaw/plugins/dependency_transaction.py:663 — dependency_transaction.verify_payload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_transaction.rollback (cognitive 26) · ×1
  • dependency_transaction.rollback (cognitive 26) src/qwenpaw/plugins/dependency_transaction.py:977 — dependency_transaction.rollback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (8 pts), error handling 1 (3 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 · ModelService.stream (cognitive 26) · ×1
  • ModelService.stream (cognitive 26) src/qwenpaw/plugins/models.py:63 — ModelService.stream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 3 (5 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WireProtocol._responses_input (cognitive 26) · ×1
  • WireProtocol._responses_input (cognitive 26) src/qwenpaw/providers/adapters/wire_protocol.py:147 — WireProtocol._responses_input has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), ternaries 1 (6 pts) (nesting depth added 17). 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 · Provider._build_info (cognitive 26) · ×1
  • Provider._build_info (cognitive 26) src/qwenpaw/providers/provider.py:1510 — Provider._build_info has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 10, ternaries 4, 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 · AgentBuilder._build_request_context (cognitive 26) · ×1
  • AgentBuilder._build_request_context (cognitive 26) src/qwenpaw/runtime/builder.py:718 — AgentBuilder._build_request_context has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 10, ternaries 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · console_turn_state.repair_invalid_history_images (cognitive 26) · ×1
  • console_turn_state.repair_invalid_history_images (cognitive 26) src/qwenpaw/runtime/console_turn_state.py:16 — console_turn_state.repair_invalid_history_images has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenUsageManager._query (cognitive 26) · ×1
  • TokenUsageManager._query (cognitive 26) src/qwenpaw/token_usage/manager.py:187 — TokenUsageManager._query has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.extractUrlFromResultBlocks (cognitive 26) · ×1
  • utils.extractUrlFromResultBlocks (cognitive 26) REDACTED:161 — utils.extractUrlFromResultBlocks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FilesNavigator.FilesNavigator (cognitive 26) · ×1
  • FilesNavigator.FilesNavigator (cognitive 26) console/src/features/files-workspace/FilesNavigator.tsx:511 — FilesNavigator.FilesNavigator has cognitive complexity 26 (threshold 15). Drivers by points: if/else 55 (69 pts), boolean chains 39, ternaries 24 (26 pts), error handling 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (FilesNavigator.FilesNavigator::handleTreeKeyDown) 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 · Discussion.AnswerCard (cognitive 26) · ×1
  • Discussion.AnswerCard (cognitive 26) console/src/pages/Market/Community/Discussion.tsx:837 — Discussion.AnswerCard has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 16, if/else 4, error handling 3, ternaries 3. Of this number, 13 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BlueprintPage.BlueprintPage (cognitive 26) · ×1
  • BlueprintPage.BlueprintPage (cognitive 26) plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintPage.tsx:39 — BlueprintPage.BlueprintPage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 9, if/else 6 (7 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 8 belong to 5 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 · locators.navigateToLocator (cognitive 26) · ×1
  • locators.navigateToLocator (cognitive 26) plugins/apps/qwenpaw-creator/ui/src/routing/locators.ts:46 — locators.navigateToLocator has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 20 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · file_asset_routes.ingest_asset (cognitive 25) · ×1
  • file_asset_routes.ingest_asset (cognitive 25) plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:1625 — file_asset_routes.ingest_asset has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, 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 · base.format_http_error_detail (cognitive 25) · ×1
  • base.format_http_error_detail (cognitive 25) REDACTED:454 — base.format_http_error_detail has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · video_capabilities._family_constraint_guidance (cognitive 25) · ×1
  • video_capabilities._family_constraint_guidance (cognitive 25) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1214 — video_capabilities._family_constraint_guidance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 2, ternaries 1 (2 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 · motion_overlay._verify_captured_frames (cognitive 25) · ×1
  • motion_overlay._verify_captured_frames (cognitive 25) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1084 — motion_overlay._verify_captured_frames has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreatorFileServices._auto_continue_storyboard_videos (cognitive 25) · ×1
  • CreatorFileServices._auto_continue_storyboard_videos (cognitive 25) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:409 — CreatorFileServices._auto_continue_storyboard_videos has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._assert_no_other_active_decision (cognitive 25) · ×1
  • ProjectReviewService._assert_no_other_active_decision (cognitive 25) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1164 — ProjectReviewService._assert_no_other_active_decision has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._rejection_changes (cognitive 25) · ×1
  • ProjectReviewService._rejection_changes (cognitive 25) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1603 — ProjectReviewService._rejection_changes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkPlatform._cleanup (cognitive 25) · ×1
  • DingTalkPlatform._cleanup (cognitive 25) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:200 — DingTalkPlatform._cleanup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (4 pts), boolean chains 3, loops 2, ternaries 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 · DingTalkPlatform._stream_ai_card (cognitive 25) · ×1
  • DingTalkPlatform._stream_ai_card (cognitive 25) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/platform.py:1087 — DingTalkPlatform._stream_ai_card has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 3 (5 pts), boolean chains 4, ternaries 1 (2 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 · DiscordDriver._perform_send (cognitive 25) · ×1
  • DiscordDriver._perform_send (cognitive 25) plugins/channel/discord/qwenpaw_channel_discord/driver.py:149 — DiscordDriver._perform_send has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMessagePlatform.stop (cognitive 25) · ×1
  • IMessagePlatform.stop (cognitive 25) plugins/channel/imessage/qwenpaw_channel_imessage/platform.py:331 — IMessagePlatform.stop has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform.stop (cognitive 25) · ×1
  • MatrixPlatform.stop (cognitive 25) REDACTED:370 — MatrixPlatform.stop has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 4 (9 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemorySpace._file_line_matches (cognitive 25) · ×1
  • MemorySpace._file_line_matches (cognitive 25) src/qwenpaw/agents/context/scroll/memoryspace.py:1845 — MemorySpace._file_line_matches has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serialize.strip_headline_delta (cognitive 25) · ×1
  • serialize.strip_headline_delta (cognitive 25) src/qwenpaw/agents/context/scroll/serialize.py:100 — serialize.strip_headline_delta has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · message_request_normalizer._clean_provider_specific_fields (cognitive 25) · ×1
  • message_request_normalizer._clean_provider_specific_fields (cognitive 25) src/qwenpaw/agents/utils/message_request_normalizer.py:171 — message_request_normalizer._clean_provider_specific_fields has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), error handling 1 (5 pts), ternaries 2 (4 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 · tool_message_utils._remove_unpaired_tool_messages (cognitive 25) · ×1
  • tool_message_utils._remove_unpaired_tool_messages (cognitive 25) src/qwenpaw/agents/utils/tool_message_utils.py:179 — tool_message_utils._remove_unpaired_tool_messages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseChannel.send_content_parts (cognitive 25) · ×1
  • BaseChannel.send_content_parts (cognitive 25) src/qwenpaw/app/channels/base.py:2237 — BaseChannel.send_content_parts has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (6 pts), loops 3, ternaries 2 (3 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 · ChannelIngressService.drain (cognitive 25) · ×1
  • ChannelIngressService.drain (cognitive 25) src/qwenpaw/app/channels/ingress.py:909 — ChannelIngressService.drain has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 2 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelManager._start_one_unlocked (cognitive 25) · ×1
  • ChannelManager._start_one_unlocked (cognitive 25) src/qwenpaw/app/channels/manager.py:1604 — ChannelManager._start_one_unlocked has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · community_connection.normalize_message (cognitive 25) · ×1
  • community_connection.normalize_message (cognitive 25) src/qwenpaw/app/community_connection.py:168 — community_connection.normalize_message has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12, boolean chains 9, if/else 4. 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 · MailAccessControlStore.approve_many (cognitive 25) · ×1
  • MailAccessControlStore.approve_many (cognitive 25) src/qwenpaw/app/mail/mail_access_control.py:655 — MailAccessControlStore.approve_many has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migration._do_migrate_legacy_workspace (cognitive 25) · ×1
  • migration._do_migrate_legacy_workspace (cognitive 25) src/qwenpaw/app/migration.py:82 — migration._do_migrate_legacy_workspace has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 8, boolean chains 4, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · console.get_inbox_events (cognitive 25) · ×1
  • console.get_inbox_events (cognitive 25) src/qwenpaw/app/routers/console.py:819 — console.get_inbox_events has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 9, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · facade._render_method (cognitive 25) · ×1
  • facade._render_method (cognitive 25) src/qwenpaw/browser/sdk/facade.py:206 — facade._render_method has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 5 (8 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SharedResponseDriver._cleanup_effects (cognitive 25) · ×1
  • SharedResponseDriver._cleanup_effects (cognitive 25) src/qwenpaw/channel_protocol/shared_response_driver.py:1055 — SharedResponseDriver._cleanup_effects has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · providers_cmd._select_llm_model (cognitive 25) · ×1
  • providers_cmd._select_llm_model (cognitive 25) src/qwenpaw/cli/providers_cmd.py:346 — providers_cmd._select_llm_model has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (6 pts), boolean chains 3 (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 · config.save_agent_config (cognitive 25) · ×1
  • config.save_agent_config (cognitive 25) src/qwenpaw/config/config.py:3973 — config.save_agent_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 5 (9 pts), boolean chains 5 (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 · PluginLoader.repair_dependencies (cognitive 25) · ×1
  • PluginLoader.repair_dependencies (cognitive 25) src/qwenpaw/plugins/loader.py:4244 — PluginLoader.repair_dependencies has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, 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 · module_isolation.probe_plugin_source (cognitive 25) · ×1
  • module_isolation.probe_plugin_source (cognitive 25) src/qwenpaw/plugins/module_isolation.py:590 — module_isolation.probe_plugin_source has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 3 (4 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 · PythonBackend.prepare (cognitive 25) · ×1
  • PythonBackend.prepare (cognitive 25) src/qwenpaw/plugins/python_backend.py:340 — PythonBackend.prepare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qoder_sessions.discover_qoder_transcripts (cognitive 25) · ×1
  • qoder_sessions.discover_qoder_transcripts (cognitive 25) src/qwenpaw/portability/providers/qoder_sessions.py:112 — qoder_sessions.discover_qoder_transcripts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 pts), boolean chains 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_metadata.model_metadata (cognitive 25) · ×1
  • model_metadata.model_metadata (cognitive 25) src/qwenpaw/providers/model_metadata.py:22 — model_metadata.model_metadata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 2 (8 pts), boolean chains 6, loops 3 (6 pts), ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SanitizedStream._capture_extra_content (cognitive 25) · ×1
  • _SanitizedStream._capture_extra_content (cognitive 25) src/qwenpaw/providers/openai_chat_model_compat.py:212 — _SanitizedStream._capture_extra_content has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 4, loops 2 (3 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 · retry_chat_model._enable_reasoning_content_fallback (cognitive 25) · ×1
  • retry_chat_model._enable_reasoning_content_fallback (cognitive 25) src/qwenpaw/providers/retry_chat_model.py:237 — retry_chat_model._enable_reasoning_content_fallback has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thinking.model_default_thinking (cognitive 25) · ×1
  • thinking.model_default_thinking (cognitive 25) src/qwenpaw/providers/thinking.py:135 — thinking.model_default_thinking has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12 (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 · AgentBuilder._build_env_context (cognitive 25) · ×1
  • AgentBuilder._build_env_context (cognitive 25) src/qwenpaw/runtime/builder.py:883 — AgentBuilder._build_env_context has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 6 (9 pts), boolean chains 4 (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 · useChannels.useChannels.fetchChannels (cognitive 25) · ×1
  • useChannels.useChannels.fetchChannels (cognitive 25) console/src/pages/Control/Channels/useChannels.ts:26 — useChannels.useChannels.fetchChannels has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 7 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 · useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus (cognitive 25) · ×1
  • useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus (cognitive 25) console/src/pages/Agent/Config/useReMeRuntimeStatus.ts:30 — useReMeRuntimeStatus.useReMeRuntimeStatus.checkMemoryStatus has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, ternaries 1 (3 pts), error handling 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 · FilesNavigator.FilesNavigator · ×1
  • FilesNavigator.FilesNavigator::handleTreeKeyDown (cognitive 25) console/src/features/files-workspace/FilesNavigator.tsx:1018 — FilesNavigator.FilesNavigator::handleTreeKeyDown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FilesNavigator.FilesNavigator) 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 · ResponseArtifactList.mergeArtifactToolMessages (cognitive 25) · ×1
  • ResponseArtifactList.mergeArtifactToolMessages (cognitive 25) console/src/features/files-workspace/ResponseArtifactList.tsx:88 — ResponseArtifactList.mergeArtifactToolMessages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (8 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.ModelSelector (cognitive 25) · ×1
  • index.ModelSelector (cognitive 25) console/src/pages/Chat/ModelSelector/index.tsx:107 — index.ModelSelector has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 71, if/else 48 (55 pts), ternaries 24 (34 pts), error handling 4 (5 pts), loops 1 (nesting depth added 18). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (index.ModelSelector::renderProviderModels, index.ModelSelector::renderProTab) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · useSkillsPage.useSkillsPage.handleConfirmImport (cognitive 25) · ×1
  • useSkillsPage.useSkillsPage.handleConfirmImport (cognitive 25) console/src/pages/Agent/Skills/useSkillsPage.tsx:384 — useSkillsPage.useSkillsPage.handleConfirmImport has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4 (nesting depth added 12). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ProviderCredentialField.ProviderCredentialField (cognitive 25) · ×1
  • ProviderCredentialField.ProviderCredentialField (cognitive 25) console/src/pages/Settings/Models/components/cards/ProviderCredentialField.tsx:10 — ProviderCredentialField.ProviderCredentialField has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 4 (6 pts), boolean chains 1, error handling 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 9 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 · timelines.restoreSnapshotOperations (cognitive 25) · ×1
  • timelines.restoreSnapshotOperations (cognitive 25) plugins/apps/qwenpaw-creator/ui/src/api/creator/timelines.ts:407 — timelines.restoreSnapshotOperations has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), ternaries 3, boolean chains 2 (nesting depth added 10). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecutionAuthorizationCard.ExecutionAuthorizationCard (cognitive 25) · ×1
  • ExecutionAuthorizationCard.ExecutionAuthorizationCard (cognitive 25) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:292 — ExecutionAuthorizationCard.ExecutionAuthorizationCard has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 26, if/else 10 (15 pts), ternaries 10, error handling 3 (nesting depth added 5). 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 (ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun) 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 · AgentDock.ConversationMessage (cognitive 25) · ×1
  • AgentDock.ConversationMessage (cognitive 25) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:448 — AgentDock.ConversationMessage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, ternaries 6 (8 pts), if/else 4 (nesting depth added 2). Of this number, 22 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AgentEventFeed.AgentEventFeed (cognitive 25) · ×1
  • AgentEventFeed.AgentEventFeed (cognitive 25) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:320 — AgentEventFeed.AgentEventFeed has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, if/else 5, error handling 2, ternaries 1. Of this number, 13 points are the body's own statements and 12 belong to 8 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 · creatorPresentation.creatorWorkNodeLabel (cognitive 25) · ×1
  • creatorPresentation.creatorWorkNodeLabel (cognitive 25) plugins/apps/qwenpaw-creator/ui/src/lib/creatorPresentation.ts:333 — creatorPresentation.creatorWorkNodeLabel has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 11). 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 · creatorMessagePresentation.jsonObjectPrefix (cognitive 25) · ×1
  • creatorMessagePresentation.jsonObjectPrefix (cognitive 25) REDACTED:278 — creatorMessagePresentation.jsonObjectPrefix has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (4 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file_asset_routes._ingest_many_locked (cognitive 24) · ×1
  • file_asset_routes._ingest_many_locked (cognitive 24) plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:485 — file_asset_routes._ingest_many_locked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceMemoryService._execute (cognitive 24) · ×1
  • SourceMemoryService._execute (cognitive 24) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:967 — SourceMemoryService._execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, loops 3 (5 pts), error handling 1, ternaries 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, 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 · FfmpegLocalMediaRunner._snap_transitions_to_beats (cognitive 24) · ×1
  • FfmpegLocalMediaRunner._snap_transitions_to_beats (cognitive 24) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:538 — FfmpegLocalMediaRunner._snap_transitions_to_beats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, error handling 2, loops 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rough_cut.collect_rough_cut_clips (cognitive 24) · ×1
  • rough_cut.collect_rough_cut_clips (cognitive 24) plugins/apps/qwenpaw-creator/backend/services/media_files/rough_cut.py:43 — rough_cut.collect_rough_cut_clips has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 6 (9 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_scratch.release_orphaned_scratch (cognitive 24) · ×1
  • task_scratch.release_orphaned_scratch (cognitive 24) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:621 — task_scratch.release_orphaned_scratch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentProjectTools.read_project_page (cognitive 24) · ×1
  • AgentProjectTools.read_project_page (cognitive 24) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1002 — AgentProjectTools.read_project_page has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dispatch._sequence_steps (cognitive 24) · ×1
  • dispatch._sequence_steps (cognitive 24) plugins/bundle/computer-use/computer_use/dispatch.py:82 — dispatch._sequence_steps has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · patch_runner._classify_event (cognitive 24) · ×1
  • patch_runner._classify_event (cognitive 24) plugins/bundle/qwenpaw-pet/patch_runner.py:62 — patch_runner._classify_event has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 8, ternaries 4 (5 pts) (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 · DingTalkChannelHandler._parse_rich_content (cognitive 24) · ×1
  • DingTalkChannelHandler._parse_rich_content (cognitive 24) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:154 — DingTalkChannelHandler._parse_rich_content has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, error handling 1, loops 1, ternaries 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 · formatting.chunk_text (cognitive 24) · ×1
  • formatting.chunk_text (cognitive 24) plugins/channel/discord/qwenpaw_channel_discord/formatting.py:32 — formatting.chunk_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeishuDriver._target (cognitive 24) · ×1
  • FeishuDriver._target (cognitive 24) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:184 — FeishuDriver._target has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QQMedia.send (cognitive 24) · ×1
  • QQMedia.send (cognitive 24) plugins/channel/qq/qwenpaw_channel_qq/media.py:217 — QQMedia.send has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, ternaries 2, error handling 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, 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 · QQPlatform._stop_owned (cognitive 24) · ×1
  • QQPlatform._stop_owned (cognitive 24) plugins/channel/qq/qwenpaw_channel_qq/platform.py:1209 — QQPlatform._stop_owned has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 2 (4 pts), loops 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SlackEventHandler._download_slack_file (cognitive 24) · ×1
  • SlackEventHandler._download_slack_file (cognitive 24) plugins/channel/slack/qwenpaw_channel_slack/handler.py:337 — SlackEventHandler._download_slack_file has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handler._walk_elements (cognitive 24) · ×1
  • handler._walk_elements (cognitive 24) plugins/channel/slack/qwenpaw_channel_slack/handler.py:704 — handler._walk_elements has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (9 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · projection.project_runtime (cognitive 24) · ×1
  • projection.project_runtime (cognitive 24) plugins/harness/codex/projection.py:26 — projection.project_runtime has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager._update_continuation_summary_inner (cognitive 24) · ×1
  • ScrollContextManager._update_continuation_summary_inner (cognitive 24) src/qwenpaw/agents/context/scroll/manager.py:1444 — ScrollContextManager._update_continuation_summary_inner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (6 pts), ternaries 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync._extract_session (cognitive 24) · ×1
  • sync._extract_session (cognitive 24) src/qwenpaw/agents/context/scroll/sync.py:231 — sync._extract_session has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_factory._apply_model_fallbacks (cognitive 24) · ×1
  • model_factory._apply_model_fallbacks (cognitive 24) src/qwenpaw/agents/model_factory.py:2387 — model_factory._apply_model_fallbacks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registry.resolve_effective_skills (cognitive 24) · ×1
  • registry.resolve_effective_skills (cognitive 24) src/qwenpaw/agents/skill_system/registry.py:1268 — registry.resolve_effective_skills has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_message_utils._dedup_tool_blocks (cognitive 24) · ×1
  • tool_message_utils._dedup_tool_blocks (cognitive 24) src/qwenpaw/agents/utils/tool_message_utils.py:235 — tool_message_utils._dedup_tool_blocks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _app.lifespan (cognitive 24) · ×1
  • _app.lifespan (cognitive 24) src/qwenpaw/app/_app.py:243 — _app.lifespan has cognitive complexity 24 (threshold 15). Drivers by points: error handling 12 (15 pts), if/else 6, boolean chains 1, 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.
D2 · Cognitive Complexity · ChannelIngressService.forward_websocket (cognitive 24) · ×1
  • ChannelIngressService.forward_websocket (cognitive 24) src/qwenpaw/app/channels/ingress.py:692 — ChannelIngressService.forward_websocket has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IsolatedChannelProxy._state_operation (cognitive 24) · ×1
  • IsolatedChannelProxy._state_operation (cognitive 24) src/qwenpaw/app/channels/isolated_proxy.py:850 — IsolatedChannelProxy._state_operation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 1 (2 pts), ternaries 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 · ChannelManager.replace_channel (cognitive 24) · ×1
  • ChannelManager.replace_channel (cognitive 24) src/qwenpaw/app/channels/manager.py:1955 — ChannelManager.replace_channel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, error handling 1 (2 pts), ternaries 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 · heartbeat._extract_message_preview (cognitive 24) · ×1
  • heartbeat._extract_message_preview (cognitive 24) src/qwenpaw/app/crons/heartbeat.py:153 — heartbeat._extract_message_preview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 2 (5 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 · heartbeat.run_heartbeat_once (cognitive 24) · ×1
  • heartbeat.run_heartbeat_once (cognitive 24) src/qwenpaw/app/crons/heartbeat.py:189 — heartbeat.run_heartbeat_once has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 4 (8 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CronManager._persist_and_register (cognitive 24) · ×1
  • CronManager._persist_and_register (cognitive 24) src/qwenpaw/app/crons/manager.py:420 — CronManager._persist_and_register has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CronManager._execute_once (cognitive 24) · ×1
  • CronManager._execute_once (cognitive 24) src/qwenpaw/app/crons/manager.py:1159 — CronManager._execute_once has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 7 (10 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · storage._detail_sync (cognitive 24) · ×1
  • storage._detail_sync (cognitive 24) src/qwenpaw/backup/_ops/storage.py:77 — storage._detail_sync has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Browser.connect (cognitive 24) · ×1
  • Browser.connect (cognitive 24) src/qwenpaw/browser/sdk/facade.py:271 — Browser.connect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, ternaries 2, 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 · cron_cmd.create_job (cognitive 24) · ×1
  • cron_cmd.create_job (cognitive 24) src/qwenpaw/cli/cron_cmd.py:526 — cron_cmd.create_job has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (11 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · plugin_commands.install (cognitive 24) · ×1
  • plugin_commands.install (cognitive 24) REDACTED:492 — plugin_commands.install has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 2 (3 pts), loops 1, ternaries 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 · shutdown_cmd._listening_pids_for_port (cognitive 24) · ×1
  • shutdown_cmd._listening_pids_for_port (cognitive 24) src/qwenpaw/cli/shutdown_cmd.py:38 — shutdown_cmd._listening_pids_for_port has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils._get_darwin_default_browser (cognitive 24) · ×1
  • utils._get_darwin_default_browser (cognitive 24) src/qwenpaw/config/utils.py:214 — utils._get_darwin_default_browser has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AliyunProvider.search (cognitive 24) · ×1
  • AliyunProvider.search (cognitive 24) src/qwenpaw/market/providers/aliyun.py:192 — AliyunProvider.search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (4 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManagedService._start (cognitive 24) · ×1
  • ManagedService._start (cognitive 24) src/qwenpaw/pawapp/service.py:261 — ManagedService._start has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 5 (7 pts), ternaries 4 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DependencyEnvironmentContext.from_runtime (cognitive 24) · ×1
  • DependencyEnvironmentContext.from_runtime (cognitive 24) src/qwenpaw/plugins/dependency_context.py:67 — DependencyEnvironmentContext.from_runtime has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 5 (7 pts), boolean chains 4 (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 · dependency_maintenance._unusable_root_reason (cognitive 24) · ×1
  • dependency_maintenance._unusable_root_reason (cognitive 24) src/qwenpaw/plugins/dependency_maintenance.py:208 — dependency_maintenance._unusable_root_reason has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyReadEvidence.from_mapping (cognitive 24) · ×1
  • DependencyReadEvidence.from_mapping (cognitive 24) src/qwenpaw/plugins/execution/dependencies.py:243 — DependencyReadEvidence.from_mapping has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, error handling 1 (3 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginProcess._control (cognitive 24) · ×1
  • PluginProcess._control (cognitive 24) src/qwenpaw/plugins/execution/process.py:812 — PluginProcess._control has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, ternaries 2 (3 pts), error handling 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 · PluginProcess._cleanup_owned (cognitive 24) · ×1
  • PluginProcess._cleanup_owned (cognitive 24) src/qwenpaw/plugins/execution/process.py:1082 — PluginProcess._cleanup_owned has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 4). 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 · PluginLoader._fail_after_startup (cognitive 24) · ×1
  • PluginLoader._fail_after_startup (cognitive 24) src/qwenpaw/plugins/loader.py:5667 — PluginLoader._fail_after_startup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceProjector.revoke (cognitive 24) · ×1
  • WorkspaceProjector.revoke (cognitive 24) src/qwenpaw/plugins/workspace_projector.py:266 — WorkspaceProjector.revoke has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, error handling 1 (2 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · error_utils.extract_status_code (cognitive 24) · ×1
  • error_utils.extract_status_code (cognitive 24) src/qwenpaw/providers/error_utils.py:57 — error_utils.extract_status_code has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerPersistenceMixin._merge_plugin_model_update (cognitive 24) · ×1
  • ProviderManagerPersistenceMixin._merge_plugin_model_update (cognitive 24) src/qwenpaw/providers/provider_manager_persistence.py:205 — ProviderManagerPersistenceMixin._merge_plugin_model_update has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentBuilder._build_middlewares (cognitive 24) · ×1
  • AgentBuilder._build_middlewares (cognitive 24) src/qwenpaw/runtime/builder.py:1340 — AgentBuilder._build_middlewares has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 4 (6 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.AgentsPage · ×1
  • index.AgentsPage::handleSubmit (cognitive 24) console/src/pages/Settings/Agents/index.tsx:153 — index.AgentsPage::handleSubmit has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 8, if/else 2, 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 · BlueprintPrepDrawer.VisualDetail (cognitive 24) · ×1
  • BlueprintPrepDrawer.VisualDetail (cognitive 24) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:93 — BlueprintPrepDrawer.VisualDetail has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8, boolean chains 7, if/else 7, error handling 2. Of this number, 15 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 · TimelineCanvas.TimelineCanvas (cognitive 24) · ×1
  • TimelineCanvas.TimelineCanvas (cognitive 24) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:120 — TimelineCanvas.TimelineCanvas has cognitive complexity 24 (threshold 15). Drivers by points: if/else 52 (59 pts), boolean chains 28, ternaries 16 (17 pts), error handling 1, match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (TimelineCanvas.TimelineCanvas::performSpanCommit) 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 · service_worker.listTabs (cognitive 24) · ×1
  • service_worker.listTabs (cognitive 24) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:383 — service_worker.listTabs has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), ternaries 4 (5 pts), error handling 1 (2 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 432, attachGroupInfo, a function literal at line 387). 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 · ThreadStore.list_threads (cognitive 23) · ×1
  • ThreadStore.list_threads (cognitive 23) REDACTED:579 — ThreadStore.list_threads has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.patch_issue (cognitive 23) · ×1
  • main.patch_issue (cognitive 23) plugins/apps/agent-kanban/backend/main.py:359 — main.patch_issue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6 (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 · asr_model._sentences (cognitive 23) · ×1
  • asr_model._sentences (cognitive 23) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:89 — asr_model._sentences has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (10 pts), loops 2 (3 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 · BFLImageModel._poll (cognitive 23) · ×1
  • BFLImageModel._poll (cognitive 23) plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:256 — BFLImageModel._poll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tts_model.synthesize (cognitive 23) · ×1
  • tts_model.synthesize (cognitive 23) plugins/apps/qwenpaw-creator/backend/models/tts_model.py:317 — tts_model.synthesize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, 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, 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 · model_context._shrink_continuation (cognitive 23) · ×1
  • model_context._shrink_continuation (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_context.py:189 — model_context._shrink_continuation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · subagents.specialist_system_prompt (cognitive 23) · ×1
  • subagents.specialist_system_prompt (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/subagents.py:136 — subagents.specialist_system_prompt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (8 pts), boolean chains 7 (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 · WorkGraphScheduler._dispatch_candidates (cognitive 23) · ×1
  • WorkGraphScheduler._dispatch_candidates (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:1227 — WorkGraphScheduler._dispatch_candidates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audio_execution._find_reusable_tts_asset (cognitive 23) · ×1
  • audio_execution._find_reusable_tts_asset (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:335 — audio_execution._find_reusable_tts_asset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_execution._provider_bytes (cognitive 23) · ×1
  • image_execution._provider_bytes (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1573 — image_execution._provider_bytes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6 (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 · task_scratch._releasable_media (cognitive 23) · ×1
  • task_scratch._releasable_media (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:362 — task_scratch._releasable_media has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media_review.schedule_media_review (cognitive 23) · ×1
  • media_review.schedule_media_review (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:1130 — media_review.schedule_media_review has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, error handling 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ProjectRuntimeSessionStore.initialize_staged_project (cognitive 23) · ×1
  • ProjectRuntimeSessionStore.initialize_staged_project (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:303 — ProjectRuntimeSessionStore.initialize_staged_project has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · verification.verify_visual_grounding_groups_with_vlm (cognitive 23) · ×1
  • verification.verify_visual_grounding_groups_with_vlm (cognitive 23) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:501 — verification.verify_visual_grounding_groups_with_vlm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 6 (7 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · AzureBotPlatform._message (cognitive 23) · ×1
  • AzureBotPlatform._message (cognitive 23) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:306 — AzureBotPlatform._message has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, loops 2 (3 pts), ternaries 2 (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 · DingTalkChannelHandler._handle_quoted_rich_text (cognitive 23) · ×1
  • DingTalkChannelHandler._handle_quoted_rich_text (cognitive 23) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:271 — DingTalkChannelHandler._handle_quoted_rich_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MattermostPlatform._on_posted_event (cognitive 23) · ×1
  • MattermostPlatform._on_posted_event (cognitive 23) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:210 — MattermostPlatform._on_posted_event has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 4 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MattermostPlatform.send_parts (cognitive 23) · ×1
  • MattermostPlatform.send_parts (cognitive 23) plugins/channel/mattermost/qwenpaw_channel_mattermost/platform.py:412 — MattermostPlatform.send_parts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OneBotInboundMedia._resolve_from_api (cognitive 23) · ×1
  • OneBotInboundMedia._resolve_from_api (cognitive 23) plugins/channel/onebot/qwenpaw_channel_onebot/media.py:394 — OneBotInboundMedia._resolve_from_api has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QQPlatform._ws_connect_once (cognitive 23) · ×1
  • QQPlatform._ws_connect_once (cognitive 23) plugins/channel/qq/qwenpaw_channel_qq/platform.py:1089 — QQPlatform._ws_connect_once has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 7 (8 pts), boolean chains 3, loops 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 · SIPDriver._perform_send (cognitive 23) · ×1
  • SIPDriver._perform_send (cognitive 23) plugins/channel/sip/qwenpaw_channel_sip/driver.py:142 — SIPDriver._perform_send 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 · helpers._extract_text (cognitive 23) · ×1
  • helpers._extract_text (cognitive 23) plugins/channel/sip/qwenpaw_channel_sip/helpers.py:28 — helpers._extract_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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 · SlackSender._send_content_parts_impl (cognitive 23) · ×1
  • SlackSender._send_content_parts_impl (cognitive 23) plugins/channel/slack/qwenpaw_channel_slack/sender.py:123 — SlackSender._send_content_parts_impl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexBackend._handle_server_request (cognitive 23) · ×1
  • CodexBackend._handle_server_request (cognitive 23) plugins/harness/codex/adapter.py:804 — CodexBackend._handle_server_request has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (8 pts), if/else 5 (6 pts) (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 · gpt_image2_tool.edit_image_gpt (cognitive 23) · ×1
  • gpt_image2_tool.edit_image_gpt (cognitive 23) plugins/tool/gpt-image2/gpt_image2_tool.py:259 — gpt_image2_tool.edit_image_gpt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), error handling 6 (7 pts), boolean chains 3, loops 1 (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 · message.msg_from_dict (cognitive 23) · ×1
  • message.msg_from_dict (cognitive 23) src/qwenpaw/_compat/message.py:190 — message.msg_from_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ACPHostedClient._extract_text_from_content (cognitive 23) · ×1
  • ACPHostedClient._extract_text_from_content (cognitive 23) src/qwenpaw/agents/acp/client.py:416 — ACPHostedClient._extract_text_from_content has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_factory._collect_media_references (cognitive 23) · ×1
  • model_factory._collect_media_references (cognitive 23) src/qwenpaw/agents/model_factory.py:247 — model_factory._collect_media_references has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (9 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub.search_hub_skills (cognitive 23) · ×1
  • hub.search_hub_skills (cognitive 23) src/qwenpaw/agents/skill_system/hub.py:2131 — hub.search_hub_skills has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). 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 · browser_control._action_file_download (cognitive 23) · ×1
  • browser_control._action_file_download (cognitive 23) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3342 — browser_control._action_file_download has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 5 (8 pts), boolean chains 4 (nesting depth added 4). 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 · file_handling._resolve_local_path (cognitive 23) · ×1
  • file_handling._resolve_local_path (cognitive 23) REDACTED:121 — file_handling._resolve_local_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6 (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 · loops.get_loop_status (cognitive 23) · ×1
  • loops.get_loop_status (cognitive 23) src/qwenpaw/app/routers/loops.py:61 — loops.get_loop_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workspace.workspace_watch_events (cognitive 23) · ×1
  • workspace.workspace_watch_events (cognitive 23) src/qwenpaw/app/routers/workspace.py:1076 — workspace.workspace_watch_events has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 3 (7 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RawCompletedTextSources.__post_init__ (cognitive 23) · ×1
  • RawCompletedTextSources.__post_init__ (cognitive 23) src/qwenpaw/channel_protocol/completed_text.py:34 — RawCompletedTextSources.__post_init__ has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (9 pts), loops 1 (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 · update_cmd.update_cmd (cognitive 23) · ×1
  • update_cmd.update_cmd (cognitive 23) src/qwenpaw/cli/update_cmd.py:700 — update_cmd.update_cmd has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 5 (7 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 · mcp_legacy_config._build_legacy_credential (cognitive 23) · ×1
  • mcp_legacy_config._build_legacy_credential (cognitive 23) src/qwenpaw/drivers/adapters/mcp_legacy_config.py:313 — mcp_legacy_config._build_legacy_credential has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, loops 3 (4 pts), ternaries 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 · tool_adapter._policy_tool_call (cognitive 23) · ×1
  • tool_adapter._policy_tool_call (cognitive 23) src/qwenpaw/governance/tool_adapter.py:517 — tool_adapter._policy_tool_call has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, loops 1 (2 pts), ternaries 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, 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 · ContextVarsSetupHook.run (cognitive 23) · ×1
  • ContextVarsSetupHook.run (cognitive 23) src/qwenpaw/hooks/request_setup/contextvars_hook.py:54 — ContextVarsSetupHook.run has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (7 pts), error handling 2, ternaries 1 (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 · api._write_tool_config (cognitive 23) · ×1
  • api._write_tool_config (cognitive 23) src/qwenpaw/plugins/api.py:330 — api._write_tool_config has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · azure_legacy._capture_sources (cognitive 23) · ×1
  • azure_legacy._capture_sources (cognitive 23) src/qwenpaw/plugins/azure_legacy.py:201 — azure_legacy._capture_sources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelBackend.load_definition (cognitive 23) · ×1
  • ChannelBackend.load_definition (cognitive 23) src/qwenpaw/plugins/channel_adapter.py:725 — ChannelBackend.load_definition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (7 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_gate.parse_requirements_file (cognitive 23) · ×1
  • dependency_gate.parse_requirements_file (cognitive 23) src/qwenpaw/plugins/dependency_gate.py:65 — dependency_gate.parse_requirements_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependency_transaction.imported_changes_async (cognitive 23) · ×1
  • dependency_transaction.imported_changes_async (cognitive 23) src/qwenpaw/plugins/dependency_transaction.py:607 — dependency_transaction.imported_changes_async has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyUpgradeManager._reviewed_usage (cognitive 23) · ×1
  • DependencyUpgradeManager._reviewed_usage (cognitive 23) src/qwenpaw/plugins/dependency_upgrade.py:1023 — DependencyUpgradeManager._reviewed_usage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · component_discovery.discover_components (cognitive 23) · ×1
  • component_discovery.discover_components (cognitive 23) src/qwenpaw/portability/component_discovery.py:79 — component_discovery.discover_components has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 2 (4 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 · planner._hash_inventory_sources (cognitive 23) · ×1
  • planner._hash_inventory_sources (cognitive 23) src/qwenpaw/portability/planner.py:274 — planner._hash_inventory_sources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1 (3 pts), loops 3, ternaries 1 (3 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 · codex_schedule_reader._read_sqlite_candidates (cognitive 23) · ×1
  • codex_schedule_reader._read_sqlite_candidates (cognitive 23) src/qwenpaw/portability/providers/codex_schedule_reader.py:771 — codex_schedule_reader._read_sqlite_candidates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 2 (3 pts), error handling 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 · codex_schedules._source_cwds (cognitive 23) · ×1
  • codex_schedules._source_cwds (cognitive 23) src/qwenpaw/portability/providers/codex_schedules.py:274 — codex_schedules._source_cwds has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, error handling 1 (2 pts), loops 1, ternaries 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 · external_state.discover_qoder_memory (cognitive 23) · ×1
  • external_state.discover_qoder_memory (cognitive 23) src/qwenpaw/portability/providers/external_state.py:359 — external_state.discover_qoder_memory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, error handling 2 (3 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 · provider_discovery.merge_discovered_model (cognitive 23) · ×1
  • provider_discovery.merge_discovered_model (cognitive 23) src/qwenpaw/providers/provider_discovery.py:65 — provider_discovery.merge_discovered_model has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, ternaries 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerPersistenceMixin._migrate_legacy_providers (cognitive 23) · ×1
  • ProviderManagerPersistenceMixin._migrate_legacy_providers (cognitive 23) src/qwenpaw/providers/provider_manager_persistence.py:1076 — ProviderManagerPersistenceMixin._migrate_legacy_providers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckpointCommandHandler._restore (cognitive 23) · ×1
  • CheckpointCommandHandler._restore (cognitive 23) src/qwenpaw/runtime/commands/control/checkpoint_handler.py:279 — CheckpointCommandHandler._restore has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · checkpoint_handler._parse_selected_files (cognitive 23) · ×1
  • checkpoint_handler._parse_selected_files (cognitive 23) src/qwenpaw/runtime/commands/control/checkpoint_handler.py:96 — checkpoint_handler._parse_selected_files has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (9 pts), boolean chains 3, ternaries 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 · ToolRegistry.filter (cognitive 23) · ×1
  • ToolRegistry.filter (cognitive 23) src/qwenpaw/runtime/tool_registry.py:153 — ToolRegistry.filter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 10, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decision_model._code_preflight (cognitive 23) · ×1
  • decision_model._code_preflight (cognitive 23) src/qwenpaw/security/decision_model.py:167 — decision_model._code_preflight has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (3 pts), loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decision_model.assess_tool_call (cognitive 23) · ×1
  • decision_model.assess_tool_call (cognitive 23) src/qwenpaw/security/decision_model.py:452 — decision_model.assess_tool_call has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 2 (4 pts), error handling 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 · store.sortFillEntries (cognitive 23) · ×1
  • store.sortFillEntries (cognitive 23) console/src/plugins/registry/store.ts:748 — store.sortFillEntries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 9). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionApi.applyChatsToSessionList (cognitive 23) · ×1
  • SessionApi.applyChatsToSessionList (cognitive 23) console/src/pages/Chat/sessionApi/index.ts:1334 — SessionApi.applyChatsToSessionList has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (11 pts), ternaries 1 (nesting depth added 4). Of this number, 22 points are the body's own statements and 1 belongs 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 · ChunkErrorBoundary.render (cognitive 23) · ×1
  • ChunkErrorBoundary.render (cognitive 23) console/src/components/ChunkErrorBoundary.tsx:235 — ChunkErrorBoundary.render has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (17 pts), boolean chains 5, if/else 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 · rawToolDisplay.inspectDisplayBudget · ×1
  • rawToolDisplay.inspectDisplayBudget::inspect (cognitive 23) console/src/components/Chat/ToolCards/shared/rawToolDisplay.ts:45 — rawToolDisplay.inspectDisplayBudget::inspect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerminalView.TerminalView (cognitive 23) · ×1
  • TerminalView.TerminalView (cognitive 23) console/src/features/terminal/TerminalView.tsx:10 — TerminalView.TerminalView has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (4 pts), boolean chains 2, loops 2, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 123, 59, 51, …). 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 · ThinkingIndicator.ThinkingIndicator (cognitive 23) · ×1
  • ThinkingIndicator.ThinkingIndicator (cognitive 23) console/src/features/thinking/ThinkingIndicator.tsx:10 — ThinkingIndicator.ThinkingIndicator has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 8, if/else 1 (nesting depth added 6). 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 into named stages: move each independent 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.AgentConfigPage (cognitive 23) · ×1
  • index.AgentConfigPage (cognitive 23) console/src/pages/Agent/Config/index.tsx:32 — index.AgentConfigPage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 149, 36, 107, …). 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 · useSkillsPage.useSkillsPage.handleFileChange (cognitive 23) · ×1
  • useSkillsPage.useSkillsPage.handleFileChange (cognitive 23) console/src/pages/Agent/Skills/useSkillsPage.tsx:309 — useSkillsPage.useSkillsPage.handleFileChange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 2 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 · WebSearchConfigModal.WebSearchConfigModal (cognitive 23) · ×1
  • WebSearchConfigModal.WebSearchConfigModal (cognitive 23) console/src/pages/Agent/Tools/WebSearchConfigModal.tsx:36 — WebSearchConfigModal.WebSearchConfigModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 10, error handling 1. Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 62, 116, 130, …). 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.ChatSearchPanel (cognitive 23) · ×1
  • index.ChatSearchPanel (cognitive 23) console/src/pages/Chat/components/ChatSearchPanel/index.tsx:60 — index.ChatSearchPanel has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 6, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 98, 85, 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.
D2 · Cognitive Complexity · PostBody.PostBody (cognitive 23) · ×1
  • PostBody.PostBody (cognitive 23) REDACTED:70 — PostBody.PostBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10, ternaries 1 (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 6 function items inside it that branch (handleBodyClick, a function literal at line 106, a function literal at line 110, …). 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 · SkillScannerSection.SkillScannerSection (cognitive 23) · ×1
  • SkillScannerSection.SkillScannerSection (cognitive 23) console/src/pages/Settings/Security/components/SkillScannerSection.tsx:85 — SkillScannerSection.SkillScannerSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, ternaries 6, boolean chains 5, error handling 3. Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 122, 110, 137, …). 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 · PoolSkillCard.PoolSkillCard (cognitive 23) · ×1
  • PoolSkillCard.PoolSkillCard (cognitive 23) console/src/pages/Settings/SkillPool/components/PoolSkillCard.tsx:36 — PoolSkillCard.PoolSkillCard has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 5 (nesting depth added 1). Of this number, 19 points are the body's own statements and 4 belong to 2 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 · client.creatorFetch (cognitive 23) · ×1
  • client.creatorFetch (cognitive 23) plugins/apps/qwenpaw-creator/ui/src/api/creator/client.ts:130 — client.creatorFetch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (9 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · imap_ops.move_message (cognitive 22) · ×1
  • imap_ops.move_message (cognitive 22) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/imap_ops.py:339 — imap_ops.move_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 4 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · video_capabilities.video_model_duration_guidance (cognitive 22) · ×1
  • video_capabilities.video_model_duration_guidance (cognitive 22) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1727 — video_capabilities.video_model_duration_guidance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vlm_model._call_gemini_vlm (cognitive 22) · ×1
  • vlm_model._call_gemini_vlm (cognitive 22) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:1115 — vlm_model._call_gemini_vlm has cognitive complexity 22 (threshold 15). Drivers by points: error handling 2 (8 pts), if/else 5 (8 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._publish_live_operation_sync (cognitive 22) · ×1
  • FileCreatorAgentRuntime._publish_live_operation_sync (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4937 — FileCreatorAgentRuntime._publish_live_operation_sync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manual_regeneration_hold.admission_guard (cognitive 22) · ×1
  • manual_regeneration_hold.admission_guard (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/manual_regeneration_hold.py:344 — manual_regeneration_hold.admission_guard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, ternaries 1 (2 pts) (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 · DesktopController._remember_observation (cognitive 22) · ×1
  • DesktopController._remember_observation (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/desktop.py:213 — DesktopController._remember_observation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TakeRecorder.stop (cognitive 22) · ×1
  • TakeRecorder.stop (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:201 — TakeRecorder.stop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · motion_overlay.probe_motion_document (cognitive 22) · ×1
  • motion_overlay.probe_motion_document (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1239 — motion_overlay.probe_motion_document has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 2, error handling 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · r2v_execution._resolve_reference_voices (cognitive 22) · ×1
  • r2v_execution._resolve_reference_voices (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:1106 — r2v_execution._resolve_reference_voices has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transitions.build_transition_filter_chain (cognitive 22) · ×1
  • transitions.build_transition_filter_chain (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/media_files/transitions.py:160 — transitions.build_transition_filter_chain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentProjectTools._cut_boundary_advisory (cognitive 22) · ×1
  • AgentProjectTools._cut_boundary_advisory (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1632 — AgentProjectTools._cut_boundary_advisory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · facade._startup_disk_gc (cognitive 22) · ×1
  • facade._startup_disk_gc (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:90 — facade._startup_disk_gc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migrations._migrate_variant_selections (cognitive 22) · ×1
  • migrations._migrate_variant_selections (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:123 — migrations._migrate_variant_selections has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectCommitRecoveryCoordinator._runtime_metadata_complete (cognitive 22) · ×1
  • ProjectCommitRecoveryCoordinator._runtime_metadata_complete (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:899 — ProjectCommitRecoveryCoordinator._runtime_metadata_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6, 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 · remote_cache.resolve_remote_cache (cognitive 22) · ×1
  • remote_cache.resolve_remote_cache (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/project_files/remote_cache.py:152 — remote_cache.resolve_remote_cache has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, error handling 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · challenge.filter_questions (cognitive 22) · ×1
  • challenge.filter_questions (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:116 — challenge.filter_questions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frames.extract_review_frames (cognitive 22) · ×1
  • frames.extract_review_frames (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/render_review/frames.py:139 — frames.extract_review_frames has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review._timeline_review_expectations (cognitive 22) · ×1
  • review._timeline_review_expectations (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:425 — review._timeline_review_expectations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prompt_contract._expected_reference_roles (cognitive 22) · ×1
  • prompt_contract._expected_reference_roles (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/run_review/prompt_contract.py:155 — prompt_contract._expected_reference_roles has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 4 (6 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · adapters._dashscope_web_search_image_items (cognitive 22) · ×1
  • adapters._dashscope_web_search_image_items (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:343 — adapters._dashscope_web_search_image_items has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2, 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 · triage._normalize_llm_grounding_analysis (cognitive 22) · ×1
  • triage._normalize_llm_grounding_analysis (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:402 — triage._normalize_llm_grounding_analysis has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, loops 2 (3 pts), ternaries 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 · visual_jobs._visual_entities_from_context (cognitive 22) · ×1
  • visual_jobs._visual_entities_from_context (cognitive 22) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:173 — visual_jobs._visual_entities_from_context has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, loops 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nm_host.connect_websocket_with_retry (cognitive 22) · ×1
  • nm_host.connect_websocket_with_retry (cognitive 22) plugins/bundle/chrome/assets/scripts/nm_host.py:260 — nm_host.connect_websocket_with_retry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agents_setup._uninstall_plugin_skills (cognitive 22) · ×1
  • agents_setup._uninstall_plugin_skills (cognitive 22) plugins/bundle/cloudpaw/agents_setup.py:400 — agents_setup._uninstall_plugin_skills has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 4 (7 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_prd._handle_create (cognitive 22) · ×1
  • manage_prd._handle_create (cognitive 22) plugins/bundle/cloudpaw/tools/manage_prd.py:152 — manage_prd._handle_create has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, error handling 1 (2 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 · management.manage (cognitive 22) · ×1
  • management.manage (cognitive 22) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/management.py:21 — management.manage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkTransport.send (cognitive 22) · ×1
  • DingTalkTransport.send (cognitive 22) REDACTED:1547 — DingTalkTransport.send has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LarkOapiPlatform._dispatch_native_message_serial (cognitive 22) · ×1
  • LarkOapiPlatform._dispatch_native_message_serial (cognitive 22) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:692 — LarkOapiPlatform._dispatch_native_message_serial has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 8, loops 2 (3 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 · MatrixDriver._perform_send (cognitive 22) · ×1
  • MatrixDriver._perform_send (cognitive 22) plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:212 — MatrixDriver._perform_send has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 1 (2 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 · formatting._find_quoted_element (cognitive 22) · ×1
  • formatting._find_quoted_element (cognitive 22) plugins/channel/qq/qwenpaw_channel_qq/formatting.py:196 — formatting._find_quoted_element has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelegramPlatform.send_parts (cognitive 22) · ×1
  • TelegramPlatform.send_parts (cognitive 22) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:1068 — TelegramPlatform.send_parts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), error handling 3 (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 · CodexBackend.list_external_threads (cognitive 22) · ×1
  • CodexBackend.list_external_threads (cognitive 22) plugins/harness/codex/adapter.py:429 — CodexBackend.list_external_threads has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ACPHostedClient._tool_input_text (cognitive 22) · ×1
  • ACPHostedClient._tool_input_text (cognitive 22) src/qwenpaw/agents/acp/client.py:572 — ACPHostedClient._tool_input_text has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 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 · model_factory.create_model_and_formatter (cognitive 22) · ×1
  • model_factory.create_model_and_formatter (cognitive 22) src/qwenpaw/agents/model_factory.py:2521 — model_factory.create_model_and_formatter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (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 · prompt.get_model_supports_image (cognitive 22) · ×1
  • prompt.get_model_supports_image (cognitive 22) src/qwenpaw/agents/prompt.py:456 — prompt.get_model_supports_image has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, 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 · browser_control._start_managed_cdp_browser (cognitive 22) · ×1
  • browser_control._start_managed_cdp_browser (cognitive 22) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1197 — browser_control._start_managed_cdp_browser has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (2 pts), ternaries 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 · ChannelIngressService._http (cognitive 22) · ×1
  • ChannelIngressService._http (cognitive 22) src/qwenpaw/app/channels/ingress.py:589 — ChannelIngressService._http has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), error handling 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolatedChannelProxy._format_send_fields (cognitive 22) · ×1
  • IsolatedChannelProxy._format_send_fields (cognitive 22) src/qwenpaw/app/channels/isolated_proxy.py:1184 — IsolatedChannelProxy._format_send_fields has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 3 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedQueueManager.stop_all (cognitive 22) · ×1
  • UnifiedQueueManager.stop_all (cognitive 22) src/qwenpaw/app/channels/unified_queue_manager.py:429 — UnifiedQueueManager.stop_all has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), error handling 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 · providers.get_active_models (cognitive 22) · ×1
  • providers.get_active_models (cognitive 22) src/qwenpaw/app/routers/providers.py:912 — providers.get_active_models has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canonical._encode (cognitive 22) · ×1
  • canonical._encode (cognitive 22) src/qwenpaw/channel_protocol/canonical.py:99 — canonical._encode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SendParams.from_mapping (cognitive 22) · ×1
  • SendParams.from_mapping (cognitive 22) src/qwenpaw/channel_protocol/models.py:1277 — SendParams.from_mapping has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, error handling 1 (2 pts), 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 · CheckpointService._gc_sync (cognitive 22) · ×1
  • CheckpointService._gc_sync (cognitive 22) src/qwenpaw/checkpoints/service.py:896 — CheckpointService._gc_sync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5, loops 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mcp_binding.binding_to_response (cognitive 22) · ×1
  • mcp_binding.binding_to_response (cognitive 22) src/qwenpaw/drivers/adapters/mcp_binding.py:228 — mcp_binding.binding_to_response has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 2 (3 pts), ternaries 2 (3 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 · ModelScopeProvider.search (cognitive 22) · ×1
  • ModelScopeProvider.search (cognitive 22) src/qwenpaw/market/providers/modelscope.py:37 — ModelScopeProvider.search has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (4 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwenPawProvider.search (cognitive 22) · ×1
  • QwenPawProvider.search (cognitive 22) src/qwenpaw/market/providers/qwenpaw.py:34 — QwenPawProvider.search has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (4 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginProcess._terminate_tree (cognitive 22) · ×1
  • PluginProcess._terminate_tree (cognitive 22) src/qwenpaw/plugins/execution/process.py:1168 — PluginProcess._terminate_tree has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (2 pts), ternaries 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 · module_isolation.sweep_bare_tree_modules (cognitive 22) · ×1
  • module_isolation.sweep_bare_tree_modules (cognitive 22) src/qwenpaw/plugins/module_isolation.py:315 — module_isolation.sweep_bare_tree_modules has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · provision.provision_files (cognitive 22) · ×1
  • provision.provision_files (cognitive 22) src/qwenpaw/plugins/provision.py:393 — provision.provision_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 2 (3 pts), ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · updates._restore_one_marker (cognitive 22) · ×1
  • updates._restore_one_marker (cognitive 22) src/qwenpaw/plugins/updates.py:267 — updates._restore_one_marker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, 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 · CompatibilityTester._test_mcp (cognitive 22) · ×1
  • CompatibilityTester._test_mcp (cognitive 22) src/qwenpaw/portability/compatibility_testing.py:702 — CompatibilityTester._test_mcp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6 (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 · codex._mcp_server (cognitive 22) · ×1
  • codex._mcp_server (cognitive 22) src/qwenpaw/portability/providers/codex.py:751 — codex._mcp_server has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2 (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 · codex_schedule_reader._read_project_roots (cognitive 22) · ×1
  • codex_schedule_reader._read_project_roots (cognitive 22) src/qwenpaw/portability/providers/codex_schedule_reader.py:242 — codex_schedule_reader._read_project_roots has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_schedule_reader._read_toml_candidates (cognitive 22) · ×1
  • codex_schedule_reader._read_toml_candidates (cognitive 22) src/qwenpaw/portability/providers/codex_schedule_reader.py:386 — codex_schedule_reader._read_toml_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 4 (7 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qoder_schedules._normalize_tasks (cognitive 22) · ×1
  • qoder_schedules._normalize_tasks (cognitive 22) src/qwenpaw/portability/providers/qoder_schedules.py:158 — qoder_schedules._normalize_tasks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openai_chat_model_compat._walk_schema (cognitive 22) · ×1
  • openai_chat_model_compat._walk_schema (cognitive 22) src/qwenpaw/providers/openai_chat_model_compat.py:285 — openai_chat_model_compat._walk_schema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetryChatModel.__call__ (cognitive 22) · ×1
  • RetryChatModel.__call__ (cognitive 22) src/qwenpaw/providers/retry_chat_model.py:946 — RetryChatModel.__call__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (6 pts), boolean chains 3, loops 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 · decision_model._is_read_only_shell_listing (cognitive 22) · ×1
  • decision_model._is_read_only_shell_listing (cognitive 22) src/qwenpaw/security/decision_model.py:338 — decision_model._is_read_only_shell_listing has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, error handling 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, 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 · FilePathToolGuardian.guard (cognitive 22) · ×1
  • FilePathToolGuardian.guard (cognitive 22) src/qwenpaw/security/tool_guard/guardians/file_guardian.py:461 — FilePathToolGuardian.guard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts), boolean chains 4 (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 · shell_evasion_guardian._check_obfuscated_flags (cognitive 22) · ×1
  • shell_evasion_guardian._check_obfuscated_flags (cognitive 22) src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:161 — shell_evasion_guardian._check_obfuscated_flags has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolCoordinator.execute (cognitive 22) · ×1
  • ToolCoordinator.execute (cognitive 22) src/qwenpaw/tool_calls/_coordinator.py:104 — ToolCoordinator.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · telemetry._detect_gpu (cognitive 22) · ×1
  • telemetry._detect_gpu (cognitive 22) src/qwenpaw/utils/telemetry.py:79 — telemetry._detect_gpu has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelDrawer.ChannelDrawer · ×1
  • ChannelDrawer.ChannelDrawer::prepareSave (cognitive 22) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1992 — ChannelDrawer.ChannelDrawer::prepareSave has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (7 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChannelDrawer.ChannelDrawer) 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 · api.parseResponse (cognitive 22) · ×1
  • api.parseResponse (cognitive 22) console/src/plugins/pawapp-sdk/api.ts:67 — api.parseResponse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 1 (2 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 · index.ProjectSelectModal (cognitive 22) · ×1
  • index.ProjectSelectModal (cognitive 22) console/src/components/ProjectSelectModal/index.tsx:519 — index.ProjectSelectModal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 4 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 11 function items inside it that branch (handleConfirm, resolveWorkspaceDir, handlePathSelected, …). 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 · CommentEmojiPicker.CommentEmojiPicker (cognitive 22) · ×1
  • CommentEmojiPicker.CommentEmojiPicker (cognitive 22) console/src/pages/Market/Community/CommentEmojiPicker.tsx:219 — CommentEmojiPicker.CommentEmojiPicker has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 4, if/else 4, error handling 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 284, 227, 244, …). 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 · useSkillPool.useSkillPool.handleImportBuiltins (cognitive 22) · ×1
  • useSkillPool.useSkillPool.handleImportBuiltins (cognitive 22) console/src/pages/Settings/SkillPool/useSkillPool.tsx:754 — useSkillPool.useSkillPool.handleImportBuiltins has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 6, if/else 4 (5 pts), error handling 1 (nesting depth added 5). Of this number, 16 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 · NavigationSettings.NavigationSettings (cognitive 22) · ×1
  • NavigationSettings.NavigationSettings (cognitive 22) console/src/pages/SettingsCenter/NavigationSettings.tsx:123 — NavigationSettings.NavigationSettings has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 8, if/else 3 (nesting depth added 1). Most of this is not in the body itself: 9 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 194, onDragEnd, a function literal at line 136, …). 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 · InspirationExamples.InspirationExamples (cognitive 22) · ×1
  • InspirationExamples.InspirationExamples (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/components/creator/InspirationExamples.tsx:22 — InspirationExamples.InspirationExamples has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 98, a function literal at line 49, handleOpen, …). 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 · TimelineSwitcher.TimelineSwitcher (cognitive 22) · ×1
  • TimelineSwitcher.TimelineSwitcher (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSwitcher.tsx:27 — TimelineSwitcher.TimelineSwitcher has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 5. Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 130, 43, 102, …). 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 · PromptRichBlock.PromptRichBlock (cognitive 22) · ×1
  • PromptRichBlock.PromptRichBlock (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptRichBlock.tsx:60 — PromptRichBlock.PromptRichBlock has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 pts), if/else 6 (nesting depth added 1). Of this number, 13 points are the body's own statements and 9 belong to 5 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 · PromptEditorModal.PromptEditorModal (cognitive 22) · ×1
  • PromptEditorModal.PromptEditorModal (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/components/workbench/PromptEditorModal.tsx:37 — PromptEditorModal.PromptEditorModal has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 3, ternaries 2, loops 1. Of this number, 13 points are the body's own statements and 9 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 · agentWorkingSelectors.useAgentWorkingState (cognitive 22) · ×1
  • agentWorkingSelectors.useAgentWorkingState (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/selectors/agentWorkingSelectors.ts:34 — agentWorkingSelectors.useAgentWorkingState has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7, boolean chains 6 (nesting depth added 2). None of this is in the body itself: all 22 points belong to 5 function literals inside it that branch (lines 90, 67, 70, …). 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 · creatorSessionStore.useCreatorSessionStore.sendMessage (cognitive 22) · ×1
  • creatorSessionStore.useCreatorSessionStore.sendMessage (cognitive 22) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:960 — creatorSessionStore.useCreatorSessionStore.sendMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 3 (5 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1040, 987, 1021, …). 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 · config.load_config (cognitive 21) · ×1
  • config.load_config (cognitive 21) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/config.py:57 — config.load_config has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, ternaries 5, if/else 4, error handling 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 · media_transport.upload_image_to_uguu_for_temporary_public_url (cognitive 21) · ×1
  • media_transport.upload_image_to_uguu_for_temporary_public_url (cognitive 21) REDACTED:608 — media_transport.upload_image_to_uguu_for_temporary_public_url has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · text_model._call_openai (cognitive 21) · ×1
  • text_model._call_openai (cognitive 21) plugins/apps/qwenpaw-creator/backend/models/text_model.py:75 — text_model._call_openai has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 2 (3 pts) (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 · work_graph._artifact_is_stale (cognitive 21) · ×1
  • work_graph._artifact_is_stale (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:586 — work_graph._artifact_is_stale has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · informal_launch_template.informal_launch_frame_windows (cognitive 21) · ×1
  • informal_launch_template.informal_launch_frame_windows (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/media_files/informal_launch_template.py:89 — informal_launch_template.informal_launch_frame_windows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · informal_launch_timing.align_launch_caption_spans (cognitive 21) · ×1
  • informal_launch_timing.align_launch_caption_spans (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/media_files/informal_launch_timing.py:92 — informal_launch_timing.align_launch_caption_spans has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, loops 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 · _CaptureWorkerHost.run (cognitive 21) · ×1
  • _CaptureWorkerHost.run (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:674 — _CaptureWorkerHost.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent_tools._translate_project_schema_error (cognitive 21) · ×1
  • agent_tools._translate_project_schema_error (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:857 — agent_tools._translate_project_schema_error has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), boolean chains 2, ternaries 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 · archive.write_project_archive (cognitive 21) · ×1
  • archive.write_project_archive (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/project_files/archive.py:241 — archive.write_project_archive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migrations._migrate_v5_to_v6 (cognitive 21) · ×1
  • migrations._migrate_v5_to_v6 (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:378 — migrations._migrate_v5_to_v6 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recovery._validate_existing_new_review (cognitive 21) · ×1
  • recovery._validate_existing_new_review (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:1600 — recovery._validate_existing_new_review has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectReviewService._resume_decision (cognitive 21) · ×1
  • ProjectReviewService._resume_decision (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1287 — ProjectReviewService._resume_decision has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2 (nesting depth added 11). 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 · scene_review._parse_checks (cognitive 21) · ×1
  • scene_review._parse_checks (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:281 — scene_review._parse_checks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, loops 2 (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 · text_review.parse_sync_advisory (cognitive 21) · ×1
  • text_review.parse_sync_advisory (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:219 — text_review.parse_sync_advisory has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 2 (4 pts), error handling 1 (2 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 · DurableJsonlStore._read_envelopes_after_unlocked (cognitive 21) · ×1
  • DurableJsonlStore._read_envelopes_after_unlocked (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py:432 — DurableJsonlStore._read_envelopes_after_unlocked has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 1 (2 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectRuntimeSessionStore.admit_user_request (cognitive 21) · ×1
  • ProjectRuntimeSessionStore.admit_user_request (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1135 — ProjectRuntimeSessionStore.admit_user_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triage.triage_grounding_request (cognitive 21) · ×1
  • triage.triage_grounding_request (cognitive 21) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:721 — triage.triage_grounding_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 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 · main._describe_models (cognitive 21) · ×1
  • main._describe_models (cognitive 21) plugins/apps/qwenpaw-data/backend/main.py:687 — main._describe_models has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pet_package.resolve_switch_pet_path (cognitive 21) · ×1
  • pet_package.resolve_switch_pet_path (cognitive 21) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/pet_package.py:95 — pet_package.resolve_switch_pet_path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform._on_room_event (cognitive 21) · ×1
  • MatrixPlatform._on_room_event (cognitive 21) REDACTED:2364 — MatrixPlatform._on_room_event has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, ternaries 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 · codec._normalize_segments (cognitive 21) · ×1
  • codec._normalize_segments (cognitive 21) plugins/channel/onebot/qwenpaw_channel_onebot/codec.py:256 — codec._normalize_segments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AliyunSTTStream.stop (cognitive 21) · ×1
  • AliyunSTTStream.stop (cognitive 21) plugins/channel/sip/qwenpaw_channel_sip/stt_engine.py:136 — AliyunSTTStream.stop has cognitive complexity 21 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlackDriver._perform_send (cognitive 21) · ×1
  • SlackDriver._perform_send (cognitive 21) plugins/channel/slack/qwenpaw_channel_slack/driver.py:148 — SlackDriver._perform_send has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, error handling 1 (2 pts), ternaries 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 · TelegramPlatform._send_text (cognitive 21) · ×1
  • TelegramPlatform._send_text (cognitive 21) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:941 — TelegramPlatform._send_text has cognitive complexity 21 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · platform._can_send_rich_message (cognitive 21) · ×1
  • platform._can_send_rich_message (cognitive 21) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:79 — platform._can_send_rich_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeComPlatform._stop_owned (cognitive 21) · ×1
  • WeComPlatform._stop_owned (cognitive 21) REDACTED:430 — WeComPlatform._stop_owned has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 3 (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 · ADBPGMemoryManager._search_local_memory_files (cognitive 21) · ×1
  • ADBPGMemoryManager._search_local_memory_files (cognitive 21) plugins/memory/adbpg/backend/manager.py:332 — ADBPGMemoryManager._search_local_memory_files has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), 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 · ACPHostedClient._pick_allow_option (cognitive 21) · ×1
  • ACPHostedClient._pick_allow_option (cognitive 21) src/qwenpaw/agents/acp/client.py:118 — ACPHostedClient._pick_allow_option has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommandHandler._process_reme (cognitive 21) · ×1
  • CommandHandler._process_reme (cognitive 21) src/qwenpaw/agents/command_handler.py:914 — CommandHandler._process_reme has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 5 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DecisionCompactor._validated_candidate (cognitive 21) · ×1
  • DecisionCompactor._validated_candidate (cognitive 21) src/qwenpaw/agents/context/decision_compaction.py:248 — DecisionCompactor._validated_candidate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager._tool_call_inputs (cognitive 21) · ×1
  • ScrollContextManager._tool_call_inputs (cognitive 21) src/qwenpaw/agents/context/scroll/manager.py:249 — ScrollContextManager._tool_call_inputs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemorySpace._attach_search_turns (cognitive 21) · ×1
  • MemorySpace._attach_search_turns (cognitive 21) src/qwenpaw/agents/context/scroll/memoryspace.py:1275 — MemorySpace._attach_search_turns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 2, ternaries 1 (2 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 · fork_project.resolve_git_project_dir (cognitive 21) · ×1
  • fork_project.resolve_git_project_dir (cognitive 21) src/qwenpaw/agents/fork_project.py:333 — fork_project.resolve_git_project_dir has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · injected_events.merge_injected_events (cognitive 21) · ×1
  • injected_events.merge_injected_events (cognitive 21) src/qwenpaw/agents/injected_events.py:24 — injected_events.merge_injected_events has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._lobehub_zip_to_bundle (cognitive 21) · ×1
  • hub._lobehub_zip_to_bundle (cognitive 21) src/qwenpaw/agents/skill_system/hub.py:1599 — hub._lobehub_zip_to_bundle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2, boolean chains 1, loops 1, ternaries 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 · setup_utils._copy_template_md_files (cognitive 21) · ×1
  • setup_utils._copy_template_md_files (cognitive 21) src/qwenpaw/agents/utils/setup_utils.py:186 — setup_utils._copy_template_md_files has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tool_message_utils._remove_invalid_tool_blocks (cognitive 21) · ×1
  • tool_message_utils._remove_invalid_tool_blocks (cognitive 21) src/qwenpaw/agents/utils/tool_message_utils.py:282 — tool_message_utils._remove_invalid_tool_blocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · ChannelIngressService.__init__ (cognitive 21) · ×1
  • ChannelIngressService.__init__ (cognitive 21) src/qwenpaw/app/channels/ingress.py:164 — ChannelIngressService.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 2 (3 pts), ternaries 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 · IsolatedChannelProxy._finish_route (cognitive 21) · ×1
  • IsolatedChannelProxy._finish_route (cognitive 21) src/qwenpaw/app/channels/isolated_proxy.py:1639 — IsolatedChannelProxy._finish_route has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (5 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolatedChannelProxy.send_content_parts (cognitive 21) · ×1
  • IsolatedChannelProxy.send_content_parts (cognitive 21) src/qwenpaw/app/channels/isolated_proxy.py:1733 — IsolatedChannelProxy.send_content_parts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelQRCodeSessions._stop (cognitive 21) · ×1
  • ChannelQRCodeSessions._stop (cognitive 21) src/qwenpaw/app/channels/qrcode_sessions.py:379 — ChannelQRCodeSessions._stop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), loops 2, boolean chains 1, ternaries 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 · ChannelQRCodeSessions.fetch (cognitive 21) · ×1
  • ChannelQRCodeSessions.fetch (cognitive 21) src/qwenpaw/app/channels/qrcode_sessions.py:516 — ChannelQRCodeSessions.fetch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2, ternaries 2, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChannelQRCodeSessions.save_confirmed (cognitive 21) · ×1
  • ChannelQRCodeSessions.save_confirmed (cognitive 21) src/qwenpaw/app/channels/qrcode_sessions.py:819 — ChannelQRCodeSessions.save_confirmed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MailMonitorService._load_state (cognitive 21) · ×1
  • MailMonitorService._load_state (cognitive 21) REDACTED:1280 — MailMonitorService._load_state has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 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 · agents.list_agents (cognitive 21) · ×1
  • agents.list_agents (cognitive 21) src/qwenpaw/app/routers/agents.py:522 — agents.list_agents has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community.community_post_resources (cognitive 21) · ×1
  • community.community_post_resources (cognitive 21) src/qwenpaw/app/routers/community.py:359 — community.community_post_resources has cognitive complexity 21 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CdpControlLink._m_open_session (cognitive 21) · ×1
  • CdpControlLink._m_open_session (cognitive 21) src/qwenpaw/browser/control_link/cdp/adapter.py:338 — CdpControlLink._m_open_session has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · providers_cmd.configure_llm_slot_interactive (cognitive 21) · ×1
  • providers_cmd.configure_llm_slot_interactive (cognitive 21) src/qwenpaw/cli/providers_cmd.py:399 — providers_cmd.configure_llm_slot_interactive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 3, 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 · skills_cmd.list_cmd (cognitive 21) · ×1
  • skills_cmd.list_cmd (cognitive 21) src/qwenpaw/cli/skills_cmd.py:643 — skills_cmd.list_cmd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpStatelessClient._negotiate (cognitive 21) · ×1
  • HttpStatelessClient._negotiate (cognitive 21) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:742 — HttpStatelessClient._negotiate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detectors.detect_sensitive_paths (cognitive 21) · ×1
  • detectors.detect_sensitive_paths (cognitive 21) src/qwenpaw/governance/detectors.py:220 — detectors.detect_sensitive_paths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenBudgetService.reserve (cognitive 21) · ×1
  • TokenBudgetService.reserve (cognitive 21) src/qwenpaw/hub/model_service/budget.py:111 — TokenBudgetService.reserve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _models.stream_model (cognitive 21) · ×1
  • _models.stream_model (cognitive 21) src/qwenpaw/plugins/_models.py:169 — _models.stream_model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginActivity.mutation (cognitive 21) · ×1
  • PluginActivity.mutation (cognitive 21) src/qwenpaw/plugins/activity.py:84 — PluginActivity.mutation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api.snapshot_agent_tool_configs (cognitive 21) · ×1
  • api.snapshot_agent_tool_configs (cognitive 21) src/qwenpaw/plugins/api.py:461 — api.snapshot_agent_tool_configs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (4 pts), error handling 2 (3 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 · dependency_transaction.publish (cognitive 21) · ×1
  • dependency_transaction.publish (cognitive 21) src/qwenpaw/plugins/dependency_transaction.py:900 — dependency_transaction.publish has cognitive complexity 21 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (7 pts), loops 6 (7 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 · FramedTransport.send (cognitive 21) · ×1
  • FramedTransport.send (cognitive 21) src/qwenpaw/plugins/execution/framing.py:473 — FramedTransport.send has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 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, 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 · runtime._dependencies (cognitive 21) · ×1
  • runtime._dependencies (cognitive 21) src/qwenpaw/plugins/execution/runtime.py:52 — runtime._dependencies has cognitive complexity 21 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (6 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLifecycle.set_enabled (cognitive 21) · ×1
  • PluginLifecycle.set_enabled (cognitive 21) src/qwenpaw/plugins/lifecycle.py:1033 — PluginLifecycle.set_enabled has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, ternaries 2 (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 · wheel_additions._check_installed_tree (cognitive 21) · ×1
  • wheel_additions._check_installed_tree (cognitive 21) src/qwenpaw/plugins/wheel_additions.py:410 — wheel_additions._check_installed_tree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 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 · compatibility_safety.mcp_inline_secret_risks (cognitive 21) · ×1
  • compatibility_safety.mcp_inline_secret_risks (cognitive 21) src/qwenpaw/portability/compatibility_safety.py:79 — compatibility_safety.mcp_inline_secret_risks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, error handling 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.
D2 · Cognitive Complexity · compatibility_testing._backend_exports_plugin (cognitive 21) · ×1
  • compatibility_testing._backend_exports_plugin (cognitive 21) src/qwenpaw/portability/compatibility_testing.py:553 — compatibility_testing._backend_exports_plugin has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PortabilityImportJobManager.cancel (cognitive 21) · ×1
  • PortabilityImportJobManager.cancel (cognitive 21) src/qwenpaw/portability/import_jobs.py:314 — PortabilityImportJobManager.cancel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PortabilityImportJobManager._apply (cognitive 21) · ×1
  • PortabilityImportJobManager._apply (cognitive 21) src/qwenpaw/portability/import_jobs.py:555 — PortabilityImportJobManager._apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1 (2 pts), loops 1, ternaries 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 · codex._merge_threads (cognitive 21) · ×1
  • codex._merge_threads (cognitive 21) src/qwenpaw/portability/providers/codex.py:720 — codex._merge_threads has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 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 · qoder_sessions.load_qoder_index (cognitive 21) · ×1
  • qoder_sessions.load_qoder_index (cognitive 21) src/qwenpaw/portability/providers/qoder_sessions.py:183 — qoder_sessions.load_qoder_index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_catalog.matching_catalog_keys (cognitive 21) · ×1
  • model_catalog.matching_catalog_keys (cognitive 21) REDACTED:111 — model_catalog.matching_catalog_keys has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · outbound_media.update_outbound_media (cognitive 21) · ×1
  • outbound_media.update_outbound_media (cognitive 21) src/qwenpaw/utils/outbound_media.py:257 — outbound_media.update_outbound_media has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionApi.fetchAndBuildSession (cognitive 21) · ×1
  • SessionApi.fetchAndBuildSession (cognitive 21) console/src/pages/Chat/sessionApi/index.ts:1647 — SessionApi.fetchAndBuildSession has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (9 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SidebarUsage.SidebarUsage (cognitive 21) · ×1
  • SidebarUsage.SidebarUsage (cognitive 21) console/src/layouts/SidebarUsage.tsx:16 — SidebarUsage.SidebarUsage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 7, boolean chains 5 (nesting depth added 3). Of this number, 11 points are the body's own statements and 10 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 · Sidebar.Sidebar · ×1
  • Sidebar.Sidebar::handleUpdateProfile (cognitive 21) console/src/layouts/Sidebar.tsx:540 — Sidebar.Sidebar::handleUpdateProfile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 1 (2 pts), error handling 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (Sidebar.Sidebar) 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 · RunToolBatchCard.collectTextBlocks (cognitive 21) · ×1
  • RunToolBatchCard.collectTextBlocks (cognitive 21) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:159 — RunToolBatchCard.collectTextBlocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (5 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownCopy.MarkdownCopy (cognitive 21) · ×1
  • MarkdownCopy.MarkdownCopy (cognitive 21) console/src/components/MarkdownCopy/MarkdownCopy.tsx:45 — MarkdownCopy.MarkdownCopy has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 4 (6 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (copyToClipboard, a function literal at line 70, a function literal at line 62, …). 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 · SessionProjectDirectory.SessionProjectDirectory · ×1
  • SessionProjectDirectory.SessionProjectDirectory::commitSessionList (cognitive 21) console/src/features/project-directory/SessionProjectDirectory.tsx:581 — SessionProjectDirectory.SessionProjectDirectory::commitSessionList has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6 (7 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SessionProjectDirectory.SessionProjectDirectory) 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 · useSkills.useSkills.uploadSkill (cognitive 21) · ×1
  • useSkills.useSkills.uploadSkill (cognitive 21) console/src/pages/Agent/Skills/useSkills.ts:305 — useSkills.useSkills.uploadSkill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1 (2 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 · traceUtils.getToolFieldText (cognitive 21) · ×1
  • traceUtils.getToolFieldText (cognitive 21) console/src/pages/Inbox/utils/traceUtils.ts:171 — traceUtils.getToolFieldText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (6 pts), boolean chains 4 (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 · CommentImageAttachments.CommentImageAttachments (cognitive 21) · ×1
  • CommentImageAttachments.CommentImageAttachments (cognitive 21) console/src/pages/Market/Community/CommentImageAttachments.tsx:37 — CommentImageAttachments.CommentImageAttachments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2, loops 1 (nesting depth added 4). 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 (uploadFiles, deleteImage, a function literal at line 155, …). 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 · useMarketPlugins.useMarketPlugins.loadPlugins (cognitive 21) · ×1
  • useMarketPlugins.useMarketPlugins.loadPlugins (cognitive 21) console/src/pages/Settings/PluginManager/hooks/useMarketPlugins.ts:80 — useMarketPlugins.useMarketPlugins.loadPlugins has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 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: 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 · ModelsSection.ModelsSection (cognitive 21) · ×1
  • ModelsSection.ModelsSection (cognitive 21) console/src/pages/Settings/Models/components/sections/ModelsSection.tsx:32 — ModelsSection.ModelsSection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSave, a function literal at line 52, a function literal at line 67, …). 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 · ProviderConfigModal.ProviderConfigModal (cognitive 21) · ×1
  • ProviderConfigModal.ProviderConfigModal (cognitive 21) console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:296 — ProviderConfigModal.ProviderConfigModal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 34 (37 pts), boolean chains 29, ternaries 16 (22 pts), error handling 4 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ProviderConfigModal.ProviderConfigModal::handleSubmit) 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 · projects.getProjectSnapshot (cognitive 21) · ×1
  • projects.getProjectSnapshot (cognitive 21) plugins/apps/qwenpaw-creator/ui/src/api/creator/projects.ts:57 — projects.getProjectSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetsPage.memoryBuiltVersionIds (cognitive 21) · ×1
  • AssetsPage.memoryBuiltVersionIds (cognitive 21) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:176 — AssetsPage.memoryBuiltVersionIds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetsPage.generationPromptTarget (cognitive 21) · ×1
  • AssetsPage.generationPromptTarget (cognitive 21) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1089 — AssetsPage.generationPromptTarget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (7 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visualVariantCoverage.selectVisualVariantCoverage (cognitive 21) · ×1
  • visualVariantCoverage.selectVisualVariantCoverage (cognitive 21) plugins/apps/qwenpaw-creator/ui/src/selectors/visualVariantCoverage.ts:78 — visualVariantCoverage.selectVisualVariantCoverage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.Blog (cognitive 21) · ×1
  • index.Blog (cognitive 21) website/src/pages/Blog/index.tsx:68 — index.Blog has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 90, 158, 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 · MailClient.get_attachment (cognitive 20) · ×1
  • MailClient.get_attachment (cognitive 20) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:622 — MailClient.get_attachment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadStore.sync (cognitive 20) · ×1
  • ThreadStore.sync (cognitive 20) REDACTED:434 — ThreadStore.sync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · model_routes._grade_whisper_document (cognitive 20) · ×1
  • model_routes._grade_whisper_document (cognitive 20) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2416 — model_routes._grade_whisper_document has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), error handling 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image.get_image_backend (cognitive 20) · ×1
  • image.get_image_backend (cognitive 20) plugins/apps/qwenpaw-creator/backend/models/image/__init__.py:95 — image.get_image_backend has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8 (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 · kling.check_status (cognitive 20) · ×1
  • kling.check_status (cognitive 20) plugins/apps/qwenpaw-creator/backend/models/video_backends/kling.py:240 — kling.check_status has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 2, loops 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.
D2 · Cognitive Complexity · video_capabilities._image_reference_marker_spec (cognitive 20) · ×1
  • video_capabilities._image_reference_marker_spec (cognitive 20) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1469 — video_capabilities._image_reference_marker_spec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (8 pts), boolean chains 4 (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 · SourceIntelligenceIndex.validate_complete_index (cognitive 20) · ×1
  • SourceIntelligenceIndex.validate_complete_index (cognitive 20) plugins/apps/qwenpaw-creator/backend/schemas/assets.py:464 — SourceIntelligenceIndex.validate_complete_index has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 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 · model_context.compact_conversation_history (cognitive 20) · ×1
  • model_context.compact_conversation_history (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_context.py:130 — model_context.compact_conversation_history has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workgraph_execution.workgraph_blocking_reviews (cognitive 20) · ×1
  • workgraph_execution.workgraph_blocking_reviews (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:393 — workgraph_execution.workgraph_blocking_reviews has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (4 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 · audio_execution.execute_file_tts_command (cognitive 20) · ×1
  • audio_execution.execute_file_tts_command (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:407 — audio_execution.execute_file_tts_command has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3, 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 · FileImageExecutionService._read_set_still_current (cognitive 20) · ×1
  • FileImageExecutionService._read_set_still_current (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3195 — FileImageExecutionService._read_set_still_current has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts), error handling 1, loops 1 (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 · FfmpegLocalMediaRunner._normalized_motion (cognitive 20) · ×1
  • FfmpegLocalMediaRunner._normalized_motion (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1861 — FfmpegLocalMediaRunner._normalized_motion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 3, ternaries 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 · AssetFileStore.publish (cognitive 20) · ×1
  • AssetFileStore.publish (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/assets.py:276 — AssetFileStore.publish has cognitive complexity 20 (threshold 15). Drivers by points: error handling 6 (8 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JqProjectTransformer.transform (cognitive 20) · ×1
  • JqProjectTransformer.transform (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/jq_transform.py:52 — JqProjectTransformer.transform has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2, loops 2, ternaries 1 (2 pts) (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 · models._reject_anchor_cycles (cognitive 20) · ×1
  • models._reject_anchor_cycles (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:1989 — models._reject_anchor_cycles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prompt_sync.prompt_sync_status (cognitive 20) · ×1
  • prompt_sync.prompt_sync_status (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:144 — prompt_sync.prompt_sync_status has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serialization._retired_shots_data (cognitive 20) · ×1
  • serialization._retired_shots_data (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:124 — serialization._retired_shots_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serialization._source_document_data (cognitive 20) · ×1
  • serialization._source_document_data (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/project_files/serialization.py:151 — serialization._source_document_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 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 · prompt_sync_service._validate_prompts (cognitive 20) · ×1
  • prompt_sync_service._validate_prompts (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/prompt_sync_service.py:191 — prompt_sync_service._validate_prompts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 3 (5 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 · media_review.run_media_review_loop (cognitive 20) · ×1
  • media_review.run_media_review_loop (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:980 — media_review.run_media_review_loop has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), error handling 2 (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 · search._dedupe_visual_sources_with_query_coverage (cognitive 20) · ×1
  • search._dedupe_visual_sources_with_query_coverage (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/search.py:117 — search._dedupe_visual_sources_with_query_coverage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 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 · visual_jobs._filter_visual_search_result_for_job (cognitive 20) · ×1
  • visual_jobs._filter_visual_search_result_for_job (cognitive 20) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:652 — visual_jobs._filter_visual_search_result_for_job has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (8 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · build_example_archive._prune_superseded_artifacts (cognitive 20) · ×1
  • build_example_archive._prune_superseded_artifacts (cognitive 20) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:117 — build_example_archive._prune_superseded_artifacts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dispatch._element_line (cognitive 20) · ×1
  • dispatch._element_line (cognitive 20) plugins/bundle/computer-use/computer_use/dispatch.py:157 — dispatch._element_line has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DingTalkDriver._message (cognitive 20) · ×1
  • DingTalkDriver._message (cognitive 20) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:451 — DingTalkDriver._message has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 5. 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 · DingTalkDriver._perform_send (cognitive 20) · ×1
  • DingTalkDriver._perform_send (cognitive 20) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:758 — DingTalkDriver._perform_send has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, 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 · utils._build_elements (cognitive 20) · ×1
  • utils._build_elements (cognitive 20) plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:393 — utils._build_elements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 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 · utils.chunk_text (cognitive 20) · ×1
  • utils.chunk_text (cognitive 20) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/utils.py:14 — utils.chunk_text has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexBackend.run_turn (cognitive 20) · ×1
  • CodexBackend.run_turn (cognitive 20) plugins/harness/codex/adapter.py:514 — CodexBackend.run_turn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, error handling 1, 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 · OpenVikingClient._request (cognitive 20) · ×1
  • OpenVikingClient._request (cognitive 20) plugins/memory/openviking/backend/client.py:194 — OpenVikingClient._request has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7, ternaries 3 (6 pts), boolean chains 5, error handling 2 (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 · context.build_scroll_components (cognitive 20) · ×1
  • context.build_scroll_components (cognitive 20) src/qwenpaw/agents/context/__init__.py:138 — context.build_scroll_components has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 pts), boolean chains 4, ternaries 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 · ScrollContextManager._durable_folded_result_contents (cognitive 20) · ×1
  • ScrollContextManager._durable_folded_result_contents (cognitive 20) src/qwenpaw/agents/context/scroll/manager.py:903 — ScrollContextManager._durable_folded_result_contents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · history._protocol_closed_ends (cognitive 20) · ×1
  • history._protocol_closed_ends (cognitive 20) src/qwenpaw/agents/context/visual_compression/pipeline/history.py:113 — history._protocol_closed_ends has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderer._render_text_pages_uncached (cognitive 20) · ×1
  • renderer._render_text_pages_uncached (cognitive 20) src/qwenpaw/agents/context/visual_compression/rendering/renderer.py:713 — renderer._render_text_pages_uncached has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fork_project._apply_crash_recovery (cognitive 20) · ×1
  • fork_project._apply_crash_recovery (cognitive 20) src/qwenpaw/agents/fork_project.py:1223 — fork_project._apply_crash_recovery has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9 (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 · model_factory._reasoning_by_assistant_segment (cognitive 20) · ×1
  • model_factory._reasoning_by_assistant_segment (cognitive 20) src/qwenpaw/agents/model_factory.py:1453 — model_factory._reasoning_by_assistant_segment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwenPawAgent._close_resources (cognitive 20) · ×1
  • QwenPawAgent._close_resources (cognitive 20) src/qwenpaw/agents/react_agent.py:587 — QwenPawAgent._close_resources has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillPoolService.import_from_zip (cognitive 20) · ×1
  • SkillPoolService.import_from_zip (cognitive 20) src/qwenpaw/agents/skill_system/pool_service.py:261 — SkillPoolService.import_from_zip has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 3, ternaries 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 · registry.get_pool_builtin_update_notice (cognitive 20) · ×1
  • registry.get_pool_builtin_update_notice (cognitive 20) src/qwenpaw/agents/skill_system/registry.py:1501 — registry.get_pool_builtin_update_notice has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 2 (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 · message_processing._process_single_block (cognitive 20) · ×1
  • message_processing._process_single_block (cognitive 20) src/qwenpaw/agents/utils/message_processing.py:384 — message_processing._process_single_block has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, 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 · message_request_normalizer._historical_media (cognitive 20) · ×1
  • message_request_normalizer._historical_media (cognitive 20) src/qwenpaw/agents/utils/message_request_normalizer.py:82 — message_request_normalizer._historical_media has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (7 pts), boolean chains 3, ternaries 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 · BaseChannel._format_stream_tool_output_body (cognitive 20) · ×1
  • BaseChannel._format_stream_tool_output_body (cognitive 20) src/qwenpaw/app/channels/base.py:2196 — BaseChannel._format_stream_tool_output_body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 1 (2 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 · IsolatedChannelProxy._send_operation_owned (cognitive 20) · ×1
  • IsolatedChannelProxy._send_operation_owned (cognitive 20) src/qwenpaw/app/channels/isolated_proxy.py:1220 — IsolatedChannelProxy._send_operation_owned has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6 (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 · ChannelManager.stop_one (cognitive 20) · ×1
  • ChannelManager.stop_one (cognitive 20) src/qwenpaw/app/channels/manager.py:1709 — ChannelManager.stop_one has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 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 · CommunityConnectionService._connection_from_tokens (cognitive 20) · ×1
  • CommunityConnectionService._connection_from_tokens (cognitive 20) src/qwenpaw/app/community_connection.py:907 — CommunityConnectionService._connection_from_tokens has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 4, error handling 1, 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 · community_report.generate_community_report (cognitive 20) · ×1
  • community_report.generate_community_report (cognitive 20) src/qwenpaw/app/community_report.py:371 — community_report.generate_community_report has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3, loops 1 (2 pts), boolean chains 1, ternaries 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 · inbox_store.delete_event (cognitive 20) · ×1
  • inbox_store.delete_event (cognitive 20) src/qwenpaw/app/inbox_store.py:208 — inbox_store.delete_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestration.execute_restore (cognitive 20) · ×1
  • orchestration.execute_restore (cognitive 20) src/qwenpaw/backup/orchestration.py:46 — orchestration.execute_restore has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (2 pts), error handling 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, 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 · CdpVerbsMixin._resolve_in_frame (cognitive 20) · ×1
  • CdpVerbsMixin._resolve_in_frame (cognitive 20) src/qwenpaw/browser/control_link/cdp_verbs.py:370 — CdpVerbsMixin._resolve_in_frame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, 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 · SharedEndpointService._validate_endpoint (cognitive 20) · ×1
  • SharedEndpointService._validate_endpoint (cognitive 20) src/qwenpaw/channel_protocol/host.py:394 — SharedEndpointService._validate_endpoint has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 6, error handling 2 (3 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 · SharedResponseDriver._delivery_attempt (cognitive 20) · ×1
  • SharedResponseDriver._delivery_attempt (cognitive 20) src/qwenpaw/channel_protocol/shared_response_driver.py:851 — SharedResponseDriver._delivery_attempt has cognitive complexity 20 (threshold 15). Drivers by points: error handling 7, if/else 5 (6 pts), ternaries 3 (5 pts), boolean chains 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 · agents_cmd._check_task_status (cognitive 20) · ×1
  • agents_cmd._check_task_status (cognitive 20) src/qwenpaw/cli/agents_cmd.py:200 — agents_cmd._check_task_status has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · channels_cmd.configure_channels_interactive (cognitive 20) · ×1
  • channels_cmd.configure_channels_interactive (cognitive 20) src/qwenpaw/cli/channels_cmd.py:769 — channels_cmd.configure_channels_interactive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AcpTransport.close (cognitive 20) · ×1
  • AcpTransport.close (cognitive 20) src/qwenpaw/cli/tui/transport/acp.py:641 — AcpTransport.close has cognitive complexity 20 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 7, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WelcomeMessage._compose_frame (cognitive 20) · ×1
  • WelcomeMessage._compose_frame (cognitive 20) src/qwenpaw/cli/tui/widgets/messages.py:265 — WelcomeMessage._compose_frame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config._default_builtin_tools (cognitive 20) · ×1
  • config._default_builtin_tools (cognitive 20) src/qwenpaw/config/config.py:2986 — config._default_builtin_tools has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contracts._validate_driver_policy (cognitive 20) · ×1
  • contracts._validate_driver_policy (cognitive 20) src/qwenpaw/drivers/contracts.py:178 — contracts._validate_driver_policy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detectors._check_comment_quote_desync (cognitive 20) · ×1
  • detectors._check_comment_quote_desync (cognitive 20) src/qwenpaw/governance/detectors.py:732 — detectors._check_comment_quote_desync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (7 pts), boolean chains 1, 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 · middleware._format_messages (cognitive 20) · ×1
  • middleware._format_messages (cognitive 20) src/qwenpaw/modes/advisor/middleware.py:219 — middleware._format_messages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 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 · dependencies._provides_loaded_modules (cognitive 20) · ×1
  • dependencies._provides_loaded_modules (cognitive 20) src/qwenpaw/plugins/execution/dependencies.py:495 — dependencies._provides_loaded_modules has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · module_isolation._has_importable_code (cognitive 20) · ×1
  • module_isolation._has_importable_code (cognitive 20) src/qwenpaw/plugins/module_isolation.py:394 — module_isolation._has_importable_code has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _RolloutMetadataState.update (cognitive 20) · ×1
  • _RolloutMetadataState.update (cognitive 20) src/qwenpaw/portability/providers/codex_rollout_reader.py:137 — _RolloutMetadataState.update has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · external_state._project_cwd_from_transcripts (cognitive 20) · ×1
  • external_state._project_cwd_from_transcripts (cognitive 20) src/qwenpaw/portability/providers/external_state.py:231 — external_state._project_cwd_from_transcripts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 3 (6 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 · cache_policy.mark_stable_prefix (cognitive 20) · ×1
  • cache_policy.mark_stable_prefix (cognitive 20) src/qwenpaw/providers/adapters/cache_policy.py:79 — cache_policy.mark_stable_prefix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 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 · GeminiProvider._normalize_models_payload (cognitive 20) · ×1
  • GeminiProvider._normalize_models_payload (cognitive 20) src/qwenpaw/providers/gemini_provider.py:220 — GeminiProvider._normalize_models_payload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · provider_model_state.migrate_provider_snapshot (cognitive 20) · ×1
  • provider_model_state.migrate_provider_snapshot (cognitive 20) src/qwenpaw/providers/provider_model_state.py:265 — provider_model_state.migrate_provider_snapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file_guardian._extract_paths_from_shell_command (cognitive 20) · ×1
  • file_guardian._extract_paths_from_shell_command (cognitive 20) src/qwenpaw/security/tool_guard/guardians/file_guardian.py:256 — file_guardian._extract_paths_from_shell_command has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2, error handling 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 · shell_evasion_guardian._check_comment_quote_desync (cognitive 20) · ×1
  • shell_evasion_guardian._check_comment_quote_desync (cognitive 20) src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:377 — shell_evasion_guardian._check_comment_quote_desync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (7 pts), boolean chains 1, 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 · turn_usage.add_session_cache_usage (cognitive 20) · ×1
  • turn_usage.add_session_cache_usage (cognitive 20) src/qwenpaw/token_usage/turn_usage.py:73 — turn_usage.add_session_cache_usage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8, loops 1, ternaries 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 · image_resize.resize_base64_image (cognitive 20) · ×1
  • image_resize.resize_base64_image (cognitive 20) src/qwenpaw/utils/image_resize.py:80 — image_resize.resize_base64_image has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · error.formatApiError (cognitive 20) · ×1
  • error.formatApiError (cognitive 20) console/src/api/error.ts:18 — error.formatApiError has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 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.SessionListPollingController (cognitive 20) · ×1
  • index.SessionListPollingController (cognitive 20) console/src/components/SessionListPollingController/index.tsx:15 — index.SessionListPollingController has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, error handling 1 (nesting depth added 2). None of this is in the body itself: all 20 points belong to 5 function literals inside it that branch (lines 26, 61, 74, …). 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 · chunkServerReadiness.waitForChunkServerReady (cognitive 20) · ×1
  • chunkServerReadiness.waitForChunkServerReady (cognitive 20) console/src/utils/chunkServerReadiness.ts:104 — chunkServerReadiness.waitForChunkServerReady has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunkDiagnostics.recheckChunkResource (cognitive 20) · ×1
  • chunkDiagnostics.recheckChunkResource (cognitive 20) console/src/utils/chunkDiagnostics.ts:186 — chunkDiagnostics.recheckChunkResource has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 204). 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 · DefaultBlock.DefaultBlock (cognitive 20) · ×1
  • DefaultBlock.DefaultBlock (cognitive 20) console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:119 — DefaultBlock.DefaultBlock has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 6, if/else 5 (nesting depth added 3). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (renderContent, a function literal at line 146, a function literal at line 130, …). 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 · toolCalls.subscribeToolCallStream (cognitive 20) · ×1
  • toolCalls.subscribeToolCallStream (cognitive 20) console/src/api/modules/toolCalls.ts:72 — toolCalls.subscribeToolCallStream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 84). 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 · MediaPreview.MediaPreview (cognitive 20) · ×1
  • MediaPreview.MediaPreview (cognitive 20) console/src/components/Chat/ToolCards/shared/MediaPreview.tsx:39 — MediaPreview.MediaPreview has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 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 · useDirectoryListing.useDirectoryListing.load (cognitive 20) · ×1
  • useDirectoryListing.useDirectoryListing.load (cognitive 20) console/src/features/files-workspace/useDirectoryListing.ts:65 — useDirectoryListing.useDirectoryListing.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 5 (6 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuoteSelection.QuoteSelection (cognitive 20) · ×1
  • QuoteSelection.QuoteSelection (cognitive 20) console/src/pages/Chat/QuoteSelection.tsx:13 — QuoteSelection.QuoteSelection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 5. Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 36, quote, a function literal at line 103, …). 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 · BackendModelSelector.BackendModelSelector (cognitive 20) · ×1
  • BackendModelSelector.BackendModelSelector (cognitive 20) console/src/pages/Chat/components/BackendModelSelector.tsx:26 — BackendModelSelector.BackendModelSelector has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 78, 55, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CommunityRelatedResources.CommunityRelatedResources (cognitive 20) · ×1
  • CommunityRelatedResources.CommunityRelatedResources (cognitive 20) console/src/pages/Inbox/components/CommunityRelatedResources.tsx:19 — CommunityRelatedResources.CommunityRelatedResources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 26, 57, 60, …). 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 · articleToc.parseMarkdownToc (cognitive 20) · ×1
  • articleToc.parseMarkdownToc (cognitive 20) console/src/pages/Market/Community/articleToc.ts:74 — articleToc.parseMarkdownToc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentGallery.AgentTile (cognitive 20) · ×1
  • AgentGallery.AgentTile (cognitive 20) console/src/pages/Settings/Agents/components/AgentGallery.tsx:55 — AgentGallery.AgentTile has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11, boolean chains 9. Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 87). 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 · useSkillPool.useSkillPool.handleSavePoolSkill · ×1
  • useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill (cognitive 20) console/src/pages/Settings/SkillPool/useSkillPool.tsx:990 — useSkillPool.useSkillPool.handleSavePoolSkill::persistPoolSkill has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (7 pts), if/else 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (useSkillPool.useSkillPool.handleSavePoolSkill) 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.SkillPoolPage (cognitive 20) · ×1
  • index.SkillPoolPage (cognitive 20) console/src/pages/Settings/SkillPool/index.tsx:32 — index.SkillPoolPage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 4 (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 · timelines.snapshotTimelineCopy (cognitive 20) · ×1
  • timelines.snapshotTimelineCopy (cognitive 20) plugins/apps/qwenpaw-creator/ui/src/api/creator/timelines.ts:314 — timelines.snapshotTimelineCopy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (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 · ExecutionAuthorizationCard.ExecutionAuthorizationCard · ×1
  • ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun (cognitive 20) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:379 — ExecutionAuthorizationCard.ExecutionAuthorizationCard::continueRun has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 1, ternaries 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. This shape REPEATS in the file: one other method here (ExecutionAuthorizationCard.ExecutionAuthorizationCard) 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 · AgentEventFeed.originRunStatus (cognitive 20) · ×1
  • AgentEventFeed.originRunStatus (cognitive 20) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentEventFeed.tsx:87 — AgentEventFeed.originRunStatus has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 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, 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 · BlueprintRoughCutStrip.PreviewCinema (cognitive 20) · ×1
  • BlueprintRoughCutStrip.PreviewCinema (cognitive 20) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintRoughCutStrip.tsx:111 — BlueprintRoughCutStrip.PreviewCinema has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 7). Of this number, 12 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementList.ElementList (cognitive 20) · ×1
  • ElementList.ElementList (cognitive 20) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementList.tsx:88 — ElementList.ElementList has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 6, if/else 5 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 106, 183, 193). 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 · service_worker.createTab (cognitive 20) · ×1
  • service_worker.createTab (cognitive 20) plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:537 — service_worker.createTab has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, ternaries 4, if/else 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 · WorksForYou.WorksForYou (cognitive 20) · ×1
  • WorksForYou.WorksForYou (cognitive 20) website/src/pages/Home/components/WorksForYou.tsx:83 — WorksForYou.WorksForYou has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, ternaries 5, boolean chains 3. Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 143, a function literal at line 175, a function literal at line 99, …). 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 · example_routes._load_manifest (cognitive 19) · ×1
  • example_routes._load_manifest (cognitive 19) plugins/apps/qwenpaw-creator/backend/api/example_routes.py:91 — example_routes._load_manifest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (3 pts), boolean chains 2, loops 1, ternaries 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 · model_routes.get_host_provider_api_key (cognitive 19) · ×1
  • model_routes.get_host_provider_api_key (cognitive 19) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:497 — model_routes.get_host_provider_api_key has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_routes.request_tool_configs (cognitive 19) · ×1
  • model_routes.request_tool_configs (cognitive 19) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:804 — model_routes.request_tool_configs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_routes.patch_self_review (cognitive 19) · ×1
  • model_routes.patch_self_review (cognitive 19) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1391 — model_routes.patch_self_review has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_routes._grade_qwen3_document (cognitive 19) · ×1
  • model_routes._grade_qwen3_document (cognitive 19) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:2453 — model_routes._grade_qwen3_document has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 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 · asr_model._post_with_retry (cognitive 19) · ×1
  • asr_model._post_with_retry (cognitive 19) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:452 — asr_model._post_with_retry has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 2 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · embedding_model._post_batch (cognitive 19) · ×1
  • embedding_model._post_batch (cognitive 19) plugins/apps/qwenpaw-creator/backend/models/embedding_model.py:39 — embedding_model._post_batch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · video_capabilities.video_model_capability (cognitive 19) · ×1
  • video_capabilities.video_model_capability (cognitive 19) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:801 — video_capabilities.video_model_capability has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, 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 · video_model._build_kling_body (cognitive 19) · ×1
  • video_model._build_kling_body (cognitive 19) plugins/apps/qwenpaw-creator/backend/models/video_model.py:413 — video_model._build_kling_body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 2 (3 pts), loops 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, 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 · smoke_web_grounding.main (cognitive 19) · ×1
  • smoke_web_grounding.main (cognitive 19) plugins/apps/qwenpaw-creator/backend/scripts/smoke_web_grounding.py:231 — smoke_web_grounding.main has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts), loops 1 (2 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 · FileCreatorAgentRuntime._run_message (cognitive 19) · ×1
  • FileCreatorAgentRuntime._run_message (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:2731 — FileCreatorAgentRuntime._run_message has cognitive complexity 19 (threshold 15). Drivers by points: error handling 10, if/else 3 (4 pts), ternaries 3, boolean chains 2 (nesting depth added 1). To reduce it, split the body into named stages: move each independent 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 · FileCreatorAgentRuntime._run_mainline_workgraph_execution (cognitive 19) · ×1
  • FileCreatorAgentRuntime._run_mainline_workgraph_execution (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4003 — FileCreatorAgentRuntime._run_mainline_workgraph_execution has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2, ternaries 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 · FileCreatorAgentRuntime._require_creation_checkpoints (cognitive 19) · ×1
  • FileCreatorAgentRuntime._require_creation_checkpoints (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:7145 — FileCreatorAgentRuntime._require_creation_checkpoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._creation_checkpoint_record (cognitive 19) · ×1
  • FileCreatorAgentRuntime._creation_checkpoint_record (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:7296 — FileCreatorAgentRuntime._creation_checkpoint_record has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 3 (7 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · driver._message_text (cognitive 19) · ×1
  • driver._message_text (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:9460 — driver._message_text has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · driver._specialist_tool_recovery (cognitive 19) · ×1
  • driver._specialist_tool_recovery (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:10060 — driver._specialist_tool_recovery has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 9. 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 · native_media.video_frame_content_parts (cognitive 19) · ×1
  • native_media.video_frame_content_parts (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py:535 — native_media.video_frame_content_parts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 1 (2 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 · workgraph_execution.summarize_workgraph_results (cognitive 19) · ×1
  • workgraph_execution.summarize_workgraph_results (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/workgraph_execution.py:151 — workgraph_execution.summarize_workgraph_results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 7, ternaries 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 · r2v_execution._resolve_single_media_version (cognitive 19) · ×1
  • r2v_execution._resolve_single_media_version (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:729 — r2v_execution._resolve_single_media_version has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, ternaries 2 (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 · visual_design_readiness._lineup_readiness_issues (cognitive 19) · ×1
  • visual_design_readiness._lineup_readiness_issues (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_design_readiness.py:138 — visual_design_readiness._lineup_readiness_issues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 3 (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 · approved_prompt.saved_authorization_prompt (cognitive 19) · ×1
  • approved_prompt.saved_authorization_prompt (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/project_files/approved_prompt.py:8 — approved_prompt.saved_authorization_prompt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreatorFileServices._publish_review_followup (cognitive 19) · ×1
  • CreatorFileServices._publish_review_followup (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:655 — CreatorFileServices._publish_review_followup has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 7 (8 pts), boolean chains 1, error handling 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, 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 · ProjectStore.list (cognitive 19) · ×1
  • ProjectStore.list (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:422 — ProjectStore.list has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · store._cover_reference (cognitive 19) · ×1
  • store._cover_reference (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/project_files/store.py:132 — store._cover_reference has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 2 (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 · admission.active_sync_fences (cognitive 19) · ×1
  • admission.active_sync_fences (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:467 — admission.active_sync_fences has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (6 pts), error handling 3 (5 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 · SourceMediaAnalysisService._module_result_sync (cognitive 19) · ×1
  • SourceMediaAnalysisService._module_result_sync (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:711 — SourceMediaAnalysisService._module_result_sync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triage._infer_grounding_domain (cognitive 19) · ×1
  • triage._infer_grounding_domain (cognitive 19) plugins/apps/qwenpaw-creator/backend/services/web_grounding/triage.py:303 — triage._infer_grounding_domain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dev_watch.main (cognitive 19) · ×1
  • dev_watch.main (cognitive 19) plugins/apps/qwenpaw-creator/scripts/dev_watch.py:108 — dev_watch.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (6 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelSettingsService.describe (cognitive 19) · ×1
  • ModelSettingsService.describe (cognitive 19) plugins/apps/qwenpaw-data/backend/model_settings.py:169 — ModelSettingsService.describe has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 3, if/else 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · A2AMode._handle_list (cognitive 19) · ×1
  • A2AMode._handle_list (cognitive 19) plugins/bundle/cloudpaw/a2a_mode.py:131 — A2AMode._handle_list has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AzureBotPlatform._watchdog (cognitive 19) · ×1
  • AzureBotPlatform._watchdog (cognitive 19) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/platform.py:162 — AzureBotPlatform._watchdog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), error handling 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkTransport._recover_active_cards (cognitive 19) · ×1
  • DingTalkTransport._recover_active_cards (cognitive 19) REDACTED:1502 — DingTalkTransport._recover_active_cards has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), error handling 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeishuDriver._message (cognitive 19) · ×1
  • FeishuDriver._message (cognitive 19) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:306 — FeishuDriver._message has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LarkOapiPlatform._native_message (cognitive 19) · ×1
  • LarkOapiPlatform._native_message (cognitive 19) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:1636 — LarkOapiPlatform._native_message has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 2 (5 pts), loops 1 (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 · MatrixPlatform._get_display_name (cognitive 19) · ×1
  • MatrixPlatform._get_display_name (cognitive 19) REDACTED:1769 — MatrixPlatform._get_display_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), boolean chains 2, 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 · MatrixStateStore.bind (cognitive 19) · ×1
  • MatrixStateStore.bind (cognitive 19) plugins/channel/matrix/qwenpaw_channel_matrix/state.py:377 — MatrixStateStore.bind has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, 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, 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 · QQPlatform._request (cognitive 19) · ×1
  • QQPlatform._request (cognitive 19) plugins/channel/qq/qwenpaw_channel_qq/platform.py:293 — QQPlatform._request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 4 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelegramRequest.do_request (cognitive 19) · ×1
  • TelegramRequest.do_request (cognitive 19) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:451 — TelegramRequest.do_request has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (2 pts), ternaries 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 · VoicePlatform._close_resources_once (cognitive 19) · ×1
  • VoicePlatform._close_resources_once (cognitive 19) plugins/channel/voice/qwenpaw_channel_voice/platform.py:715 — VoicePlatform._close_resources_once has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeChatPlatform._poll (cognitive 19) · ×1
  • WeChatPlatform._poll (cognitive 19) REDACTED:169 — WeChatPlatform._poll has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (7 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 · XiaoYiDriver._before_cleanup_complete (cognitive 19) · ×1
  • XiaoYiDriver._before_cleanup_complete (cognitive 19) plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:197 — XiaoYiDriver._before_cleanup_complete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenManager._do_fetch (cognitive 19) · ×1
  • TokenManager._do_fetch (cognitive 19) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/auth.py:136 — TokenManager._do_fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codec._to_proto_msg_body (cognitive 19) · ×1
  • codec._to_proto_msg_body (cognitive 19) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:605 — codec._to_proto_msg_body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (codec._from_proto_msg_body) 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 · codec._from_proto_msg_body (cognitive 19) · ×1
  • codec._from_proto_msg_body (cognitive 19) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/codec.py:639 — codec._from_proto_msg_body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (codec._to_proto_msg_body) 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 · CodexBackend.models (cognitive 19) · ×1
  • CodexBackend.models (cognitive 19) plugins/harness/codex/adapter.py:244 — CodexBackend.models has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexBackend._run_review (cognitive 19) · ×1
  • CodexBackend._run_review (cognitive 19) plugins/harness/codex/adapter.py:881 — CodexBackend._run_review has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 2, 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 · CodexBackend._history_item (cognitive 19) · ×1
  • CodexBackend._history_item (cognitive 19) plugins/harness/codex/adapter.py:1068 — CodexBackend._history_item has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 2 (4 pts) (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 · event_mapper.history_items (cognitive 19) · ×1
  • event_mapper.history_items (cognitive 19) plugins/harness/qoder/event_mapper.py:184 — event_mapper.history_items has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wan27_tool.reference_to_video_wan (cognitive 19) · ×1
  • wan27_tool.reference_to_video_wan (cognitive 19) plugins/tool/wan27/wan27_tool.py:694 — wan27_tool.reference_to_video_wan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 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 · DecisionCompactor._compact (cognitive 19) · ×1
  • DecisionCompactor._compact (cognitive 19) src/qwenpaw/agents/context/decision_compaction.py:85 — DecisionCompactor._compact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MemorySpace._raw_saved_tool_refs (cognitive 19) · ×1
  • MemorySpace._raw_saved_tool_refs (cognitive 19) src/qwenpaw/agents/context/scroll/memoryspace.py:1785 — MemorySpace._raw_saved_tool_refs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (2 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 · proactive_trigger.proactive_trigger_loop (cognitive 19) · ×1
  • proactive_trigger.proactive_trigger_loop (cognitive 19) src/qwenpaw/agents/memory/proactive/proactive_trigger.py:265 — proactive_trigger.proactive_trigger_loop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._github_collect_tree_files (cognitive 19) · ×1
  • hub._github_collect_tree_files (cognitive 19) src/qwenpaw/agents/skill_system/hub.py:1316 — hub._github_collect_tree_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, loops 2 (3 pts), 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 · registry._resolve_pool_builtin_language (cognitive 19) · ×1
  • registry._resolve_pool_builtin_language (cognitive 19) src/qwenpaw/agents/skill_system/registry.py:448 — registry._resolve_pool_builtin_language has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registry.check_skill_dependencies (cognitive 19) · ×1
  • registry.check_skill_dependencies (cognitive 19) src/qwenpaw/agents/skill_system/registry.py:1231 — registry.check_skill_dependencies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_snapshot._process_line (cognitive 19) · ×1
  • browser_snapshot._process_line (cognitive 19) src/qwenpaw/agents/tools/deprecated_browser/browser_snapshot.py:135 — browser_snapshot._process_line has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2 (4 pts) (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 · desktop_screenshot._capture_macos_screencapture (cognitive 19) · ×1
  • desktop_screenshot._capture_macos_screencapture (cognitive 19) src/qwenpaw/agents/tools/desktop_screenshot.py:90 — desktop_screenshot._capture_macos_screencapture has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 5 (7 pts), boolean chains 4 (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 · view_media._resolve_remote_image_target (cognitive 19) · ×1
  • view_media._resolve_remote_image_target (cognitive 19) src/qwenpaw/agents/tools/view_media.py:163 — view_media._resolve_remote_image_target has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (7 pts), if/else 6 (7 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · BaseChannel._extract_chat_name (cognitive 19) · ×1
  • BaseChannel._extract_chat_name (cognitive 19) src/qwenpaw/app/channels/base.py:516 — BaseChannel._extract_chat_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityConnectionService._password_reconnect (cognitive 19) · ×1
  • CommunityConnectionService._password_reconnect (cognitive 19) src/qwenpaw/app/community_connection.py:829 — CommunityConnectionService._password_reconnect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 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 · community_diagnostics.matching_logs (cognitive 19) · ×1
  • community_diagnostics.matching_logs (cognitive 19) src/qwenpaw/app/community_diagnostics.py:61 — community_diagnostics.matching_logs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MailMonitorService._worker (cognitive 19) · ×1
  • MailMonitorService._worker (cognitive 19) REDACTED:1421 — MailMonitorService._worker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config_service.driver_policy_from_mcp_access_update (cognitive 19) · ×1
  • config_service.driver_policy_from_mcp_access_update (cognitive 19) src/qwenpaw/app/mcp/config_service.py:464 — config_service.driver_policy_from_mcp_access_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiAgentManager.start_all_configured_agents (cognitive 19) · ×1
  • MultiAgentManager.start_all_configured_agents (cognitive 19) src/qwenpaw/app/multi_agent_manager.py:1433 — MultiAgentManager.start_all_configured_agents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, error handling 1 (2 pts), loops 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, 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 · console._persist_pending_model_settings (cognitive 19) · ×1
  • console._persist_pending_model_settings (cognitive 19) src/qwenpaw/app/routers/console.py:149 — console._persist_pending_model_settings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mail_access_control._group_action_entries (cognitive 19) · ×1
  • mail_access_control._group_action_entries (cognitive 19) src/qwenpaw/app/routers/mail_access_control.py:142 — mail_access_control._group_action_entries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (3 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 · restore._stage_agents (cognitive 19) · ×1
  • restore._stage_agents (cognitive 19) src/qwenpaw/backup/_ops/restore.py:283 — restore._stage_agents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cdp_tree.dom_attrs_by_backend (cognitive 19) · ×1
  • cdp_tree.dom_attrs_by_backend (cognitive 19) src/qwenpaw/browser/control_link/cdp_tree.py:111 — cdp_tree.dom_attrs_by_backend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NMBridge.request (cognitive 19) · ×1
  • NMBridge.request (cognitive 19) src/qwenpaw/browser/control_link/chrome/bridge.py:411 — NMBridge.request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (5 pts), error handling 3, boolean chains 2 (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 · normalization.normalize_inbound_event (cognitive 19) · ×1
  • normalization.normalize_inbound_event (cognitive 19) src/qwenpaw/channel_protocol/normalization.py:8 — normalization.normalize_inbound_event has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · clean_cmd.clean_cmd (cognitive 19) · ×1
  • clean_cmd.clean_cmd (cognitive 19) src/qwenpaw/cli/clean_cmd.py:27 — clean_cmd.clean_cmd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 1 (2 pts), loops 2, 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, 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 · doctor_cmd._check_active_llm (cognitive 19) · ×1
  • doctor_cmd._check_active_llm (cognitive 19) src/qwenpaw/cli/doctor_cmd.py:321 — doctor_cmd._check_active_llm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (2 pts) (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 · plugin_commands._dependency_operation (cognitive 19) · ×1
  • plugin_commands._dependency_operation (cognitive 19) REDACTED:816 — plugin_commands._dependency_operation has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills_cmd.configure_skills_interactive (cognitive 19) · ×1
  • skills_cmd.configure_skills_interactive (cognitive 19) src/qwenpaw/cli/skills_cmd.py:524 — skills_cmd.configure_skills_interactive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_cmd._isolated_skills_workspace (cognitive 19) · ×1
  • task_cmd._isolated_skills_workspace (cognitive 19) src/qwenpaw/cli/task_cmd.py:23 — task_cmd._isolated_skills_workspace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · launch._resolve_workspace_dir (cognitive 19) · ×1
  • launch._resolve_workspace_dir (cognitive 19) src/qwenpaw/cli/tui/launch.py:40 — launch._resolve_workspace_dir has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 8). 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 · update_cmd.run_update_worker (cognitive 19) · ×1
  • update_cmd.run_update_worker (cognitive 19) src/qwenpaw/cli/update_cmd.py:582 — update_cmd.run_update_worker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp_legacy_config.legacy_mcp_client_to_driver (cognitive 19) · ×1
  • mcp_legacy_config.legacy_mcp_client_to_driver (cognitive 19) src/qwenpaw/drivers/adapters/mcp_legacy_config.py:202 — mcp_legacy_config.legacy_mcp_client_to_driver has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), loops 2 (3 pts), ternaries 1 (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 · mcp_streamable_http._param_value_to_header_string (cognitive 19) · ×1
  • mcp_streamable_http._param_value_to_header_string (cognitive 19) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:260 — mcp_streamable_http._param_value_to_header_string has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 4 (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 · DockerRuntimeProvisioner._wait_until_ready (cognitive 19) · ×1
  • DockerRuntimeProvisioner._wait_until_ready (cognitive 19) REDACTED:620 — DockerRuntimeProvisioner._wait_until_ready has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 3 (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 · ToolCallBudgetGate._latest_tool_names (cognitive 19) · ×1
  • ToolCallBudgetGate._latest_tool_names (cognitive 19) src/qwenpaw/loop/gates/limits.py:211 — ToolCallBudgetGate._latest_tool_names has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManagedService.stop (cognitive 19) · ×1
  • ManagedService.stop (cognitive 19) src/qwenpaw/pawapp/service.py:386 — ManagedService.stop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api._restore_agent_tools_from_snapshot (cognitive 19) · ×1
  • api._restore_agent_tools_from_snapshot (cognitive 19) src/qwenpaw/plugins/api.py:499 — api._restore_agent_tools_from_snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · azure_legacy._validate (cognitive 19) · ×1
  • azure_legacy._validate (cognitive 19) src/qwenpaw/plugins/azure_legacy.py:60 — azure_legacy._validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worker.main (cognitive 19) · ×1
  • worker.main (cognitive 19) src/qwenpaw/plugins/execution/worker.py:442 — worker.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 3, 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 · provision._recover_plugin_migrating_inventory (cognitive 19) · ×1
  • provision._recover_plugin_migrating_inventory (cognitive 19) src/qwenpaw/plugins/provision.py:770 — provision._recover_plugin_migrating_inventory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 2 (3 pts), loops 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.
D2 · Cognitive Complexity · PluginTestHost.close (cognitive 19) · ×1
  • PluginTestHost.close (cognitive 19) src/qwenpaw/plugins/testing.py:252 — PluginTestHost.close has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, error handling 1 (3 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 · compatibility_testing._callback_function (cognitive 19) · ×1
  • compatibility_testing._callback_function (cognitive 19) src/qwenpaw/portability/compatibility_testing.py:232 — compatibility_testing._callback_function has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qoder_sessions._raw_history_items (cognitive 19) · ×1
  • qoder_sessions._raw_history_items (cognitive 19) src/qwenpaw/portability/providers/qoder_sessions.py:473 — qoder_sessions._raw_history_items has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashscope_discovery.model_card (cognitive 19) · ×1
  • dashscope_discovery.model_card (cognitive 19) src/qwenpaw/providers/dashscope_discovery.py:23 — dashscope_discovery.model_card has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, loops 2 (3 pts) (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 · DashScopeProvider._apply_thinking_config (cognitive 19) · ×1
  • DashScopeProvider._apply_thinking_config (cognitive 19) src/qwenpaw/providers/dashscope_provider.py:134 — DashScopeProvider._apply_thinking_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 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 · model_sync.reconcile_models (cognitive 19) · ×1
  • model_sync.reconcile_models (cognitive 19) src/qwenpaw/providers/model_sync.py:36 — model_sync.reconcile_models has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 2 (3 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 · OpenAIProvider._normalize_models_payload (cognitive 19) · ×1
  • OpenAIProvider._normalize_models_payload (cognitive 19) src/qwenpaw/providers/openai_provider.py:203 — OpenAIProvider._normalize_models_payload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerDiscoveryMixin.check_provider_model (cognitive 19) · ×1
  • ProviderManagerDiscoveryMixin.check_provider_model (cognitive 19) src/qwenpaw/providers/provider_manager_discovery.py:458 — ProviderManagerDiscoveryMixin.check_provider_model has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecurityRule.scan_content (cognitive 19) · ×1
  • SecurityRule.scan_content (cognitive 19) src/qwenpaw/security/skill_scanner/analyzers/pattern_analyzer.py:93 — SecurityRule.scan_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safety_checks._extract_recursive_rm_targets (cognitive 19) · ×1
  • safety_checks._extract_recursive_rm_targets (cognitive 19) src/qwenpaw/security/tool_guard/safety_checks.py:886 — safety_checks._extract_recursive_rm_targets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2, 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 · ToolCoordinator._supervise_loop (cognitive 19) · ×1
  • ToolCoordinator._supervise_loop (cognitive 19) src/qwenpaw/tool_calls/_coordinator.py:910 — ToolCoordinator._supervise_loop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · store.topoSort (cognitive 19) · ×1
  • store.topoSort (cognitive 19) console/src/plugins/registry/store.ts:284 — store.topoSort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunkRecovery.reloadAfterChunkError (cognitive 19) · ×1
  • chunkRecovery.reloadAfterChunkError (cognitive 19) console/src/utils/chunkRecovery.ts:152 — chunkRecovery.reloadAfterChunkError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (2 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 · useOsNotifyPoller.useOsNotifyPoller (cognitive 19) · ×1
  • useOsNotifyPoller.useOsNotifyPoller (cognitive 19) console/src/os/useOsNotifyPoller.ts:39 — useOsNotifyPoller.useOsNotifyPoller has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 9, error handling 1. None of this is in the body itself: all 19 points belong to 8 function literals inside it that branch (lines 66, 81, 121, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SchedulePicker.SchedulePicker (cognitive 19) · ×1
  • SchedulePicker.SchedulePicker (cognitive 19) console/src/components/interaction/SchedulePicker.tsx:13 — SchedulePicker.SchedulePicker has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 5, if/else 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 6 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 · ResponseArtifactList.extractResponseArtifacts (cognitive 19) · ×1
  • ResponseArtifactList.extractResponseArtifacts (cognitive 19) console/src/features/files-workspace/ResponseArtifactList.tsx:199 — ResponseArtifactList.extractResponseArtifacts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAgentConfig.useAgentConfig.handleSave (cognitive 19) · ×1
  • useAgentConfig.useAgentConfig.handleSave (cognitive 19) console/src/pages/Agent/Config/useAgentConfig.tsx:121 — useAgentConfig.useAgentConfig.handleSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillCard.SkillCard (cognitive 19) · ×1
  • SkillCard.SkillCard (cognitive 19) console/src/pages/Agent/Skills/components/SkillCard.tsx:28 — SkillCard.SkillCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8, if/else 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 6 belong to 2 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 · AppCard.AppCard (cognitive 19) · ×1
  • AppCard.AppCard (cognitive 19) console/src/pages/AppCenter/AppCard.tsx:43 — AppCard.AppCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 10 points are the body's own statements and 9 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 · index.WhisperSpeechButton (cognitive 19) · ×1
  • index.WhisperSpeechButton (cognitive 19) console/src/pages/Chat/components/WhisperSpeechButton/index.tsx:93 — index.WhisperSpeechButton has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 5, if/else 5, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 110, 201, 102, …). 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 · ExecutionModelSelect.ExecutionModelSelect (cognitive 19) · ×1
  • ExecutionModelSelect.ExecutionModelSelect (cognitive 19) console/src/pages/Control/CronJobs/components/ExecutionModelSelect.tsx:20 — ExecutionModelSelect.ExecutionModelSelect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 4. Of this number, 12 points are the body's own statements and 7 belong to 5 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 · usePluginManager.usePluginManager.updateAll (cognitive 19) · ×1
  • usePluginManager.usePluginManager.updateAll (cognitive 19) console/src/pages/Settings/PluginManager/hooks/usePluginManager.ts:205 — usePluginManager.usePluginManager.updateAll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.PawAppsPage (cognitive 19) · ×1
  • index.PawAppsPage (cognitive 19) console/src/pages/Settings/PawApps/index.tsx:12 — index.PawAppsPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (13 pts), boolean chains 4, error handling 1, if/else 1 (nesting depth added 8). Of this number, 12 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImportBuiltinModal.ImportBuiltinModal (cognitive 19) · ×1
  • ImportBuiltinModal.ImportBuiltinModal (cognitive 19) console/src/pages/Settings/SkillPool/components/ImportBuiltinModal.tsx:28 — ImportBuiltinModal.ImportBuiltinModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, ternaries 6, boolean chains 5, match/switch 1. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 174, resolveLanguage, a function literal at line 50, …). 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 · BlueprintPrepDrawer.SourceDetail (cognitive 19) · ×1
  • BlueprintPrepDrawer.SourceDetail (cognitive 19) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:469 — BlueprintPrepDrawer.SourceDetail has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), ternaries 4 (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 · TimelineTracks.TimelineTracks (cognitive 19) · ×1
  • TimelineTracks.TimelineTracks (cognitive 19) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:141 — TimelineTracks.TimelineTracks has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 49 (80 pts), if/else 51 (56 pts), boolean chains 37, loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TimelineTracks.TimelineTracks::renderBlock) 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 · AssetsPage.VoiceGenerationModal (cognitive 19) · ×1
  • AssetsPage.VoiceGenerationModal (cognitive 19) plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1311 — AssetsPage.VoiceGenerationModal has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, ternaries 7, if/else 3, error handling 1. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (submit, a function literal at line 1333, a function literal at line 1323, …). 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.PetControlPage (cognitive 19) · ×1
  • index.PetControlPage (cognitive 19) plugins/bundle/qwenpaw-pet/frontend/src/index.tsx:167 — index.PetControlPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 28 (37 pts), boolean chains 25, ternaries 15 (20 pts), loops 6 (9 pts), error handling 5 (nesting depth added 17). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (index.PetControlPage::startDesktop, index.PetControlPage::onDropFiles) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · useHarnessConnection.useHarnessConnection.connect (cognitive 19) · ×1
  • useHarnessConnection.useHarnessConnection.connect (cognitive 19) plugins/harness/_shared/ui/useHarnessConnection.ts:195 — useHarnessConnection.useHarnessConnection.connect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 2, boolean chains 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ThreadStore.add_message (cognitive 18) · ×1
  • ThreadStore.add_message (cognitive 18) REDACTED:352 — ThreadStore.add_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (nesting depth added 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 · project_file_routes._recover_patch_response (cognitive 18) · ×1
  • project_file_routes._recover_patch_response (cognitive 18) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:308 — project_file_routes._recover_patch_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · asr_model._whisper (cognitive 18) · ×1
  • asr_model._whisper (cognitive 18) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:1026 — asr_model._whisper has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.get_video_backend (cognitive 18) · ×1
  • config.get_video_backend (cognitive 18) plugins/apps/qwenpaw-creator/backend/models/config.py:1905 — config.get_video_backend has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 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 · minimax._check_h3_status (cognitive 18) · ×1
  • minimax._check_h3_status (cognitive 18) plugins/apps/qwenpaw-creator/backend/models/video_backends/minimax.py:373 — minimax._check_h3_status has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 4 (6 pts) (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 · FileCreatorAgentRuntime._run_subagent (cognitive 18) · ×1
  • FileCreatorAgentRuntime._run_subagent (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5415 — FileCreatorAgentRuntime._run_subagent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (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 · driver._object_grounding_version_ref (cognitive 18) · ×1
  • driver._object_grounding_version_ref (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:832 — driver._object_grounding_version_ref has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model_context._snapshot_content (cognitive 18) · ×1
  • model_context._snapshot_content (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/model_context.py:110 — model_context._snapshot_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_execution._variant_for (cognitive 18) · ×1
  • image_execution._variant_for (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:713 — image_execution._variant_for has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recording_link._spec_description (cognitive 18) · ×1
  • recording_link._spec_description (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recording_link.py:215 — recording_link._spec_description has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (3 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 · FfmpegLocalMediaRunner._normalized_overlay (cognitive 18) · ×1
  • FfmpegLocalMediaRunner._normalized_overlay (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1926 — FfmpegLocalMediaRunner._normalized_overlay has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 3, error handling 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 · FfmpegLocalMediaRunner._validate_supported_directives (cognitive 18) · ×1
  • FfmpegLocalMediaRunner._validate_supported_directives (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:1989 — FfmpegLocalMediaRunner._validate_supported_directives has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · motion_design._live_operation_facts (cognitive 18) · ×1
  • motion_design._live_operation_facts (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py:919 — motion_design._live_operation_facts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1, ternaries 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 · AgentProjectTools.invoke (cognitive 18) · ×1
  • AgentProjectTools.invoke (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1828 — AgentProjectTools.invoke has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auto_snapshot.restored_snapshot_timelines (cognitive 18) · ×1
  • auto_snapshot.restored_snapshot_timelines (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/project_files/auto_snapshot.py:188 — auto_snapshot.restored_snapshot_timelines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 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 · candidate_normalization._collect_shot_candidates (cognitive 18) · ×1
  • candidate_normalization._collect_shot_candidates (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/project_files/candidate_normalization.py:103 — candidate_normalization._collect_shot_candidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 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 · prompt_sync._only_redundant_storyboard_refs_changed (cognitive 18) · ×1
  • prompt_sync._only_redundant_storyboard_refs_changed (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/project_files/prompt_sync.py:240 — prompt_sync._only_redundant_storyboard_refs_changed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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 · ProjectReviewService._build_final_review (cognitive 18) · ×1
  • ProjectReviewService._build_final_review (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:1770 — ProjectReviewService._build_final_review has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review._finalize_round (cognitive 18) · ×1
  • review._finalize_round (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:279 — review._finalize_round has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 1 (3 pts), 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.
D2 · Cognitive Complexity · admission.admit_repair_attempts (cognitive 18) · ×1
  • admission.admit_repair_attempts (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:558 — admission.admit_repair_attempts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 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 · prompt_contract._reference_role_mismatches (cognitive 18) · ×1
  • prompt_contract._reference_role_mismatches (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/run_review/prompt_contract.py:243 — prompt_contract._reference_role_mismatches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visual_jobs._context_entity_descriptions (cognitive 18) · ×1
  • visual_jobs._context_entity_descriptions (cognitive 18) plugins/apps/qwenpaw-creator/backend/services/web_grounding/visual_jobs.py:116 — visual_jobs._context_entity_descriptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (2 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 · verify-data-console.parse_build_info (cognitive 18) · ×1
  • verify-data-console.parse_build_info (cognitive 18) plugins/apps/qwenpaw-data/scripts/verify-data-console.py:71 — verify-data-console.parse_build_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 2 (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 · extension_setup._find_windows_chrome_executable (cognitive 18) · ×1
  • extension_setup._find_windows_chrome_executable (cognitive 18) plugins/bundle/chrome/extension_setup.py:857 — extension_setup._find_windows_chrome_executable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 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 · agents_setup.register_extra_tools (cognitive 18) · ×1
  • agents_setup.register_extra_tools (cognitive 18) plugins/bundle/cloudpaw/agents_setup.py:23 — agents_setup.register_extra_tools has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (4 pts), loops 2 (3 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 · DingTalkTransport._get_session_webhook_for_send (cognitive 18) · ×1
  • DingTalkTransport._get_session_webhook_for_send (cognitive 18) REDACTED:808 — DingTalkTransport._get_session_webhook_for_send has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (6 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 · LarkOapiPlatform.send_message (cognitive 18) · ×1
  • LarkOapiPlatform.send_message (cognitive 18) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:1007 — LarkOapiPlatform.send_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QQMedia.parse_attachments (cognitive 18) · ×1
  • QQMedia.parse_attachments (cognitive 18) plugins/channel/qq/qwenpaw_channel_qq/media.py:183 — QQMedia.parse_attachments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeChatPlatform.start (cognitive 18) · ×1
  • WeChatPlatform.start (cognitive 18) REDACTED:86 — WeChatPlatform.start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · management._execute (cognitive 18) · ×1
  • management._execute (cognitive 18) plugins/channel/wecom/qwenpaw_channel_wecom/management.py:62 — management._execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4, boolean chains 2, 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.
D2 · Cognitive Complexity · WeComPlatform._upload_media_owned (cognitive 18) · ×1
  • WeComPlatform._upload_media_owned (cognitive 18) REDACTED:668 — WeComPlatform._upload_media_owned has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (2 pts), loops 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, 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 · YuanbaoPlatform._write_session_map (cognitive 18) · ×1
  • YuanbaoPlatform._write_session_map (cognitive 18) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:835 — YuanbaoPlatform._write_session_map has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), error handling 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · PowerContextMemoryManager._search_memories (cognitive 18) · ×1
  • PowerContextMemoryManager._search_memories (cognitive 18) plugins/memory/powercontext/backend/manager.py:319 — PowerContextMemoryManager._search_memories has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 1, loops 1, ternaries 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 · gpt_image2_tool.generate_image_gpt (cognitive 18) · ×1
  • gpt_image2_tool.generate_image_gpt (cognitive 18) plugins/tool/gpt-image2/gpt_image2_tool.py:22 — gpt_image2_tool.generate_image_gpt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 4 (5 pts), boolean chains 3 (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 · qwen_image_tool.edit_image_qwen (cognitive 18) · ×1
  • qwen_image_tool.edit_image_qwen (cognitive 18) plugins/tool/qwen-image/qwen_image_tool.py:486 — qwen_image_tool.edit_image_qwen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, error handling 3 (5 pts), boolean chains 2, loops 2 (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 · QwenPawACPAgent._switch_model (cognitive 18) · ×1
  • QwenPawACPAgent._switch_model (cognitive 18) src/qwenpaw/agents/acp/server.py:1818 — QwenPawACPAgent._switch_model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemorySpace._attach_saved_tool_file_matches (cognitive 18) · ×1
  • MemorySpace._attach_saved_tool_file_matches (cognitive 18) src/qwenpaw/agents/context/scroll/memoryspace.py:1663 — MemorySpace._attach_saved_tool_file_matches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, 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 · fork_project.mark_fork_failed (cognitive 18) · ×1
  • fork_project.mark_fork_failed (cognitive 18) src/qwenpaw/agents/fork_project.py:900 — fork_project.mark_fork_failed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 6, error handling 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 · proactive_utils.load_json_safely (cognitive 18) · ×1
  • proactive_utils.load_json_safely (cognitive 18) src/qwenpaw/agents/memory/proactive/proactive_utils.py:197 — proactive_utils.load_json_safely has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proactive_utils._analyze_screen_activity (cognitive 18) · ×1
  • proactive_utils._analyze_screen_activity (cognitive 18) src/qwenpaw/agents/memory/proactive/proactive_utils.py:250 — proactive_utils._analyze_screen_activity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 2, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryMiddleware.on_compress_context (cognitive 18) · ×1
  • MemoryMiddleware.on_compress_context (cognitive 18) src/qwenpaw/agents/middlewares.py:241 — MemoryMiddleware.on_compress_context has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 4 (7 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 · LangfuseToolSpanMiddleware.on_acting (cognitive 18) · ×1
  • LangfuseToolSpanMiddleware.on_acting (cognitive 18) src/qwenpaw/agents/middlewares.py:1007 — LangfuseToolSpanMiddleware.on_acting has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillPoolService.rename_in_workspaces (cognitive 18) · ×1
  • SkillPoolService.rename_in_workspaces (cognitive 18) src/qwenpaw/agents/skill_system/pool_service.py:800 — SkillPoolService.rename_in_workspaces has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 2 (3 pts), loops 1, ternaries 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 · shell._open_windows_temp_output (cognitive 18) · ×1
  • shell._open_windows_temp_output (cognitive 18) src/qwenpaw/agents/tools/shell.py:520 — shell._open_windows_temp_output has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (12 pts), if/else 3 (6 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 · tool_message_utils._sanitize_tool_messages (cognitive 18) · ×1
  • tool_message_utils._sanitize_tool_messages (cognitive 18) src/qwenpaw/agents/utils/tool_message_utils.py:574 — tool_message_utils._sanitize_tool_messages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auth._resolve_client_ip (cognitive 18) · ×1
  • auth._resolve_client_ip (cognitive 18) REDACTED:666 — auth._resolve_client_ip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts), ternaries 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 · BaseChannel._on_stream_content_delta (cognitive 18) · ×1
  • BaseChannel._on_stream_content_delta (cognitive 18) src/qwenpaw/app/channels/base.py:724 — BaseChannel._on_stream_content_delta has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ChannelIngressService._from_child (cognitive 18) · ×1
  • ChannelIngressService._from_child (cognitive 18) src/qwenpaw/app/channels/ingress.py:802 — ChannelIngressService._from_child has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolatedChannelProxy.start (cognitive 18) · ×1
  • IsolatedChannelProxy.start (cognitive 18) src/qwenpaw/app/channels/isolated_proxy.py:398 — IsolatedChannelProxy.start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, ternaries 1 (2 pts) (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 · ChannelManager._stop_one_unlocked (cognitive 18) · ×1
  • ChannelManager._stop_one_unlocked (cognitive 18) src/qwenpaw/app/channels/manager.py:1755 — ChannelManager._stop_one_unlocked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, error handling 2, loops 1 (2 pts) (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 · utils.file_url_to_local_path (cognitive 18) · ×1
  • utils.file_url_to_local_path (cognitive 18) src/qwenpaw/app/channels/utils.py:405 — utils.file_url_to_local_path has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2 (5 pts) (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 · wechat_auth_custody.wechat_auth_scopes (cognitive 18) · ×1
  • wechat_auth_custody.wechat_auth_scopes (cognitive 18) src/qwenpaw/app/channels/wechat_auth_custody.py:21 — wechat_auth_custody.wechat_auth_scopes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (5 pts), boolean chains 4, error handling 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 · resolver.find_chat_matches (cognitive 18) · ×1
  • resolver.find_chat_matches (cognitive 18) src/qwenpaw/app/chats/resolver.py:37 — resolver.find_chat_matches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · title_generator.generate_and_update_title (cognitive 18) · ×1
  • title_generator.generate_and_update_title (cognitive 18) src/qwenpaw/app/chats/title_generator.py:77 — title_generator.generate_and_update_title has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityConnectionService._request (cognitive 18) · ×1
  • CommunityConnectionService._request (cognitive 18) src/qwenpaw/app/community_connection.py:371 — CommunityConnectionService._request has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 2, ternaries 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 · MailMonitorService._submit (cognitive 18) · ×1
  • MailMonitorService._submit (cognitive 18) REDACTED:2298 — MailMonitorService._submit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · access_control.get_all_acls (cognitive 18) · ×1
  • access_control.get_all_acls (cognitive 18) src/qwenpaw/app/routers/access_control.py:83 — access_control.get_all_acls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · terminal.context (cognitive 18) · ×1
  • terminal.context (cognitive 18) src/qwenpaw/app/routers/terminal.py:49 — terminal.context has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_tracker._has_successful_response (cognitive 18) · ×1
  • task_tracker._has_successful_response (cognitive 18) src/qwenpaw/app/task_tracker.py:40 — task_tracker._has_successful_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServiceManager._stop_service (cognitive 18) · ×1
  • ServiceManager._stop_service (cognitive 18) src/qwenpaw/app/workspace/service_manager.py:560 — ServiceManager._stop_service has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, 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 · tool_entrypoint.run_browser_tool (cognitive 18) · ×1
  • tool_entrypoint.run_browser_tool (cognitive 18) src/qwenpaw/browser/tool_entrypoint.py:121 — tool_entrypoint.run_browser_tool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResponseRouteAggregate.restore (cognitive 18) · ×1
  • ResponseRouteAggregate.restore (cognitive 18) src/qwenpaw/channel_protocol/response_lifecycle.py:344 — ResponseRouteAggregate.restore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (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 · shared.audit_shared_dependencies (cognitive 18) · ×1
  • shared.audit_shared_dependencies (cognitive 18) src/qwenpaw/channel_protocol/shared.py:307 — shared.audit_shared_dependencies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), boolean chains 1, loops 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 · SharedResponseDriver._write_checkpoint (cognitive 18) · ×1
  • SharedResponseDriver._write_checkpoint (cognitive 18) src/qwenpaw/channel_protocol/shared_response_driver.py:538 — SharedResponseDriver._write_checkpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2, ternaries 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 · doctor_checks._resolve_agent_effective_model_slot (cognitive 18) · ×1
  • doctor_checks._resolve_agent_effective_model_slot (cognitive 18) src/qwenpaw/cli/doctor_checks.py:1104 — doctor_checks._resolve_agent_effective_model_slot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shutdown_cmd._find_windows_wrapper_ancestor_pids (cognitive 18) · ×1
  • shutdown_cmd._find_windows_wrapper_ancestor_pids (cognitive 18) src/qwenpaw/cli/shutdown_cmd.py:128 — shutdown_cmd._find_windows_wrapper_ancestor_pids has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 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 · config._is_safe_css_color (cognitive 18) · ×1
  • config._is_safe_css_color (cognitive 18) src/qwenpaw/config/config.py:74 — config._is_safe_css_color has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mcp_binding.binding_plain_keys (cognitive 18) · ×1
  • mcp_binding.binding_plain_keys (cognitive 18) src/qwenpaw/drivers/adapters/mcp_binding.py:271 — mcp_binding.binding_plain_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockerRuntimeProvisioner.pull_image (cognitive 18) · ×1
  • DockerRuntimeProvisioner.pull_image (cognitive 18) REDACTED:424 — DockerRuntimeProvisioner.pull_image has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoomLoopGate._auto_record_from_ctx (cognitive 18) · ×1
  • DoomLoopGate._auto_record_from_ctx (cognitive 18) REDACTED:183 — DoomLoopGate._auto_record_from_ctx has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginManifest._normalise_input (cognitive 18) · ×1
  • PluginManifest._normalise_input (cognitive 18) src/qwenpaw/plugins/architecture.py:187 — PluginManifest._normalise_input has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 2 (3 pts), loops 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, 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 · ChannelBackend._probe_once (cognitive 18) · ×1
  • ChannelBackend._probe_once (cognitive 18) src/qwenpaw/plugins/channel_adapter.py:404 — ChannelBackend._probe_once has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 2 (3 pts), error handling 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 · dependency_maintenance._enumerated_path (cognitive 18) · ×1
  • dependency_maintenance._enumerated_path (cognitive 18) src/qwenpaw/plugins/dependency_maintenance.py:43 — dependency_maintenance._enumerated_path has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyUpgradeManager._check_reviewed_usage (cognitive 18) · ×1
  • DependencyUpgradeManager._check_reviewed_usage (cognitive 18) src/qwenpaw/plugins/dependency_upgrade.py:1129 — DependencyUpgradeManager._check_reviewed_usage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (3 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 · DependencyUpgradeManager._affected (cognitive 18) · ×1
  • DependencyUpgradeManager._affected (cognitive 18) src/qwenpaw/plugins/dependency_upgrade.py:1215 — DependencyUpgradeManager._affected has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependencies.read_dependency_inventory (cognitive 18) · ×1
  • dependencies.read_dependency_inventory (cognitive 18) src/qwenpaw/plugins/execution/dependencies.py:994 — dependencies.read_dependency_inventory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worker.run (cognitive 18) · ×1
  • worker.run (cognitive 18) src/qwenpaw/plugins/execution/worker.py:168 — worker.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · PluginLoader._dispose_then_undo_txn_disk (cognitive 18) · ×1
  • PluginLoader._dispose_then_undo_txn_disk (cognitive 18) src/qwenpaw/plugins/loader.py:1949 — PluginLoader._dispose_then_undo_txn_disk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, error handling 2 (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 · RuntimeOwners.reserve (cognitive 18) · ×1
  • RuntimeOwners.reserve (cognitive 18) src/qwenpaw/plugins/ownership.py:120 — RuntimeOwners.reserve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 1 (2 pts) (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 · provision.merge_tool_factory (cognitive 18) · ×1
  • provision.merge_tool_factory (cognitive 18) src/qwenpaw/plugins/provision.py:887 — provision.merge_tool_factory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 3 (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 · PluginRegistry.register_channel (cognitive 18) · ×1
  • PluginRegistry.register_channel (cognitive 18) src/qwenpaw/plugins/registry.py:869 — PluginRegistry.register_channel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PluginContext._managed_stream (cognitive 18) · ×1
  • PluginContext._managed_stream (cognitive 18) src/qwenpaw/plugins/sdk.py:338 — PluginContext._managed_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 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 · PluginTestHost._enter (cognitive 18) · ×1
  • PluginTestHost._enter (cognitive 18) src/qwenpaw/plugins/testing.py:177 — PluginTestHost._enter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 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 · wheel_additions._members (cognitive 18) · ×1
  • wheel_additions._members (cognitive 18) src/qwenpaw/plugins/wheel_additions.py:68 — wheel_additions._members has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, 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 · wheel_additions._check_script_paths (cognitive 18) · ×1
  • wheel_additions._check_script_paths (cognitive 18) src/qwenpaw/plugins/wheel_additions.py:313 — wheel_additions._check_script_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 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 · CodexRolloutReader.read_thread (cognitive 18) · ×1
  • CodexRolloutReader.read_thread (cognitive 18) src/qwenpaw/portability/providers/codex_rollout_reader.py:210 — CodexRolloutReader.read_thread has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_rollout_reader._visible_text (cognitive 18) · ×1
  • codex_rollout_reader._visible_text (cognitive 18) src/qwenpaw/portability/providers/codex_rollout_reader.py:529 — codex_rollout_reader._visible_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_schedule_reader._safe_sqlite_read_target (cognitive 18) · ×1
  • codex_schedule_reader._safe_sqlite_read_target (cognitive 18) src/qwenpaw/portability/providers/codex_schedule_reader.py:538 — codex_schedule_reader._safe_sqlite_read_target has cognitive complexity 18 (threshold 15). Drivers by points: error handling 7 (11 pts), if/else 3 (5 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerDiscoveryMixin._save_discovery_snapshot (cognitive 18) · ×1
  • ProviderManagerDiscoveryMixin._save_discovery_snapshot (cognitive 18) src/qwenpaw/providers/provider_manager_discovery.py:155 — ProviderManagerDiscoveryMixin._save_discovery_snapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 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 · ProviderManagerPersistenceMixin._prepare_plugin_registration (cognitive 18) · ×1
  • ProviderManagerPersistenceMixin._prepare_plugin_registration (cognitive 18) src/qwenpaw/providers/provider_manager_persistence.py:535 — ProviderManagerPersistenceMixin._prepare_plugin_registration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2 (4 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 · AgentBuilder.build_toolkit (cognitive 18) · ×1
  • AgentBuilder.build_toolkit (cognitive 18) src/qwenpaw/runtime/builder.py:116 — AgentBuilder.build_toolkit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (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 · AgentBuilder._apply_request_project (cognitive 18) · ×1
  • AgentBuilder._apply_request_project (cognitive 18) src/qwenpaw/runtime/builder.py:808 — AgentBuilder._apply_request_project has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (2 pts) (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 · daemon.parse_daemon_query (cognitive 18) · ×1
  • daemon.parse_daemon_query (cognitive 18) src/qwenpaw/runtime/commands/daemon.py:197 — daemon.parse_daemon_query has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Envelope._finalize_response (cognitive 18) · ×1
  • Envelope._finalize_response (cognitive 18) src/qwenpaw/runtime/envelope.py:866 — Envelope._finalize_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginMiddlewareGuard._result_stream (cognitive 18) · ×1
  • PluginMiddlewareGuard._result_stream (cognitive 18) src/qwenpaw/runtime/plugin_middleware.py:323 — PluginMiddlewareGuard._result_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillScanner._discover_files (cognitive 18) · ×1
  • SkillScanner._discover_files (cognitive 18) src/qwenpaw/security/skill_scanner/scanner.py:248 — SkillScanner._discover_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolCoordinator._drain (cognitive 18) · ×1
  • ToolCoordinator._drain (cognitive 18) src/qwenpaw/tool_calls/_coordinator.py:743 — ToolCoordinator._drain has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), error handling 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _middleware._extract_last_assistant_text (cognitive 18) · ×1
  • _middleware._extract_last_assistant_text (cognitive 18) src/qwenpaw/tool_calls/_middleware.py:21 — _middleware._extract_last_assistant_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown_cjk._mark_inline_code (cognitive 18) · ×1
  • markdown_cjk._mark_inline_code (cognitive 18) src/qwenpaw/utils/markdown_cjk.py:262 — markdown_cjk._mark_inline_code has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 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 · outbound_media._update (cognitive 18) · ×1
  • outbound_media._update (cognitive 18) src/qwenpaw/utils/outbound_media.py:214 — outbound_media._update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useBackgroundTaskWatcher.registerBackgroundTask (cognitive 18) · ×1
  • useBackgroundTaskWatcher.registerBackgroundTask (cognitive 18) console/src/hooks/useBackgroundTaskWatcher.ts:181 — useBackgroundTaskWatcher.registerBackgroundTask has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 208, a function literal at line 225, a function literal at line 247, …). 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 · useIconDrag.useIconDrag (cognitive 18) · ×1
  • useIconDrag.useIconDrag (cognitive 18) console/src/os/useIconDrag.ts:48 — useIconDrag.useIconDrag has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, error handling 1 (nesting depth added 4). None of this is in the body itself: all 18 points belong to 4 function literals inside it that branch (lines 59, 108, 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 · fileIdentity.workspacePath (cognitive 18) · ×1
  • fileIdentity.workspacePath (cognitive 18) console/src/features/files-workspace/fileIdentity.ts:42 — fileIdentity.workspacePath has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 4 (6 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 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 · chatInputDraft.useChatInputDraft (cognitive 18) · ×1
  • chatInputDraft.useChatInputDraft (cognitive 18) console/src/pages/Chat/chatInputDraft.ts:205 — chatInputDraft.useChatInputDraft has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 8 function literals inside it that branch (lines 302, 256, 232, …). 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 · PushMessageCard.PushMessageCard (cognitive 18) · ×1
  • PushMessageCard.PushMessageCard (cognitive 18) console/src/pages/Inbox/components/PushMessageCard.tsx:56 — PushMessageCard.PushMessageCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8, if/else 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: 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 · Discussion.CommentRow (cognitive 18) · ×1
  • Discussion.CommentRow (cognitive 18) console/src/pages/Market/Community/Discussion.tsx:277 — Discussion.CommentRow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3, error handling 2. Of this number, 10 points are the body's own statements and 8 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 · useBackupRunner.useBackupRunner.observeUntilTerminal (cognitive 18) · ×1
  • useBackupRunner.useBackupRunner.observeUntilTerminal (cognitive 18) console/src/pages/Settings/Backups/shared/useBackupRunner.ts:48 — useBackupRunner.useBackupRunner.observeUntilTerminal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderConfigModal.ProviderConfigModal · ×1
  • ProviderConfigModal.ProviderConfigModal::handleSubmit (cognitive 18) console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:504 — ProviderConfigModal.ProviderConfigModal::handleSubmit has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ProviderConfigModal.ProviderConfigModal) 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 · DesktopClient.DesktopContent (cognitive 18) · ×1
  • DesktopClient.DesktopContent (cognitive 18) console/src/tauri/DesktopClient.tsx:100 — DesktopClient.DesktopContent has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6, error handling 1, ternaries 1. Of this number, 12 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · InlineReviewDiff.InlineReviewDiff (cognitive 18) · ×1
  • InlineReviewDiff.InlineReviewDiff (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/components/agent/InlineReviewDiff.tsx:135 — InlineReviewDiff.InlineReviewDiff has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5, boolean chains 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (submit, a function literal at line 192, a function literal at line 302, …). 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 · BlueprintRoughCutStrip.BlueprintRoughCutStrip (cognitive 18) · ×1
  • BlueprintRoughCutStrip.BlueprintRoughCutStrip (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintRoughCutStrip.tsx:298 — BlueprintRoughCutStrip.BlueprintRoughCutStrip has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 4, if/else 3. Of this number, 13 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · HeroComposerCard.HeroComposerCard (cognitive 18) · ×1
  • HeroComposerCard.HeroComposerCard (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:31 — HeroComposerCard.HeroComposerCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 5. Of this number, 12 points are the body's own statements and 6 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 · agentProgressModel.buildAgentProgressModel.nodeMatchesTask (cognitive 18) · ×1
  • agentProgressModel.buildAgentProgressModel.nodeMatchesTask (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:366 — agentProgressModel.buildAgentProgressModel.nodeMatchesTask has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. 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 · timelineEditing.transitionFollowChanges (cognitive 18) · ×1
  • timelineEditing.transitionFollowChanges (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/lib/timelineEditing.ts:272 — timelineEditing.transitionFollowChanges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visualVariantCoverage.selectVisualVariantCoverage.items (cognitive 18) · ×1
  • visualVariantCoverage.selectVisualVariantCoverage.items (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/selectors/visualVariantCoverage.ts:120 — visualVariantCoverage.selectVisualVariantCoverage.items has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (14 pts), boolean chains 2, if/else 2 (nesting depth added 9). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · creatorSessionStore.useCreatorSessionStore.scheduleMessageRefresh (cognitive 18) · ×1
  • creatorSessionStore.useCreatorSessionStore.scheduleMessageRefresh (cognitive 18) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:584 — creatorSessionStore.useCreatorSessionStore.scheduleMessageRefresh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (drain, a function literal at line 624). 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 · OpenUIBlock.OpenUIBlock (cognitive 18) · ×1
  • OpenUIBlock.OpenUIBlock (cognitive 18) plugins/bundle/qwenpaw-openui/frontend/src/OpenUIBlock.tsx:22 — OpenUIBlock.OpenUIBlock has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5, boolean chains 4 (nesting depth added 4). Of this number, 12 points are the body's own statements and 6 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 · Settings.Settings (cognitive 18) · ×1
  • Settings.Settings (cognitive 18) plugins/harness/_shared/ui/Settings.tsx:73 — Settings.Settings has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (8 pts) (nesting depth added 2). 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, 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 · Nav.Nav (cognitive 18) · ×1
  • Nav.Nav (cognitive 18) website/src/components/Nav.tsx:69 — Nav.Nav has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 6. Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 103, a function literal at line 171, a function literal at line 268, …). 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 · MailClient.search_messages (cognitive 17) · ×1
  • MailClient.search_messages (cognitive 17) packages/qwenpawmail-mcp/src/qwenpawmail_mcp/mail_client.py:683 — MailClient.search_messages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ThreadStore.update_labels (cognitive 17) · ×1
  • ThreadStore.update_labels (cognitive 17) REDACTED:685 — ThreadStore.update_labels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 3 (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 · file_media_routes._response_range (cognitive 17) · ×1
  • file_media_routes._response_range (cognitive 17) plugins/apps/qwenpaw-creator/backend/api/file_media_routes.py:62 — file_media_routes._response_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file_session_routes.list_messages (cognitive 17) · ×1
  • file_session_routes.list_messages (cognitive 17) plugins/apps/qwenpaw-creator/backend/api/file_session_routes.py:391 — file_session_routes.list_messages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeminiImageModel._decode (cognitive 17) · ×1
  • GeminiImageModel._decode (cognitive 17) plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:267 — GeminiImageModel._decode has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (6 pts), boolean chains 5, if/else 3 (5 pts), loops 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.
D2 · Cognitive Complexity · text_model._call_gemini (cognitive 17) · ×1
  • text_model._call_gemini (cognitive 17) plugins/apps/qwenpaw-creator/backend/models/text_model.py:217 — text_model._call_gemini has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · video_capabilities.video_reference_capability (cognitive 17) · ×1
  • video_capabilities.video_reference_capability (cognitive 17) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:919 — video_capabilities.video_reference_capability has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. 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 · checkpoints.required_checkpoint_phases (cognitive 17) · ×1
  • checkpoints.required_checkpoint_phases (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/checkpoints.py:49 — checkpoints.required_checkpoint_phases has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._cancel_run (cognitive 17) · ×1
  • FileCreatorAgentRuntime._cancel_run (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:8760 — FileCreatorAgentRuntime._cancel_run has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (8 pts), ternaries 6, if/else 2, boolean chains 1 (nesting depth added 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 · driver._authorization_summary (cognitive 17) · ×1
  • driver._authorization_summary (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:10313 — driver._authorization_summary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_execution._lineup_character_reference_ids (cognitive 17) · ×1
  • image_execution._lineup_character_reference_ids (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:897 — image_execution._lineup_character_reference_ids has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopController._action_bbox (cognitive 17) · ×1
  • DesktopController._action_bbox (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/desktop.py:278 — DesktopController._action_bbox has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2 (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 · motion_overlay.composite_motion_layers (cognitive 17) · ×1
  • motion_overlay.composite_motion_layers (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py:1970 — motion_overlay.composite_motion_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (4 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · narration_generation.narration_input (cognitive 17) · ×1
  • narration_generation.narration_input (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/narration_generation.py:19 — narration_generation.narration_input has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7, boolean chains 5, if/else 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FileR2VExecutionService._recover_deferred_terminal_task (cognitive 17) · ×1
  • FileR2VExecutionService._recover_deferred_terminal_task (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2577 — FileR2VExecutionService._recover_deferred_terminal_task has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visual_design_readiness._referenced_entities (cognitive 17) · ×1
  • visual_design_readiness._referenced_entities (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_design_readiness.py:41 — visual_design_readiness._referenced_entities has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), ternaries 1 (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 · AgentProjectTools._edit_plan_advisory (cognitive 17) · ×1
  • AgentProjectTools._edit_plan_advisory (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1551 — AgentProjectTools._edit_plan_advisory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, 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 · candidate_normalization.normalize_project_candidate (cognitive 17) · ×1
  • candidate_normalization.normalize_project_candidate (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/project_files/candidate_normalization.py:267 — candidate_normalization.normalize_project_candidate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 1, ternaries 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 · CreatorFileServices._accepted_artifact_targets (cognitive 17) · ×1
  • CreatorFileServices._accepted_artifact_targets (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/project_files/facade.py:767 — CreatorFileServices._accepted_artifact_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (2 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 · migrations._deconflict_overlapping_narration (cognitive 17) · ×1
  • migrations._deconflict_overlapping_narration (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:830 — migrations._deconflict_overlapping_narration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), boolean chains 4 (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 · MotionGraphic._infer_template_metadata (cognitive 17) · ×1
  • MotionGraphic._infer_template_metadata (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/project_files/models.py:960 — MotionGraphic._infer_template_metadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (6 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · atomic_store.atomic_replace_path (cognitive 17) · ×1
  • atomic_store.atomic_replace_path (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:122 — atomic_store.atomic_replace_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), error handling 2 (6 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 · DurableJsonlStore._iter_complete_lines_reverse (cognitive 17) · ×1
  • DurableJsonlStore._iter_complete_lines_reverse (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py:378 — DurableJsonlStore._iter_complete_lines_reverse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonlReadCursor.read (cognitive 17) · ×1
  • JsonlReadCursor.read (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py:512 — JsonlReadCursor.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 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 · ManualEditBufferStore.record_frontend_commit (cognitive 17) · ×1
  • ManualEditBufferStore.record_frontend_commit (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/manual_edit_store.py:131 — ManualEditBufferStore.record_frontend_commit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 5, 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, 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 · safe_remote_download.validate_public_remote_url (cognitive 17) · ×1
  • safe_remote_download.validate_public_remote_url (cognitive 17) plugins/apps/qwenpaw-creator/backend/services/runtime_files/safe_remote_download.py:64 — safe_remote_download.validate_public_remote_url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, error handling 3 (4 pts), loops 1 (2 pts), ternaries 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 · agents_setup.ensure_builtin_agents (cognitive 17) · ×1
  • agents_setup.ensure_builtin_agents (cognitive 17) plugins/bundle/cloudpaw/agents_setup.py:178 — agents_setup.ensure_builtin_agents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agents_setup._seed_persona_md_files (cognitive 17) · ×1
  • agents_setup._seed_persona_md_files (cognitive 17) plugins/bundle/cloudpaw/agents_setup.py:303 — agents_setup._seed_persona_md_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (4 pts), loops 2 (3 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 · A2AClientManager._stream_sse (cognitive 17) · ×1
  • A2AClientManager._stream_sse (cognitive 17) plugins/bundle/cloudpaw/modules/a2a/client_manager.py:276 — A2AClientManager._stream_sse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · patch_runner._wire_existing_channels (cognitive 17) · ×1
  • patch_runner._wire_existing_channels (cognitive 17) plugins/bundle/qwenpaw-pet/patch_runner.py:197 — patch_runner._wire_existing_channels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (3 pts), loops 2 (3 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 · runtime._pid_exists_win32 (cognitive 17) · ×1
  • runtime._pid_exists_win32 (cognitive 17) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/runtime.py:260 — runtime._pid_exists_win32 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DingTalkDriver._supervise (cognitive 17) · ×1
  • DingTalkDriver._supervise (cognitive 17) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:306 — DingTalkDriver._supervise has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeishuDriver._load_legacy_targets (cognitive 17) · ×1
  • FeishuDriver._load_legacy_targets (cognitive 17) plugins/channel/feishu/qwenpaw_channel_feishu/driver.py:225 — FeishuDriver._load_legacy_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2, 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 · utils._extract_structured_text (cognitive 17) · ×1
  • utils._extract_structured_text (cognitive 17) plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:193 — utils._extract_structured_text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · utils._parse_md_table (cognitive 17) · ×1
  • utils._parse_md_table (cognitive 17) plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:302 — utils._parse_md_table has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixPlatform._check_e2ee_device_keys (cognitive 17) · ×1
  • MatrixPlatform._check_e2ee_device_keys (cognitive 17) REDACTED:934 — MatrixPlatform._check_e2ee_device_keys has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · OneBotDriver._normalize_message (cognitive 17) · ×1
  • OneBotDriver._normalize_message (cognitive 17) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:249 — OneBotDriver._normalize_message has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 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 · QQPlatform.send_parts (cognitive 17) · ×1
  • QQPlatform.send_parts (cognitive 17) plugins/channel/qq/qwenpaw_channel_qq/platform.py:508 — QQPlatform.send_parts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LiveKitBackend._handle_sip_participant (cognitive 17) · ×1
  • LiveKitBackend._handle_sip_participant (cognitive 17) plugins/channel/sip/qwenpaw_channel_sip/livekit_backend.py:208 — LiveKitBackend._handle_sip_participant has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3, boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SIPPlatform._incoming (cognitive 17) · ×1
  • SIPPlatform._incoming (cognitive 17) plugins/channel/sip/qwenpaw_channel_sip/platform.py:130 — SIPPlatform._incoming has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 4 (5 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PyVoIPBackend.stop (cognitive 17) · ×1
  • PyVoIPBackend.stop (cognitive 17) plugins/channel/sip/qwenpaw_channel_sip/pyvoip_backend.py:140 — PyVoIPBackend.stop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (4 pts), boolean chains 2, loops 2 (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 · PyVoIPBackend._on_call (cognitive 17) · ×1
  • PyVoIPBackend._on_call (cognitive 17) plugins/channel/sip/qwenpaw_channel_sip/pyvoip_backend.py:213 — PyVoIPBackend._on_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 2 (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 · handler._append_unfurl_text (cognitive 17) · ×1
  • handler._append_unfurl_text (cognitive 17) plugins/channel/slack/qwenpaw_channel_slack/handler.py:801 — handler._append_unfurl_text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelegramPlatform._send_media_value (cognitive 17) · ×1
  • TelegramPlatform._send_media_value (cognitive 17) plugins/channel/telegram/qwenpaw_channel_telegram/platform.py:996 — TelegramPlatform._send_media_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 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 · YuanbaoPlatform._heartbeat_loop (cognitive 17) · ×1
  • YuanbaoPlatform._heartbeat_loop (cognitive 17) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:284 — YuanbaoPlatform._heartbeat_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · YuanbaoPlatform._normalize_inbound (cognitive 17) · ×1
  • YuanbaoPlatform._normalize_inbound (cognitive 17) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:368 — YuanbaoPlatform._normalize_inbound has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (5 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollContextManager._active_thinking_blocks (cognitive 17) · ×1
  • ScrollContextManager._active_thinking_blocks (cognitive 17) src/qwenpaw/agents/context/scroll/manager.py:1797 — ScrollContextManager._active_thinking_blocks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 2 (6 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 · MemorySpace._load_turn (cognitive 17) · ×1
  • MemorySpace._load_turn (cognitive 17) src/qwenpaw/agents/context/scroll/memoryspace.py:1174 — MemorySpace._load_turn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (4 pts), boolean chains 2, 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 · BaseMemoryManager.get_runtime_status (cognitive 17) · ×1
  • BaseMemoryManager.get_runtime_status (cognitive 17) REDACTED:647 — BaseMemoryManager.get_runtime_status has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, if/else 3, loops 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.
D2 · Cognitive Complexity · proactive_utils._process_session_memory (cognitive 17) · ×1
  • proactive_utils._process_session_memory (cognitive 17) src/qwenpaw/agents/memory/proactive/proactive_utils.py:119 — proactive_utils._process_session_memory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (6 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._modelscope_archive_to_bundle (cognitive 17) · ×1
  • hub._modelscope_archive_to_bundle (cognitive 17) src/qwenpaw/agents/skill_system/hub.py:1694 — hub._modelscope_archive_to_bundle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, error handling 2, 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 · registry.get_pool_builtin_sync_status (cognitive 17) · ×1
  • registry.get_pool_builtin_sync_status (cognitive 17) src/qwenpaw/agents/skill_system/registry.py:1419 — registry.get_pool_builtin_sync_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 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 · agent_management.check_agent_task (cognitive 17) · ×1
  • agent_management.check_agent_task (cognitive 17) src/qwenpaw/agents/tools/agent_management.py:872 — agent_management.check_agent_task has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · delegate_external_agent._format_acp_runner_states_response (cognitive 17) · ×1
  • delegate_external_agent._format_acp_runner_states_response (cognitive 17) src/qwenpaw/agents/tools/delegate_external_agent.py:289 — delegate_external_agent._format_acp_runner_states_response has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 1, error handling 1, loops 1, ternaries 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 · browser_control._action_evaluate (cognitive 17) · ×1
  • browser_control._action_evaluate (cognitive 17) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2936 — browser_control._action_evaluate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · browser_control._action_drag (cognitive 17) · ×1
  • browser_control._action_drag (cognitive 17) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3955 — browser_control._action_drag has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), error handling 1 (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 · shell._execute_in_sandbox (cognitive 17) · ×1
  • shell._execute_in_sandbox (cognitive 17) src/qwenpaw/agents/tools/shell.py:1084 — shell._execute_in_sandbox has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 1, ternaries 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 · ChannelManagementService._execute (cognitive 17) · ×1
  • ChannelManagementService._execute (cognitive 17) src/qwenpaw/app/channels/management.py:415 — ChannelManagementService._execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (5 pts), boolean chains 3, error handling 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 · MessageRenderer.parts_to_text (cognitive 17) · ×1
  • MessageRenderer.parts_to_text (cognitive 17) src/qwenpaw/app/channels/renderer.py:528 — MessageRenderer.parts_to_text has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), loops 2, ternaries 1 (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 · utils._cap_tool_output (cognitive 17) · ×1
  • utils._cap_tool_output (cognitive 17) src/qwenpaw/app/chats/utils.py:57 — utils._cap_tool_output has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 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 · CommunityConnectionService.complete (cognitive 17) · ×1
  • CommunityConnectionService.complete (cognitive 17) src/qwenpaw/app/community_connection.py:680 — CommunityConnectionService.complete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · json_repo.migrate_final_mode_to_stream (cognitive 17) · ×1
  • json_repo.migrate_final_mode_to_stream (cognitive 17) src/qwenpaw/app/crons/repo/json_repo.py:239 — json_repo.migrate_final_mode_to_stream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (4 pts), loops 1, ternaries 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 · inbox_store.mark_read_by_acl_sender (cognitive 17) · ×1
  • inbox_store.mark_read_by_acl_sender (cognitive 17) src/qwenpaw/app/inbox_store.py:175 — inbox_store.mark_read_by_acl_sender has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monitor.extract_body_preview (cognitive 17) · ×1
  • monitor.extract_body_preview (cognitive 17) REDACTED:275 — monitor.extract_body_preview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, ternaries 2, error handling 1, 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 · console.post_console_chat (cognitive 17) · ×1
  • console.post_console_chat (cognitive 17) src/qwenpaw/app/routers/console.py:452 — console.post_console_chat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, 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 · skills._build_pool_skill_detail (cognitive 17) · ×1
  • skills._build_pool_skill_detail (cognitive 17) src/qwenpaw/app/routers/skills.py:1079 — skills._build_pool_skill_detail has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · workspace._reserve_upload_targets (cognitive 17) · ×1
  • workspace._reserve_upload_targets (cognitive 17) src/qwenpaw/app/routers/workspace.py:615 — workspace._reserve_upload_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServiceManager.stop_all (cognitive 17) · ×1
  • ServiceManager.stop_all (cognitive 17) src/qwenpaw/app/workspace/service_manager.py:490 — ServiceManager.stop_all has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlite_snapshot._stage (cognitive 17) · ×1
  • sqlite_snapshot._stage (cognitive 17) src/qwenpaw/backup/_ops/sqlite_snapshot.py:111 — sqlite_snapshot._stage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NMBridge.handle_ws_message (cognitive 17) · ×1
  • NMBridge.handle_ws_message (cognitive 17) src/qwenpaw/browser/control_link/chrome/bridge.py:613 — NMBridge.handle_ws_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · observe.probe_contract_drift (cognitive 17) · ×1
  • observe.probe_contract_drift (cognitive 17) src/qwenpaw/browser/control_link/chrome/observe.py:105 — observe.probe_contract_drift has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 3, error handling 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 · EventBatchParams.from_mapping (cognitive 17) · ×1
  • EventBatchParams.from_mapping (cognitive 17) src/qwenpaw/channel_protocol/models.py:636 — EventBatchParams.from_mapping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · requirements._remove_dot_segments (cognitive 17) · ×1
  • requirements._remove_dot_segments (cognitive 17) src/qwenpaw/channel_protocol/requirements.py:42 — requirements._remove_dot_segments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · requirements._canonical_url (cognitive 17) · ×1
  • requirements._canonical_url (cognitive 17) src/qwenpaw/channel_protocol/requirements.py:96 — requirements._canonical_url has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7, error handling 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 · SharedResponseDriver._restore_responses (cognitive 17) · ×1
  • SharedResponseDriver._restore_responses (cognitive 17) src/qwenpaw/channel_protocol/shared_response_driver.py:113 — SharedResponseDriver._restore_responses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckpointService.resolve_target (cognitive 17) · ×1
  • CheckpointService.resolve_target (cognitive 17) src/qwenpaw/checkpoints/service.py:796 — CheckpointService.resolve_target has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · doctor_checks._mcp_client_problems (cognitive 17) · ×1
  • doctor_checks._mcp_client_problems (cognitive 17) src/qwenpaw/cli/doctor_checks.py:920 — doctor_checks._mcp_client_problems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor_checks.skill_layout_notes (cognitive 17) · ×1
  • doctor_checks.skill_layout_notes (cognitive 17) src/qwenpaw/cli/doctor_checks.py:968 — doctor_checks.skill_layout_notes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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 · skills_cmd._set_skills_enabled (cognitive 17) · ×1
  • skills_cmd._set_skills_enabled (cognitive 17) src/qwenpaw/cli/skills_cmd.py:732 — skills_cmd._set_skills_enabled has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (4 pts), boolean chains 3, error handling 1 (2 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 · skills_cmd.test_cmd (cognitive 17) · ×1
  • skills_cmd.test_cmd (cognitive 17) src/qwenpaw/cli/skills_cmd.py:1178 — skills_cmd.test_cmd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · utils.prompt_checkbox (cognitive 17) · ×1
  • utils.prompt_checkbox (cognitive 17) src/qwenpaw/cli/utils.py:151 — utils.prompt_checkbox has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.build_fallback_agent_profile_config (cognitive 17) · ×1
  • config.build_fallback_agent_profile_config (cognitive 17) src/qwenpaw/config/config.py:3531 — config.build_fallback_agent_profile_config has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 8, if/else 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 · mcp_binding.plan_env_ref_bindings (cognitive 17) · ×1
  • mcp_binding.plan_env_ref_bindings (cognitive 17) src/qwenpaw/drivers/adapters/mcp_binding.py:146 — mcp_binding.plan_env_ref_bindings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 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 · bindings.lookup_credential_value (cognitive 17) · ×1
  • bindings.lookup_credential_value (cognitive 17) src/qwenpaw/drivers/credentials/bindings.py:103 — bindings.lookup_credential_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 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 · HttpStatelessClient._rpc (cognitive 17) · ×1
  • HttpStatelessClient._rpc (cognitive 17) src/qwenpaw/drivers/handlers/mcp_streamable_http.py:802 — HttpStatelessClient._rpc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · generalize._is_safe_generalization (cognitive 17) · ×1
  • generalize._is_safe_generalization (cognitive 17) src/qwenpaw/governance/generalize.py:117 — generalize._is_safe_generalization has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QualitativeRubricGate._decision_state (cognitive 17) · ×1
  • QualitativeRubricGate._decision_state (cognitive 17) src/qwenpaw/loop/gates/rubric.py:356 — QualitativeRubricGate._decision_state has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · middleware._format_block (cognitive 17) · ×1
  • middleware._format_block (cognitive 17) src/qwenpaw/modes/advisor/middleware.py:255 — middleware._format_block has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · channel_config._fill_defaults (cognitive 17) · ×1
  • channel_config._fill_defaults (cognitive 17) src/qwenpaw/plugins/channel_config.py:57 — channel_config._fill_defaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginProcess._monitor (cognitive 17) · ×1
  • PluginProcess._monitor (cognitive 17) src/qwenpaw/plugins/execution/process.py:1206 — PluginProcess._monitor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worker._configure (cognitive 17) · ×1
  • worker._configure (cognitive 17) src/qwenpaw/plugins/execution/worker.py:64 — worker._configure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · harness_migration._prepare (cognitive 17) · ×1
  • harness_migration._prepare (cognitive 17) src/qwenpaw/plugins/harness_migration.py:81 — harness_migration._prepare has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader.discover_plugins (cognitive 17) · ×1
  • PluginLoader.discover_plugins (cognitive 17) src/qwenpaw/plugins/loader.py:637 — PluginLoader.discover_plugins has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader._dependency_registration (cognitive 17) · ×1
  • PluginLoader._dependency_registration (cognitive 17) src/qwenpaw/plugins/loader.py:1847 — PluginLoader._dependency_registration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginLoader.load_all_plugins (cognitive 17) · ×1
  • PluginLoader.load_all_plugins (cognitive 17) src/qwenpaw/plugins/loader.py:2462 — PluginLoader.load_all_plugins has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · provision.replay_persisted_provisions (cognitive 17) · ×1
  • provision.replay_persisted_provisions (cognitive 17) src/qwenpaw/plugins/provision.py:211 — provision.replay_persisted_provisions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, error handling 1 (2 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 · WorkspaceProjector.revoke_workspace (cognitive 17) · ×1
  • WorkspaceProjector.revoke_workspace (cognitive 17) src/qwenpaw/plugins/workspace_projector.py:334 — WorkspaceProjector.revoke_workspace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2, 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 · adaptation_staging.stage_local_assets (cognitive 17) · ×1
  • adaptation_staging.stage_local_assets (cognitive 17) src/qwenpaw/portability/adaptation_staging.py:30 — adaptation_staging.stage_local_assets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompatibilityTester._test_native_plugin (cognitive 17) · ×1
  • CompatibilityTester._test_native_plugin (cognitive 17) src/qwenpaw/portability/compatibility_testing.py:809 — CompatibilityTester._test_native_plugin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 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, 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 · import_support._prepare_memory_payloads (cognitive 17) · ×1
  • import_support._prepare_memory_payloads (cognitive 17) src/qwenpaw/portability/import_support.py:101 — import_support._prepare_memory_payloads has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (3 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 · CodexMigrationProvider._select_skills (cognitive 17) · ×1
  • CodexMigrationProvider._select_skills (cognitive 17) src/qwenpaw/portability/providers/codex.py:490 — CodexMigrationProvider._select_skills has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), error handling 1 (3 pts), loops 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 · CodexRolloutReader.skill_records (cognitive 17) · ×1
  • CodexRolloutReader.skill_records (cognitive 17) src/qwenpaw/portability/providers/codex_rollout_reader.py:242 — CodexRolloutReader.skill_records has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), error handling 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 · codex_rollout_reader._history_item (cognitive 17) · ×1
  • codex_rollout_reader._history_item (cognitive 17) src/qwenpaw/portability/providers/codex_rollout_reader.py:440 — codex_rollout_reader._history_item has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external_state.discover_qoder_plugin_mcp (cognitive 17) · ×1
  • external_state.discover_qoder_plugin_mcp (cognitive 17) src/qwenpaw/portability/providers/external_state.py:567 — external_state.discover_qoder_plugin_mcp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), ternaries 1 (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 · transaction_journal.recover_import_transactions (cognitive 17) · ×1
  • transaction_journal.recover_import_transactions (cognitive 17) src/qwenpaw/portability/transaction_journal.py:116 — transaction_journal.recover_import_transactions has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (11 pts), if/else 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WireProtocol.response (cognitive 17) · ×1
  • WireProtocol.response (cognitive 17) src/qwenpaw/providers/adapters/wire_protocol.py:281 — WireProtocol.response has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2, loops 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.
D2 · Cognitive Complexity · AnthropicProvider._normalize_models_payload (cognitive 17) · ×1
  • AnthropicProvider._normalize_models_payload (cognitive 17) src/qwenpaw/providers/anthropic_provider.py:135 — AnthropicProvider._normalize_models_payload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 2 (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 · ChatGPTModel._call_api (cognitive 17) · ×1
  • ChatGPTModel._call_api (cognitive 17) src/qwenpaw/providers/chatgpt_provider.py:41 — ChatGPTModel._call_api has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openai_chat_model_compat._sanitize_chunk (cognitive 17) · ×1
  • openai_chat_model_compat._sanitize_chunk (cognitive 17) src/qwenpaw/providers/openai_chat_model_compat.py:109 — openai_chat_model_compat._sanitize_chunk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Provider.discovery_candidates (cognitive 17) · ×1
  • Provider.discovery_candidates (cognitive 17) src/qwenpaw/providers/provider.py:729 — Provider.discovery_candidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 3, ternaries 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 · Provider._map_agent_thinking_level (cognitive 17) · ×1
  • Provider._map_agent_thinking_level (cognitive 17) src/qwenpaw/providers/provider.py:1088 — Provider._map_agent_thinking_level has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetryChatModel._consume_stream_with_slot (cognitive 17) · ×1
  • RetryChatModel._consume_stream_with_slot (cognitive 17) src/qwenpaw/providers/retry_chat_model.py:542 — RetryChatModel._consume_stream_with_slot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarnessSessionBridge._output_block (cognitive 17) · ×1
  • HarnessSessionBridge._output_block (cognitive 17) src/qwenpaw/runtime/backends/session.py:297 — HarnessSessionBridge._output_block has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Runtime._try_save_on_cancel (cognitive 17) · ×1
  • Runtime._try_save_on_cancel (cognitive 17) src/qwenpaw/runtime/runtime.py:275 — Runtime._try_save_on_cancel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · decision_model._interpret (cognitive 17) · ×1
  • decision_model._interpret (cognitive 17) src/qwenpaw/security/decision_model.py:401 — decision_model._interpret has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (5 pts), boolean chains 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 · RuleLoader.load_rules (cognitive 17) · ×1
  • RuleLoader.load_rules (cognitive 17) src/qwenpaw/security/skill_scanner/analyzers/pattern_analyzer.py:172 — RuleLoader.load_rules has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (7 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown_cjk._build_protection_masks (cognitive 17) · ×1
  • markdown_cjk._build_protection_masks (cognitive 17) src/qwenpaw/utils/markdown_cjk.py:193 — markdown_cjk._build_protection_masks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionApi._doGetSession (cognitive 17) · ×1
  • SessionApi._doGetSession (cognitive 17) console/src/pages/Chat/sessionApi/index.ts:1730 — SessionApi._doGetSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (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 · useChannelQrcode.useChannelQrcode.fetchQrcode (cognitive 17) · ×1
  • useChannelQrcode.useChannelQrcode.fetchQrcode (cognitive 17) console/src/pages/Control/Channels/components/useChannelQrcode.ts:118 — useChannelQrcode.useChannelQrcode.fetchQrcode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (schedulePoll, active, fail, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SidebarUsageDialog.Surface (cognitive 17) · ×1
  • SidebarUsageDialog.Surface (cognitive 17) console/src/layouts/SidebarUsageDialog.tsx:16 — SidebarUsageDialog.Surface has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 4, boolean chains 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 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 · SnapTrend.SnapTrend (cognitive 17) · ×1
  • SnapTrend.SnapTrend (cognitive 17) console/src/components/interaction/SnapTrend.tsx:11 — SnapTrend.SnapTrend has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 4 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 93, select, a function literal at line 75, …). 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 · DesktopUpdateContext.DesktopUpdateProvider (cognitive 17) · ×1
  • DesktopUpdateContext.DesktopUpdateProvider (cognitive 17) console/src/contexts/DesktopUpdateContext.tsx:61 — DesktopUpdateContext.DesktopUpdateProvider has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 4, error handling 3, ternaries 3. Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 112, 84, 96, …). 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 · usePluginLoader.loadFrontendPlugin (cognitive 17) · ×1
  • usePluginLoader.loadFrontendPlugin (cognitive 17) console/src/plugins/usePluginLoader.ts:166 — usePluginLoader.loadFrontendPlugin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, error handling 1 (nesting depth added 2). 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 187, 177). 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 · utils.extractAgentListItems (cognitive 17) · ×1
  • utils.extractAgentListItems (cognitive 17) REDACTED:506 — utils.extractAgentListItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.stringifyResult (cognitive 17) · ×1
  • utils.stringifyResult (cognitive 17) REDACTED:605 — utils.stringifyResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useBackgroundTaskWatcher.chunkToText (cognitive 17) · ×1
  • useBackgroundTaskWatcher.chunkToText (cognitive 17) console/src/hooks/useBackgroundTaskWatcher.ts:25 — useBackgroundTaskWatcher.chunkToText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PressFeedback.PressFeedback (cognitive 17) · ×1
  • PressFeedback.PressFeedback (cognitive 17) console/src/components/interaction/PressFeedback.tsx:5 — PressFeedback.PressFeedback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2. None of this is in the body itself: all 17 points belong to 7 function literals inside it that branch (lines 36, 58, 10, …). 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 · useOsAppMarket.useOsAppMarket (cognitive 17) · ×1
  • useOsAppMarket.useOsAppMarket (cognitive 17) console/src/os/useOsAppMarket.ts:22 — useOsAppMarket.useOsAppMarket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2, error handling 1, loops 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 63, 47, 52, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.AppInner (cognitive 17) · ×1
  • App.AppInner (cognitive 17) console/src/App.tsx:358 — App.AppInner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 6 (7 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 409, 390, 386, …). 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.CommunityFeedback (cognitive 17) · ×1
  • index.CommunityFeedback (cognitive 17) console/src/components/CommunityFeedback/index.tsx:29 — index.CommunityFeedback has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (7 pts), boolean chains 6, if/else 4 (nesting depth added 2). Of this number, 10 points are the body's own statements and 7 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 · OAuthConfirmModal.OAuthConfirmModal (cognitive 17) · ×1
  • OAuthConfirmModal.OAuthConfirmModal (cognitive 17) console/src/pages/Chat/ModelSelector/OAuthConfirmModal.tsx:27 — OAuthConfirmModal.OAuthConfirmModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 81, 56, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentModelSettings.AgentModelSettings · ×1
  • AgentModelSettings.AgentModelSettings::save (cognitive 17) console/src/pages/Chat/ModelSelector/AgentModelSettings.tsx:294 — AgentModelSettings.AgentModelSettings::save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 3 (4 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphLayout.buildGraphRows (cognitive 17) · ×1
  • graphLayout.buildGraphRows (cognitive 17) console/src/pages/Agent/Checkpoints/graphLayout.ts:12 — graphLayout.buildGraphRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentModelCard.AgentModelCard (cognitive 17) · ×1
  • AgentModelCard.AgentModelCard (cognitive 17) console/src/pages/Agent/Config/components/AgentModelCard.tsx:17 — AgentModelCard.AgentModelCard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 7 belong to 2 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 · SkillListItem.SkillListItem (cognitive 17) · ×1
  • SkillListItem.SkillListItem (cognitive 17) console/src/pages/Agent/Skills/components/SkillListItem.tsx:21 — SkillListItem.SkillListItem has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 4 (nesting depth added 1). Of this number, 10 points are the body's own statements and 7 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 · index.SkillsPage (cognitive 17) · ×1
  • index.SkillsPage (cognitive 17) console/src/pages/Agent/Skills/index.tsx:26 — index.SkillsPage has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 3 (5 pts), if/else 2 (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 · headlineFilter.filterHeadlineDelta (cognitive 17) · ×1
  • headlineFilter.filterHeadlineDelta (cognitive 17) console/src/pages/Chat/headlineFilter.ts:112 — headlineFilter.filterHeadlineDelta has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostAssistance.PostAssistance · ×1
  • PostAssistance.PostAssistance::generate (cognitive 17) console/src/pages/CommunityFeedback/PostAssistance.tsx:294 — PostAssistance.PostAssistance::generate has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (7 pts), boolean chains 6, if/else 2 (3 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. This shape REPEATS in the file: one other method here (PostAssistance.PostAssistance) 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 · ResourceReportModal.ResourceReportModal · ×1
  • ResourceReportModal.ResourceReportModal::generate (cognitive 17) console/src/pages/CommunityFeedback/ResourceReportModal.tsx:117 — ResourceReportModal.ResourceReportModal::generate has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (6 pts), boolean chains 5, if/else 4 (5 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. This shape REPEATS in the file: one other method here (ResourceReportModal.ResourceReportModal) 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 · ResourceReportModal.ResourceReportModal (cognitive 17) · ×1
  • ResourceReportModal.ResourceReportModal (cognitive 17) console/src/pages/CommunityFeedback/ResourceReportModal.tsx:30 — ResourceReportModal.ResourceReportModal has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 22, if/else 18 (21 pts), ternaries 6 (10 pts), error handling 4 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ResourceReportModal.ResourceReportModal::generate) 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 · useInboxData.useInboxData.loadPushMessages (cognitive 17) · ×1
  • useInboxData.useInboxData.loadPushMessages (cognitive 17) console/src/pages/Inbox/hooks/useInboxData.ts:323 — useInboxData.useInboxData.loadPushMessages has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 335, a function literal at line 354, isLatestRequest, …). 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 · useMarketSearch.useMarketSearch (cognitive 17) · ×1
  • useMarketSearch.useMarketSearch (cognitive 17) console/src/pages/Settings/Market/useMarketSearch.ts:61 — useMarketSearch.useMarketSearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 4, error handling 1, loops 1, ternaries 1. Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 112, 362, 225, …). 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 · useMarketInstall.useMarketInstall.installWorkspace (cognitive 17) · ×1
  • useMarketInstall.useMarketInstall.installWorkspace (cognitive 17) console/src/pages/Settings/Market/useMarketInstall.ts:62 — useMarketInstall.useMarketInstall.installWorkspace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PoolSkillDrawer.PoolSkillDrawer (cognitive 17) · ×1
  • PoolSkillDrawer.PoolSkillDrawer (cognitive 17) console/src/pages/Settings/SkillPool/components/PoolSkillDrawer.tsx:50 — PoolSkillDrawer.PoolSkillDrawer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 4 (5 pts), if/else 2 (3 pts) (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.AgentLane (cognitive 17) · ×1
  • index.AgentLane (cognitive 17) REDACTED:871 — index.AgentLane has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 4 (nesting depth added 3). 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 926, 943). 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 · promptEntityNames.presentPromptEntityNames (cognitive 17) · ×1
  • promptEntityNames.presentPromptEntityNames (cognitive 17) plugins/apps/qwenpaw-creator/ui/src/lib/promptEntityNames.ts:5 — promptEntityNames.presentPromptEntityNames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 4). 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, split the body into named stages: move each independent 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 · markdown.parseToc (cognitive 17) · ×1
  • markdown.parseToc (cognitive 17) website/src/pages/Docs/markdown.ts:24 — markdown.parseToc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file_asset_routes.import_assets (cognitive 16) · ×1
  • file_asset_routes.import_assets (cognitive 16) plugins/apps/qwenpaw-creator/backend/api/file_asset_routes.py:1784 — file_asset_routes.import_assets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · OpenAIImageModel._decode (cognitive 16) · ×1
  • OpenAIImageModel._decode (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:475 — OpenAIImageModel._decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 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 · veo.build_submit_request (cognitive 16) · ×1
  • veo.build_submit_request (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/video_backends/veo.py:75 — veo.build_submit_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 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 · veo.check_status (cognitive 16) · ×1
  • veo.check_status (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/video_backends/veo.py:183 — veo.check_status has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3 (4 pts) (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 · video_capabilities._model_reference_syntax_guidance (cognitive 16) · ×1
  • video_capabilities._model_reference_syntax_guidance (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/video_capabilities.py:1345 — video_capabilities._model_reference_syntax_guidance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (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 · video_model._build_vidu_body (cognitive 16) · ×1
  • video_model._build_vidu_body (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/video_model.py:513 — video_model._build_vidu_body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 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 · vlm_model._convert_to_anthropic_content (cognitive 16) · ×1
  • vlm_model._convert_to_anthropic_content (cognitive 16) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:625 — vlm_model._convert_to_anthropic_content has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._run_ground_prompt_context (cognitive 16) · ×1
  • FileCreatorAgentRuntime._run_ground_prompt_context (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4503 — FileCreatorAgentRuntime._run_ground_prompt_context has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FileCreatorAgentRuntime._read_object_grounding_project_image (cognitive 16) · ×1
  • FileCreatorAgentRuntime._read_object_grounding_project_image (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4587 — FileCreatorAgentRuntime._read_object_grounding_project_image has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, 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, 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 · FileCreatorAgentRuntime._record_idle_interrupt (cognitive 16) · ×1
  • FileCreatorAgentRuntime._record_idle_interrupt (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:9097 — FileCreatorAgentRuntime._record_idle_interrupt has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 4 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · driver._require_source_intelligence_associations (cognitive 16) · ×1
  • driver._require_source_intelligence_associations (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:9861 — driver._require_source_intelligence_associations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · work_graph._resolved_element_version (cognitive 16) · ×1
  • work_graph._resolved_element_version (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_graph.py:122 — work_graph._resolved_element_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · work_scheduler._quarantined_stale_targets (cognitive 16) · ×1
  • work_scheduler._quarantined_stale_targets (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/work_scheduler.py:119 — work_scheduler._quarantined_stale_targets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 1 (2 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 · source_memory.merge_projection_semantics (cognitive 16) · ×1
  • source_memory.merge_projection_semantics (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:321 — source_memory.merge_projection_semantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · audio_execution._begin_voice_request (cognitive 16) · ×1
  • audio_execution._begin_voice_request (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:749 — audio_execution._begin_voice_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TakeRecorder._drain (cognitive 16) · ×1
  • TakeRecorder._drain (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:172 — TakeRecorder._drain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TakeRecorder._stop_pump (cognitive 16) · ×1
  • TakeRecorder._stop_pump (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:347 — TakeRecorder._stop_pump has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 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 · motion_blueprints._scene_edu_step_card (cognitive 16) · ×1
  • motion_blueprints._scene_edu_step_card (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:1374 — motion_blueprints._scene_edu_step_card has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 7. 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 · FileR2VExecutionService._terminalize_task_from_state (cognitive 16) · ×1
  • FileR2VExecutionService._terminalize_task_from_state (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2933 — FileR2VExecutionService._terminalize_task_from_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_scratch._release_pinned_tree (cognitive 16) · ×1
  • task_scratch._release_pinned_tree (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/task_scratch.py:264 — task_scratch._release_pinned_tree has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visual_design_readiness._entity_readiness_issues (cognitive 16) · ×1
  • visual_design_readiness._entity_readiness_issues (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/media_files/visual_design_readiness.py:74 — visual_design_readiness._entity_readiness_issues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · archive.extract_archive (cognitive 16) · ×1
  • archive.extract_archive (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/archive.py:112 — archive.extract_archive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1, ternaries 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 · candidate_normalization._find_target_shot_for_overlay (cognitive 16) · ×1
  • candidate_normalization._find_target_shot_for_overlay (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/candidate_normalization.py:134 — candidate_normalization._find_target_shot_for_overlay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectCommitBoundary._assert_no_pending_publication (cognitive 16) · ×1
  • ProjectCommitBoundary._assert_no_pending_publication (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/commit.py:1152 — ProjectCommitBoundary._assert_no_pending_publication has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migrations.migrate_project_document (cognitive 16) · ×1
  • migrations.migrate_project_document (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/migrations.py:904 — migrations.migrate_project_document has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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 · ProjectCommitRecoveryCoordinator._prepare_existing_review_update (cognitive 16) · ×1
  • ProjectCommitRecoveryCoordinator._prepare_existing_review_update (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/recovery.py:1264 — ProjectCommitRecoveryCoordinator._prepare_existing_review_update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · ReviewDecisionJournal.validate_phase (cognitive 16) · ×1
  • ReviewDecisionJournal.validate_phase (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/review.py:301 — ReviewDecisionJournal.validate_phase has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · script_import.publish_script_import (cognitive 16) · ×1
  • script_import.publish_script_import (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/project_files/script_import.py:608 — script_import.publish_script_import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PromptSyncService.accept (cognitive 16) · ×1
  • PromptSyncService.accept (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/prompt_sync_service.py:632 — PromptSyncService.accept has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2, 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.
D2 · Cognitive Complexity · media_review._visual_plan_context (cognitive 16) · ×1
  • media_review._visual_plan_context (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:195 — media_review._visual_plan_context has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codec.build_source_intelligence_index (cognitive 16) · ×1
  • codec.build_source_intelligence_index (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:30 — codec.build_source_intelligence_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, error handling 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent 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 · adapters._post_serper_json (cognitive 16) · ×1
  • adapters._post_serper_json (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:60 — adapters._post_serper_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verification._enforce_single_selected_visual_source (cognitive 16) · ×1
  • verification._enforce_single_selected_visual_source (cognitive 16) plugins/apps/qwenpaw-creator/backend/services/web_grounding/verification.py:456 — verification._enforce_single_selected_visual_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seed.submit_weave (cognitive 16) · ×1
  • seed.submit_weave (cognitive 16) REDACTED:178 — seed.submit_weave has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agents_setup._uninstall_agent_profiles (cognitive 16) · ×1
  • agents_setup._uninstall_agent_profiles (cognitive 16) plugins/bundle/cloudpaw/agents_setup.py:349 — agents_setup._uninstall_agent_profiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hooks._pick_allow_option (cognitive 16) · ×1
  • hooks._pick_allow_option (cognitive 16) plugins/bundle/cloudpaw/hooks.py:164 — hooks._pick_allow_option has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · a2a.register_agent (cognitive 16) · ×1
  • a2a.register_agent (cognitive 16) REDACTED:240 — a2a.register_agent has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6, error handling 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 · proposal_choice.proposal_choice (cognitive 16) · ×1
  • proposal_choice.proposal_choice (cognitive 16) plugins/bundle/cloudpaw/tools/proposal_choice.py:220 — proposal_choice.proposal_choice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 3 (4 pts), boolean chains 3, ternaries 1 (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 · ComputerUseClient._ensure_transport (cognitive 16) · ×1
  • ComputerUseClient._ensure_transport (cognitive 16) plugins/bundle/computer-use/computer_use/client.py:392 — ComputerUseClient._ensure_transport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtime._terminate_process_tree_unix (cognitive 16) · ×1
  • runtime._terminate_process_tree_unix (cognitive 16) plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/runtime.py:370 — runtime._terminate_process_tree_unix has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (6 pts), if/else 6, boolean chains 4 (nesting depth added 1). To reduce it, split the body into named stages: move each independent 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 · LarkOapiPlatform.disconnect (cognitive 16) · ×1
  • LarkOapiPlatform.disconnect (cognitive 16) plugins/channel/feishu/qwenpaw_channel_feishu/platform.py:367 — LarkOapiPlatform.disconnect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMessagePlatform._send_command (cognitive 16) · ×1
  • IMessagePlatform._send_command (cognitive 16) plugins/channel/imessage/qwenpaw_channel_imessage/platform.py:192 — IMessagePlatform._send_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4, 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 · OneBotDriver._handle_platform_event (cognitive 16) · ×1
  • OneBotDriver._handle_platform_event (cognitive 16) plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:210 — OneBotDriver._handle_platform_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (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 · OneBotInboundMedia._localize_part (cognitive 16) · ×1
  • OneBotInboundMedia._localize_part (cognitive 16) plugins/channel/onebot/qwenpaw_channel_onebot/media.py:336 — OneBotInboundMedia._localize_part has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 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 · tool_guard.parse_interaction_event (cognitive 16) · ×1
  • tool_guard.parse_interaction_event (cognitive 16) plugins/channel/qq/qwenpaw_channel_qq/cards/tool_guard.py:121 — tool_guard.parse_interaction_event has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2, error handling 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 · QQMedia._send_rich (cognitive 16) · ×1
  • QQMedia._send_rich (cognitive 16) plugins/channel/qq/qwenpaw_channel_qq/media.py:293 — QQMedia._send_rich has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SIPPlatform._cleanup_call (cognitive 16) · ×1
  • SIPPlatform._cleanup_call (cognitive 16) plugins/channel/sip/qwenpaw_channel_sip/platform.py:401 — SIPPlatform._cleanup_call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SIPPlatform.close (cognitive 16) · ×1
  • SIPPlatform.close (cognitive 16) plugins/channel/sip/qwenpaw_channel_sip/platform.py:441 — SIPPlatform.close has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 4, loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlackPlatform.update_stream (cognitive 16) · ×1
  • SlackPlatform.update_stream (cognitive 16) plugins/channel/slack/qwenpaw_channel_slack/platform.py:471 — SlackPlatform.update_stream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (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 · SlackSender.resolve_route (cognitive 16) · ×1
  • SlackSender.resolve_route (cognitive 16) plugins/channel/slack/qwenpaw_channel_slack/sender.py:495 — SlackSender.resolve_route has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (4 pts), ternaries 1 (2 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 · management.manage (cognitive 16) · ×1
  • management.manage (cognitive 16) plugins/channel/wechat/qwenpaw_channel_wechat/management.py:26 — management.manage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeChatPlatform._message (cognitive 16) · ×1
  • WeChatPlatform._message (cognitive 16) REDACTED:194 — WeChatPlatform._message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WeComPlatform._cancel_processing (cognitive 16) · ×1
  • WeComPlatform._cancel_processing (cognitive 16) REDACTED:750 — WeComPlatform._cancel_processing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WeComPlatform._handle_card (cognitive 16) · ×1
  • WeComPlatform._handle_card (cognitive 16) REDACTED:1110 — WeComPlatform._handle_card 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 · media._parse_image_size (cognitive 16) · ×1
  • media._parse_image_size (cognitive 16) REDACTED:105 — media._parse_image_size has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, 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 · media._read_local_media (cognitive 16) · ×1
  • media._read_local_media (cognitive 16) REDACTED:394 — media._read_local_media has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), 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, 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 · YuanbaoPlatform._handle_response (cognitive 16) · ×1
  • YuanbaoPlatform._handle_response (cognitive 16) plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:657 — YuanbaoPlatform._handle_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (2 pts) (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 · ContinuationSummary.from_dict (cognitive 16) · ×1
  • ContinuationSummary.from_dict (cognitive 16) src/qwenpaw/agents/context/scroll/continuation_summary.py:521 — ContinuationSummary.from_dict has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, error handling 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 · HistoryStore.purge (cognitive 16) · ×1
  • HistoryStore.purge (cognitive 16) src/qwenpaw/agents/context/scroll/history.py:1141 — HistoryStore.purge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemorySpace._collect_distinct_hits (cognitive 16) · ×1
  • MemorySpace._collect_distinct_hits (cognitive 16) src/qwenpaw/agents/context/scroll/memoryspace.py:1013 — MemorySpace._collect_distinct_hits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 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 · recall_tool._render_page (cognitive 16) · ×1
  • recall_tool._render_page (cognitive 16) src/qwenpaw/agents/context/scroll/recall_tool.py:681 — recall_tool._render_page has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.migrate_agent_history (cognitive 16) · ×1
  • sync.migrate_agent_history (cognitive 16) src/qwenpaw/agents/context/scroll/sync.py:774 — sync.migrate_agent_history has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwenPawAgent._compress_context_impl (cognitive 16) · ×1
  • QwenPawAgent._compress_context_impl (cognitive 16) src/qwenpaw/agents/react_agent.py:399 — QwenPawAgent._compress_context_impl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hub._qwenpaw_detail_archive_to_bundle (cognitive 16) · ×1
  • hub._qwenpaw_detail_archive_to_bundle (cognitive 16) src/qwenpaw/agents/skill_system/hub.py:1749 — hub._qwenpaw_detail_archive_to_bundle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2, boolean chains 1, 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 · SkillService.install_skill_directory (cognitive 16) · ×1
  • SkillService.install_skill_directory (cognitive 16) src/qwenpaw/agents/skill_system/workspace_service.py:258 — SkillService.install_skill_directory has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (6 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent_management._spawn_batch (cognitive 16) · ×1
  • agent_management._spawn_batch (cognitive 16) src/qwenpaw/agents/tools/agent_management.py:1440 — agent_management._spawn_batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 2, error handling 1 (2 pts), loops 2, ternaries 1 (2 pts) (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 · browser_control._get_tab_info_list (cognitive 16) · ×1
  • browser_control._get_tab_info_list (cognitive 16) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:1495 — browser_control._get_tab_info_list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_control._action_wait_for (cognitive 16) · ×1
  • browser_control._action_wait_for (cognitive 16) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4307 — browser_control._action_wait_for has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browser_snapshot._compact_tree (cognitive 16) · ×1
  • browser_snapshot._compact_tree (cognitive 16) src/qwenpaw/agents/tools/deprecated_browser/browser_snapshot.py:112 — browser_snapshot._compact_tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file_io.read_file (cognitive 16) · ×1
  • file_io.read_file (cognitive 16) src/qwenpaw/agents/tools/file_io.py:128 — file_io.read_file has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (7 pts), if/else 5, boolean chains 2, ternaries 2 (nesting depth added 2). To reduce it, split the body into named stages: move each independent 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 · run_tool_batch._lookup_step_ref (cognitive 16) · ×1
  • run_tool_batch._lookup_step_ref (cognitive 16) src/qwenpaw/agents/tools/run_tool_batch.py:267 — run_tool_batch._lookup_step_ref has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image_freezing._freeze_data_block (cognitive 16) · ×1
  • image_freezing._freeze_data_block (cognitive 16) src/qwenpaw/agents/utils/image_freezing.py:192 — image_freezing._freeze_data_block has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · message_processing._coerce_block_to_dict (cognitive 16) · ×1
  • message_processing._coerce_block_to_dict (cognitive 16) src/qwenpaw/agents/utils/message_processing.py:467 — message_processing._coerce_block_to_dict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 · tool_call_coerce._schema_accepts (cognitive 16) · ×1
  • tool_call_coerce._schema_accepts (cognitive 16) src/qwenpaw/agents/utils/tool_call_coerce.py:83 — tool_call_coerce._schema_accepts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, 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 · _app._stop_workspaces_after_dependents_impl (cognitive 16) · ×1
  • _app._stop_workspaces_after_dependents_impl (cognitive 16) src/qwenpaw/app/_app.py:181 — _app._stop_workspaces_after_dependents_impl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwenPawDriverApprovalGate.request_approval (cognitive 16) · ×1
  • QwenPawDriverApprovalGate.request_approval (cognitive 16) src/qwenpaw/app/approvals/driver_gate.py:20 — QwenPawDriverApprovalGate.request_approval has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BaseChannel.merge_native_items (cognitive 16) · ×1
  • BaseChannel.merge_native_items (cognitive 16) src/qwenpaw/app/channels/base.py:198 — BaseChannel.merge_native_items has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 2 (4 pts), loops 2 (3 pts), ternaries 2 (3 pts) (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 · ChannelManager.from_env (cognitive 16) · ×1
  • ChannelManager.from_env (cognitive 16) src/qwenpaw/app/channels/manager.py:742 — ChannelManager.from_env has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelQRCodeSessions.operation_guard (cognitive 16) · ×1
  • ChannelQRCodeSessions.operation_guard (cognitive 16) src/qwenpaw/app/channels/qrcode_sessions.py:750 — ChannelQRCodeSessions.operation_guard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, loops 4, error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent 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 · wechat_auth_custody._reserve_wechat_auth_evidence (cognitive 16) · ×1
  • wechat_auth_custody._reserve_wechat_auth_evidence (cognitive 16) src/qwenpaw/app/channels/wechat_auth_custody.py:99 — wechat_auth_custody._reserve_wechat_auth_evidence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api.get_chat (cognitive 16) · ×1
  • api.get_chat (cognitive 16) src/qwenpaw/app/chats/api.py:837 — api.get_chat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 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 · CommunityConnectionService.status (cognitive 16) · ×1
  • CommunityConnectionService.status (cognitive 16) src/qwenpaw/app/community_connection.py:443 — CommunityConnectionService.status has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 6 (7 pts), if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CommunityConnectionService._fresh_connection (cognitive 16) · ×1
  • CommunityConnectionService._fresh_connection (cognitive 16) src/qwenpaw/app/community_connection.py:963 — CommunityConnectionService._fresh_connection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · community_plugin_lookup._lookup (cognitive 16) · ×1
  • community_plugin_lookup._lookup (cognitive 16) src/qwenpaw/app/community_plugin_lookup.py:39 — community_plugin_lookup._lookup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community_report._contains_image_payload (cognitive 16) · ×1
  • community_report._contains_image_payload (cognitive 16) src/qwenpaw/app/community_report.py:336 — community_report._contains_image_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, 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 · json_repo.migrate_legacy_weixin_jobs_file (cognitive 16) · ×1
  • json_repo.migrate_legacy_weixin_jobs_file (cognitive 16) src/qwenpaw/app/crons/repo/json_repo.py:160 — json_repo.migrate_legacy_weixin_jobs_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 2, error handling 2, 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.
D2 · Cognitive Complexity · AgentMailACL.from_dict (cognitive 16) · ×1
  • AgentMailACL.from_dict (cognitive 16) src/qwenpaw/app/mail/mail_access_control.py:232 — AgentMailACL.from_dict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · migration._fallback_active_agent_id (cognitive 16) · ×1
  • migration._fallback_active_agent_id (cognitive 16) src/qwenpaw/app/migration.py:739 — migration._fallback_active_agent_id has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResponseCompressionMiddleware.__call__ (cognitive 16) · ×1
  • ResponseCompressionMiddleware.__call__ (cognitive 16) src/qwenpaw/app/response_compression.py:18 — ResponseCompressionMiddleware.__call__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 1 (5 pts), loops 2 (4 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 · agents._read_profile_description (cognitive 16) · ×1
  • agents._read_profile_description (cognitive 16) src/qwenpaw/app/routers/agents.py:488 — agents._read_profile_description has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1, loops 1, ternaries 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 · console.post_console_chat_stop (cognitive 16) · ×1
  • console.post_console_chat_stop (cognitive 16) src/qwenpaw/app/routers/console.py:579 — console.post_console_chat_stop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 7). 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 · providers.set_active_model (cognitive 16) · ×1
  • providers.set_active_model (cognitive 16) src/qwenpaw/app/routers/providers.py:999 — providers.set_active_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, error handling 2 (3 pts), ternaries 1 (nesting depth added 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 · skills.update_pool_skill_automation (cognitive 16) · ×1
  • skills.update_pool_skill_automation (cognitive 16) src/qwenpaw/app/routers/skills.py:2083 — skills.update_pool_skill_automation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Workspace.stop (cognitive 16) · ×1
  • Workspace.stop (cognitive 16) src/qwenpaw/app/workspace/workspace.py:914 — Workspace.stop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (6 pts), boolean chains 1 (nesting depth added 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 · CdpControlLink._m_close_session (cognitive 16) · ×1
  • CdpControlLink._m_close_session (cognitive 16) src/qwenpaw/browser/control_link/cdp/adapter.py:589 — CdpControlLink._m_close_session has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1, ternaries 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 · wire.read_frame (cognitive 16) · ×1
  • wire.read_frame (cognitive 16) src/qwenpaw/browser/execution/wire.py:190 — wire.read_frame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (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 · WorkspaceMutationGuard._wait_workspace_idle (cognitive 16) · ×1
  • WorkspaceMutationGuard._wait_workspace_idle (cognitive 16) src/qwenpaw/checkpoints/restore.py:116 — WorkspaceMutationGuard._wait_workspace_idle has cognitive complexity 16 (threshold 15). Drivers by points: error handling 6 (12 pts), boolean chains 3, 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 · channels_cmd._channel_config_fields (cognitive 16) · ×1
  • channels_cmd._channel_config_fields (cognitive 16) src/qwenpaw/cli/channels_cmd.py:855 — channels_cmd._channel_config_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 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 · cron_cmd._validate_and_apply_scheduled_repeat (cognitive 16) · ×1
  • cron_cmd._validate_and_apply_scheduled_repeat (cognitive 16) src/qwenpaw/cli/cron_cmd.py:127 — cron_cmd._validate_and_apply_scheduled_repeat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7 (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 · doctor_checks.windows_environment_lines (cognitive 16) · ×1
  • doctor_checks.windows_environment_lines (cognitive 16) src/qwenpaw/cli/doctor_checks.py:318 — doctor_checks.windows_environment_lines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · doctor_fix_runner._normalize_cron_fields_in_jobs_dict (cognitive 16) · ×1
  • doctor_fix_runner._normalize_cron_fields_in_jobs_dict (cognitive 16) src/qwenpaw/cli/doctor_fix_runner.py:111 — doctor_fix_runner._normalize_cron_fields_in_jobs_dict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills_cmd.uninstall_cmd (cognitive 16) · ×1
  • skills_cmd.uninstall_cmd (cognitive 16) src/qwenpaw/cli/skills_cmd.py:1074 — skills_cmd.uninstall_cmd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp_card_builder.build_mcp_credential_record (cognitive 16) · ×1
  • mcp_card_builder.build_mcp_credential_record (cognitive 16) src/qwenpaw/drivers/adapters/mcp_card_builder.py:50 — mcp_card_builder.build_mcp_credential_record has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2, ternaries 2 (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 · MCPDriverHandler._setup (cognitive 16) · ×1
  • MCPDriverHandler._setup (cognitive 16) src/qwenpaw/drivers/handlers/mcp.py:68 — MCPDriverHandler._setup has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 2 (4 pts), error handling 2, if/else 2 (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 · detectors._check_backslash_escaped_operators (cognitive 16) · ×1
  • detectors._check_backslash_escaped_operators (cognitive 16) src/qwenpaw/governance/detectors.py:651 — detectors._check_backslash_escaped_operators has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). 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 · detectors._check_newlines (cognitive 16) · ×1
  • detectors._check_newlines (cognitive 16) src/qwenpaw/governance/detectors.py:694 — detectors._check_newlines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResourceGovernor.compile_sandbox_config (cognitive 16) · ×1
  • ResourceGovernor.compile_sandbox_config (cognitive 16) src/qwenpaw/governance/resource_governor.py:339 — ResourceGovernor.compile_sandbox_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config_migration.migrate_hub_settings (cognitive 16) · ×1
  • config_migration.migrate_hub_settings (cognitive 16) src/qwenpaw/hub/config_migration.py:40 — config_migration.migrate_hub_settings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 4 (5 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SharedLimiter.acquire (cognitive 16) · ×1
  • SharedLimiter.acquire (cognitive 16) src/qwenpaw/hub/model_service/limiter.py:61 — SharedLimiter.acquire has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlamaCppBackend.setup_server (cognitive 16) · ×1
  • LlamaCppBackend.setup_server (cognitive 16) src/qwenpaw/local_models/llamacpp.py:233 — LlamaCppBackend.setup_server has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, 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 · ModelLease.close (cognitive 16) · ×1
  • ModelLease.close (cognitive 16) src/qwenpaw/plugins/_models.py:349 — ModelLease.close has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelBackend.runtime_for (cognitive 16) · ×1
  • ChannelBackend.runtime_for (cognitive 16) src/qwenpaw/plugins/channel_adapter.py:554 — ChannelBackend.runtime_for has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, ternaries 3 (4 pts) (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 · DependencyUpgradeManager._warnings (cognitive 16) · ×1
  • DependencyUpgradeManager._warnings (cognitive 16) src/qwenpaw/plugins/dependency_upgrade.py:1276 — DependencyUpgradeManager._warnings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bootstrap._open_protocol_transport (cognitive 16) · ×1
  • bootstrap._open_protocol_transport (cognitive 16) src/qwenpaw/plugins/execution/bootstrap.py:638 — bootstrap._open_protocol_transport has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 5 (6 pts), boolean chains 2, ternaries 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 · dependencies.host_module_affected (cognitive 16) · ×1
  • dependencies.host_module_affected (cognitive 16) src/qwenpaw/plugins/execution/dependencies.py:438 — dependencies.host_module_affected has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2 (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 · RpcPeer._dispatch_request (cognitive 16) · ×1
  • RpcPeer._dispatch_request (cognitive 16) src/qwenpaw/plugins/execution/rpc.py:533 — RpcPeer._dispatch_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtime.validate_hello (cognitive 16) · ×1
  • runtime.validate_hello (cognitive 16) src/qwenpaw/plugins/execution/runtime.py:106 — runtime.validate_hello has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · harness_migration.migrate_legacy_harnesses (cognitive 16) · ×1
  • harness_migration.migrate_legacy_harnesses (cognitive 16) src/qwenpaw/plugins/harness_migration.py:137 — harness_migration.migrate_legacy_harnesses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 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 · install_lock.async_lock (cognitive 16) · ×1
  • install_lock.async_lock (cognitive 16) src/qwenpaw/plugins/install_lock.py:60 — install_lock.async_lock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · legacy_cloudpaw.prepare_uninstall (cognitive 16) · ×1
  • legacy_cloudpaw.prepare_uninstall (cognitive 16) src/qwenpaw/plugins/legacy_cloudpaw.py:233 — legacy_cloudpaw.prepare_uninstall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1, ternaries 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 · PythonBackend.admit_existing (cognitive 16) · ×1
  • PythonBackend.admit_existing (cognitive 16) src/qwenpaw/plugins/python_backend.py:405 — PythonBackend.admit_existing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (5 pts), boolean chains 1, error handling 1, 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 · PluginTestHost._restore_environment (cognitive 16) · ×1
  • PluginTestHost._restore_environment (cognitive 16) src/qwenpaw/plugins/testing.py:305 — PluginTestHost._restore_environment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adaptation_loop._run_phase (cognitive 16) · ×1
  • adaptation_loop._run_phase (cognitive 16) src/qwenpaw/portability/adaptation_loop.py:569 — adaptation_loop._run_phase has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, error handling 1, 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 · codex_plugin_adapter._skill_paths (cognitive 16) · ×1
  • codex_plugin_adapter._skill_paths (cognitive 16) src/qwenpaw/portability/codex_plugin_adapter.py:48 — codex_plugin_adapter._skill_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, 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 · model_metadata.list_model_templates (cognitive 16) · ×1
  • model_metadata.list_model_templates (cognitive 16) src/qwenpaw/providers/model_metadata.py:84 — model_metadata.list_model_templates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenRouterProvider.filter_models (cognitive 16) · ×1
  • OpenRouterProvider.filter_models (cognitive 16) src/qwenpaw/providers/openrouter_provider.py:369 — OpenRouterProvider.filter_models has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerDiscoveryMixin._merge_catalog_models (cognitive 16) · ×1
  • ProviderManagerDiscoveryMixin._merge_catalog_models (cognitive 16) src/qwenpaw/providers/provider_manager_discovery.py:645 — ProviderManagerDiscoveryMixin._merge_catalog_models has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProviderManagerPersistenceMixin._merge_provider_snapshot (cognitive 16) · ×1
  • ProviderManagerPersistenceMixin._merge_provider_snapshot (cognitive 16) src/qwenpaw/providers/provider_manager_persistence.py:451 — ProviderManagerPersistenceMixin._merge_provider_snapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thinking.resolve_thinking (cognitive 16) · ×1
  • thinking.resolve_thinking (cognitive 16) src/qwenpaw/providers/thinking.py:84 — thinking.resolve_thinking has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · BackendRegistry.describe (cognitive 16) · ×1
  • BackendRegistry.describe (cognitive 16) src/qwenpaw/runtime/backends/registry.py:165 — BackendRegistry.describe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · console_turn_state.stamp_console_turn (cognitive 16) · ×1
  • console_turn_state.stamp_console_turn (cognitive 16) src/qwenpaw/runtime/console_turn_state.py:61 — console_turn_state.stamp_console_turn has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), 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.
D2 · Cognitive Complexity · tool_guard._ask_user_approval (cognitive 16) · ×1
  • tool_guard._ask_user_approval (cognitive 16) src/qwenpaw/runtime/tool_guard.py:403 — tool_guard._ask_user_approval has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 2, error handling 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 · GuardRule.__init__ (cognitive 16) · ×1
  • GuardRule.__init__ (cognitive 16) src/qwenpaw/security/tool_guard/guardians/rule_guardian.py:402 — GuardRule.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: error handling 2 (4 pts), if/else 4, ternaries 2 (4 pts), boolean chains 2, loops 2 (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 · shell_evasion_guardian._check_backslash_escaped_operators (cognitive 16) · ×1
  • shell_evasion_guardian._check_backslash_escaped_operators (cognitive 16) src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:272 — shell_evasion_guardian._check_backslash_escaped_operators has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). 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 · shell_evasion_guardian._check_newlines (cognitive 16) · ×1
  • shell_evasion_guardian._check_newlines (cognitive 16) src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:310 — shell_evasion_guardian._check_newlines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session_thinking.get_session_chat (cognitive 16) · ×1
  • session_thinking.get_session_chat (cognitive 16) src/qwenpaw/services/session_thinking.py:271 — session_thinking.get_session_chat has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · workspace_files.read_file_chunk (cognitive 16) · ×1
  • workspace_files.read_file_chunk (cognitive 16) src/qwenpaw/services/workspace_files.py:295 — workspace_files.read_file_chunk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, error handling 1 (2 pts), loops 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 · BinaryManager._download (cognitive 16) · ×1
  • BinaryManager._download (cognitive 16) src/qwenpaw/tunnel/binary_manager.py:129 — BinaryManager._download has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, ternaries 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 · port.get_stable_port (cognitive 16) · ×1
  • port.get_stable_port (cognitive 16) src/qwenpaw/utils/port.py:107 — port.get_stable_port has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (2 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 · ChatExtensionsRegistry.disposeAll (cognitive 16) · ×1
  • ChatExtensionsRegistry.disposeAll (cognitive 16) console/src/plugins/registry/chatExtensions.ts:503 — ChatExtensionsRegistry.disposeAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.extractMemorySearchItems (cognitive 16) · ×1
  • utils.extractMemorySearchItems (cognitive 16) REDACTED:323 — utils.extractMemorySearchItems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultBlock.buildLargeExcerpt (cognitive 16) · ×1
  • DefaultBlock.buildLargeExcerpt (cognitive 16) console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:73 — DefaultBlock.buildLargeExcerpt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rawToolDisplay.formatRawToolValue (cognitive 16) · ×1
  • rawToolDisplay.formatRawToolValue (cognitive 16) console/src/components/Chat/ToolCards/shared/rawToolDisplay.ts:196 — rawToolDisplay.formatRawToolValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.LocalPathTab (cognitive 16) · ×1
  • index.LocalPathTab (cognitive 16) console/src/components/ProjectSelectModal/index.tsx:259 — index.LocalPathTab has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4, boolean chains 2, error handling 2, loops 1 (nesting depth added 3). 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 items inside it that branch (handleImport, handleDrop, handleDirPicked, …). 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 · RestoreModal.RestoreModal (cognitive 16) · ×1
  • RestoreModal.RestoreModal (cognitive 16) console/src/pages/Agent/Checkpoints/RestoreModal.tsx:20 — RestoreModal.RestoreModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 3, ternaries 3, error handling 2. Of this number, 9 points are the body's own statements and 7 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 · useSkills.useSkills.toggleEnabled (cognitive 16) · ×1
  • useSkills.useSkills.toggleEnabled (cognitive 16) console/src/pages/Agent/Skills/useSkills.ts:479 — useSkills.useSkills.toggleEnabled has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent 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 · appDescription.pickAppDescription (cognitive 16) · ×1
  • appDescription.pickAppDescription (cognitive 16) console/src/pages/AppCenter/appDescription.ts:11 — appDescription.pickAppDescription has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chatPayload.applyChatPayloadTransforms (cognitive 16) · ×1
  • chatPayload.applyChatPayloadTransforms (cognitive 16) console/src/pages/Chat/chatPayload.ts:6 — chatPayload.applyChatPayloadTransforms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, loops 2 (3 pts) (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 · useImportJob.useImportJob (cognitive 16) · ×1
  • useImportJob.useImportJob (cognitive 16) console/src/pages/Import/useImportJob.ts:74 — useImportJob.useImportJob has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 4 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 380, 396, 405, …). 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 · RelatedResources.RelatedResources (cognitive 16) · ×1
  • RelatedResources.RelatedResources (cognitive 16) console/src/pages/Market/Community/RelatedResources.tsx:32 — RelatedResources.RelatedResources has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 4, if/else 3, error handling 2. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 44, renderSection, 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 · ProviderConfigModal.JsonCodeEditor (cognitive 16) · ×1
  • ProviderConfigModal.JsonCodeEditor (cognitive 16) console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:129 — ProviderConfigModal.JsonCodeEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (handleKeyDown, handleScroll, a function literal at line 202, …). 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 · ModelConfigEditor.ModelConfigEditor · ×1
  • ModelConfigEditor.ModelConfigEditor::handleSave (cognitive 16) console/src/pages/Settings/Models/components/modals/ModelConfigEditor.tsx:212 — ModelConfigEditor.ModelConfigEditor::handleSave has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 3 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AllowNoAuthHostsTab.AllowNoAuthHostsTab (cognitive 16) · ×1
  • AllowNoAuthHostsTab.AllowNoAuthHostsTab (cognitive 16) console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:22 — AllowNoAuthHostsTab.AllowNoAuthHostsTab has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3, ternaries 3, error handling 1. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 66, a function literal at line 169, a function literal at line 36, …). 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 · RuleTable.RuleTable (cognitive 16) · ×1
  • RuleTable.RuleTable (cognitive 16) console/src/pages/Settings/Security/components/RuleTable.tsx:22 — RuleTable.RuleTable has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, boolean chains 6, loops 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 59, 123, 35). 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 · useSkillPool.useSkillPool.handleAutomationQuickAction (cognitive 16) · ×1
  • useSkillPool.useSkillPool.handleAutomationQuickAction (cognitive 16) console/src/pages/Settings/SkillPool/useSkillPool.tsx:872 — useSkillPool.useSkillPool.handleAutomationQuickAction has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3, boolean chains 1, 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 · StructureArea.BoardItem (cognitive 16) · ×1
  • StructureArea.BoardItem (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/StructureArea.tsx:288 — StructureArea.BoardItem has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 6 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 · useProjectLaunch.useProjectLaunch.handleLaunch (cognitive 16) · ×1
  • useProjectLaunch.useProjectLaunch.handleLaunch (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/components/creator/useProjectLaunch.tsx:625 — useProjectLaunch.useProjectLaunch.handleLaunch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 5, ternaries 5, error handling 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 · TimelineCanvas.TimelineCanvas · ×1
  • TimelineCanvas.TimelineCanvas::performSpanCommit (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:311 — TimelineCanvas.TimelineCanvas::performSpanCommit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 1, 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (TimelineCanvas.TimelineCanvas) 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 · creatorPresentation.humanizeCreatorRefs (cognitive 16) · ×1
  • creatorPresentation.humanizeCreatorRefs (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/lib/creatorPresentation.ts:259 — creatorPresentation.humanizeCreatorRefs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 3). 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 299, 274, 288). 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 · projectJsonPointer.readProjectPointer (cognitive 16) · ×1
  • projectJsonPointer.readProjectPointer (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/lib/projectJsonPointer.ts:26 — projectJsonPointer.readProjectPointer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elementPlaybackSelectors.transitionOpacityAtTick (cognitive 16) · ×1
  • elementPlaybackSelectors.transitionOpacityAtTick (cognitive 16) plugins/apps/qwenpaw-creator/ui/src/selectors/elementPlaybackSelectors.ts:332 — elementPlaybackSelectors.transitionOpacityAtTick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · engine.roleFor (cognitive 16) · ×1
  • engine.roleFor (cognitive 16) src/qwenpaw/browser/control_link/injected/engine.js:102 — engine.roleFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: qwenpaw_desktop::computer_use_server::platform_windows::input console/src-tauri/src/computer_use_server/platform_windows/input.rs:33 — TooManyFunctions — 35 free functions. The bar is 30 free functions; 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.
D32 · Data Compliance (PII/GDPR) · 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
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 42 shared lines) · ×1
  • Near-duplicate member family (6 members, 42 shared lines) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:119 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:119-168 | plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:122-171 | plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:144-193 | plugins/apps/qwenpaw-creator/backend/models/image/ideogram_provider.py:89-138 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:100-149 | plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:175-243 — These 6 members are variants of one another: a block of 42 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 49 shared lines) · ×1
  • Near-duplicate member family (3 members, 49 shared lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2706 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2706-2758 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2944-3021 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3899-3952 — These 3 members are variants of one another: a block of 49 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (140 shared lines) · ×1
  • Near-duplicate member pair (140 shared lines) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:635 — plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:635-813 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:44-233 — These two members are variants of one another: 140 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (85 shared lines) · ×1
  • Near-duplicate member pair (85 shared lines) REDACTED:2042 — REDACTED:2042-2187 | REDACTED:2467-2581 — These two members are variants of one another: 85 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2159 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2159-2223 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2231-2277 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2290-2399 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2416-2587 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4194-4304 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (234 corresponding lines) · ×1
  • Edited copy of a member (234 corresponding lines) plugins/tool/qwen-image/qwen_image_tool.py:250 — plugins/tool/qwen-image/qwen_image_tool.py:250-483 | plugins/tool/qwen-image/qwen_image_tool.py:494-762 — These two members are one piece of code written twice and then edited apart: 234 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (230 corresponding lines) · ×1
  • Edited copy of a member (230 corresponding lines) plugins/tool/gpt-image2/gpt_image2_tool.py:27 — plugins/tool/gpt-image2/gpt_image2_tool.py:27-256 | plugins/tool/gpt-image2/gpt_image2_tool.py:265-554 — These two members are one piece of code written twice and then edited apart: 230 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (284 corresponding lines) · ×1
  • Edited copy of a member (284 corresponding lines) plugins/tool/wan27/wan27_tool.py:400 — plugins/tool/wan27/wan27_tool.py:400-691 | plugins/tool/wan27/wan27_tool.py:704-987 — These two members are one piece of code written twice and then edited apart: 284 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (83 corresponding lines) · ×1
  • Edited copy of a member (83 corresponding lines) plugins/channel/discord/qwenpaw_channel_discord/driver.py:150 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:150-239 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:149-231 — These two members are one piece of code written twice and then edited apart: 83 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 80+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 80+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2461 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2461-2557 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3983-4062 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2293-2382 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 80 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (85 corresponding lines) · ×1
  • Edited copy of a member (85 corresponding lines) plugins/bundle/omp_workflows/autopilot/gate.py:95 — plugins/bundle/omp_workflows/autopilot/gate.py:95-194 | plugins/bundle/omp_workflows/team/gate.py:95-179 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) src/qwenpaw/runtime/commands/control/approval_handler.py:148 — src/qwenpaw/runtime/commands/control/approval_handler.py:148-225 | src/qwenpaw/runtime/commands/control/approval_handler.py:228-297 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 70+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 70+ corresponding lines) src/qwenpaw/app/chats/repo/json_repo.py:77 — src/qwenpaw/app/chats/repo/json_repo.py:77-146 | src/qwenpaw/app/crons/repo/json_repo.py:161-236 | src/qwenpaw/app/crons/repo/json_repo.py:240-333 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 70 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) src/qwenpaw/app/agent_context.py:166 — src/qwenpaw/app/agent_context.py:166-221 | src/qwenpaw/app/agent_context.py:228-293 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) src/qwenpaw/app/routers/skills.py:933 — src/qwenpaw/app/routers/skills.py:933-977 | src/qwenpaw/app/routers/skills.py:981-1032 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 46+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 46+ corresponding lines) plugins/channel/qq/qwenpaw_channel_qq/driver.py:141 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:141-197 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:114-159 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:151-204 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 46 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) src/qwenpaw/cli/channels_cmd.py:138 — src/qwenpaw/cli/channels_cmd.py:138-205 | src/qwenpaw/cli/channels_cmd.py:408-494 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:203 — plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:203-220 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:303-322 | plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py:363-380 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) src/qwenpaw/app/routers/approval.py:90 — src/qwenpaw/app/routers/approval.py:90-165 | src/qwenpaw/app/routers/approval.py:177-241 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×1
  • Edited copy of a member (61 corresponding lines) plugins/bundle/omp_workflows/ultraqa/gate.py:74 — plugins/bundle/omp_workflows/ultraqa/gate.py:74-134 | plugins/bundle/omp_workflows/ultrawork/gate.py:66-135 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (64 corresponding lines) · ×1
  • Edited copy of a member (64 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4790 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4790-4853 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:4862-4935 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) src/qwenpaw/app/approvals/service.py:197 — src/qwenpaw/app/approvals/service.py:197-255 | src/qwenpaw/app/approvals/service.py:271-325 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1477 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1477-1540 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py:1638-1685 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:452 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:452-517 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:322-387 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1556 — plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1556-1630 | plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1637-1710 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 40+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 40+ corresponding lines) src/qwenpaw/app/routers/agents.py:1488 — src/qwenpaw/app/routers/agents.py:1488-1534 | src/qwenpaw/app/routers/agents.py:1547-1590 | src/qwenpaw/app/routers/agents.py:1741-1780 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) src/qwenpaw/utils/command_runner.py:397 — src/qwenpaw/utils/command_runner.py:397-448 | src/qwenpaw/utils/command_runner.py:457-500 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:160 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:160-225 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:121-177 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 31+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 31+ corresponding lines) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2762 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2762-2792 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3030-3069 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3806-3843 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:231 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:231-262 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py:291-331 | plugins/apps/qwenpaw-creator/backend/services/workspace/content_store.py:69-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 37+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 37+ corresponding lines) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:159 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:159-199 | plugins/channel/discord/qwenpaw_channel_discord/driver.py:106-147 | plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:348-386 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:104-146 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:121-157 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:100-139 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:98 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/run_store.py:98-118 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:350-376 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py:763-798 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 43+ corresponding lines) src/qwenpaw/cli/channels_cmd.py:209 — src/qwenpaw/cli/channels_cmd.py:209-251 | src/qwenpaw/cli/channels_cmd.py:255-307 | src/qwenpaw/cli/channels_cmd.py:362-404 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:807 — plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:807-826 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2476-2504 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:1382-1408 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 28+ corresponding lines) plugins/bundle/omp_workflows/autopilot/mode.py:50 — plugins/bundle/omp_workflows/autopilot/mode.py:50-80 | plugins/bundle/omp_workflows/ralph/mode.py:50-77 | plugins/bundle/omp_workflows/team/mode.py:52-84 | plugins/bundle/omp_workflows/ultraqa/mode.py:50-77 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) src/qwenpaw/app/chats/manager.py:436 — src/qwenpaw/app/chats/manager.py:436-454 | src/qwenpaw/app/chats/manager.py:457-473 | src/qwenpaw/app/chats/manager.py:481-501 | src/qwenpaw/app/chats/manager.py:508-559 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3526 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3526-3557 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3691-3714 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4027-4056 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 38+ corresponding lines) src/qwenpaw/plugins/api.py:1944 — src/qwenpaw/plugins/api.py:1944-1996 | src/qwenpaw/plugins/api.py:2049-2086 | src/qwenpaw/plugins/api.py:2095-2142 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 30+ corresponding lines) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:892 — plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:892-923 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:722-751 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:607-636 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:733-762 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) src/qwenpaw/cli/doctor_checks.py:145 — src/qwenpaw/cli/doctor_checks.py:145-159 | src/qwenpaw/cli/doctor_checks.py:447-465 | src/qwenpaw/cli/doctor_checks.py:695-716 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 19+ corresponding lines) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:31 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:31-51 | plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:33-53 | plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:45-66 | plugins/channel/sip/qwenpaw_channel_sip/driver.py:32-51 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/driver.py:37-55 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:33-51 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) src/qwenpaw/agents/skill_system/workspace_service.py:823 — src/qwenpaw/agents/skill_system/workspace_service.py:823-847 | src/qwenpaw/agents/skill_system/workspace_service.py:854-874 | src/qwenpaw/agents/skill_system/workspace_service.py:877-895 | src/qwenpaw/agents/skill_system/workspace_service.py:902-923 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 30+ corresponding lines) src/qwenpaw/plugins/api.py:1307 — src/qwenpaw/plugins/api.py:1307-1336 | src/qwenpaw/plugins/api.py:1344-1384 | src/qwenpaw/plugins/api.py:1392-1442 | src/qwenpaw/plugins/api.py:1451-1489 | src/qwenpaw/plugins/api.py:1565-1597 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) plugins/bundle/cloudpaw/a2a_mode.py:30 — plugins/bundle/cloudpaw/a2a_mode.py:30-39 | REDACTED:105-114 | plugins/bundle/cloudpaw/tools/a2a_config_helper.py:39-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 21+ corresponding lines) src/qwenpaw/plugins/registry.py:544 — src/qwenpaw/plugins/registry.py:544-564 | src/qwenpaw/plugins/registry.py:573-593 | src/qwenpaw/plugins/registry.py:624-651 | src/qwenpaw/plugins/registry.py:669-696 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 12+ corresponding lines) plugins/channel/discord/qwenpaw_channel_discord/driver.py:33 — plugins/channel/discord/qwenpaw_channel_discord/driver.py:33-46 | plugins/channel/qq/qwenpaw_channel_qq/driver.py:40-51 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:30-43 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:31-47 | plugins/channel/wechat/qwenpaw_channel_wechat/driver.py:37-53 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:43-60 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) src/qwenpaw/plugins/workspace_projector.py:531 — src/qwenpaw/plugins/workspace_projector.py:531-539 | src/qwenpaw/plugins/workspace_projector.py:548-557 | src/qwenpaw/plugins/workspace_projector.py:566-574 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) REDACTED:222 — REDACTED:222-226 | scripts/pack/generate_plugin_metadata.py:219-223 | src/qwenpaw/agents/context/scroll/sync.py:200-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) src/qwenpaw/plugins/provision.py:51 — src/qwenpaw/plugins/provision.py:51-52 | src/qwenpaw/plugins/updates.py:57-58 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (163 lines × 2) · ×1
  • Duplicated block (163 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:41 — src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py:41-203 | src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py:41-203 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (156 lines × 2) · ×1
  • Duplicated block (156 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:194 — src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py:194-349 | src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py:194-349 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (118–120 lines × 2) · ×1
  • Duplicated block (118–120 lines × 2) plugins/tool/gpt-image2/gpt_image2_tool.py:137 — plugins/tool/gpt-image2/gpt_image2_tool.py:137-256 | plugins/tool/gpt-image2/gpt_image2_tool.py:437-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/gpt-image2/gpt_image2_tool.py:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (99 lines × 2) · ×1
  • Duplicated block (99 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:415 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:415-513 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:415-513 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (75–80 lines × 2) · ×1
  • Duplicated block (75–80 lines × 2) plugins/tool/wan27/wan27_tool.py:189 — plugins/tool/wan27/wan27_tool.py:189-263 | plugins/tool/wan27/wan27_tool.py:400-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:292 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:292-367 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:292-367 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×1
  • Duplicated block (63 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py:41 — src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py:41-103 | src/qwenpaw/agents/skills/make-skill-zh/scripts/init_draft.py:41-103 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/init_draft.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/init_draft.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) REDACTED:2129 — REDACTED:2129-2187 | REDACTED:2523-2581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (57–59 lines × 2) · ×1
  • Duplicated block (57–59 lines × 2) plugins/tool/wan27/wan27_tool.py:236 — plugins/tool/wan27/wan27_tool.py:236-292 | plugins/tool/wan27/wan27_tool.py:773-831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:773` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/tool/wan27/wan27_tool.py:235` calls `_extract_config` and `plugins/tool/wan27/wan27_tool.py:773` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (48–56 lines × 2) · ×1
  • Duplicated block (48–56 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2679 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2679-2726 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4127-4182 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1338 — plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1338-1393 | plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1741-1796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/project_files/agent_tools.py:1338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) plugins/tool/qwen-image/qwen_image_tool.py:368 — plugins/tool/qwen-image/qwen_image_tool.py:368-461 | plugins/tool/qwen-image/qwen_image_tool.py:647-740 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/qwen-image/qwen_image_tool.py:368` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) plugins/tool/wan27/wan27_tool.py:322 — plugins/tool/wan27/wan27_tool.py:322-376 | plugins/tool/wan27/wan27_tool.py:624-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (53–54 lines × 2) · ×1
  • Duplicated block (53–54 lines × 2) REDACTED:941 — REDACTED:941-993 | REDACTED:1108-1161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (50 lines × 5) · ×1
  • Duplicated block (50 lines × 5) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:119 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:119-168 | plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:122-171 | plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:144-193 | plugins/apps/qwenpaw-creator/backend/models/image/ideogram_provider.py:89-138 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:100-149 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:235 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:235-284 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:235-284 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:737 — plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:737-784 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:156-204 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py` and `plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:737` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) src/qwenpaw/market/providers/modelscope.py:45 — src/qwenpaw/market/providers/modelscope.py:45-93 | src/qwenpaw/market/providers/qwenpaw.py:42-90 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (20–48 lines × 3) · ×1
  • Duplicated block (20–48 lines × 3) plugins/tool/wan27/wan27_tool.py:342 — plugins/tool/wan27/wan27_tool.py:342-387 | plugins/tool/wan27/wan27_tool.py:644-691 | plugins/tool/wan27/wan27_tool.py:968-987 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:968` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) src/qwenpaw/plugins/loader.py:1780 — src/qwenpaw/plugins/loader.py:1780-1827 | src/qwenpaw/plugins/loader.py:5241-5288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:85 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:85-130 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:85-130 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43–45 lines × 2) · ×1
  • Duplicated block (43–45 lines × 2) plugins/apps/qwenpaw-creator/backend/models/tts_model.py:472 — plugins/apps/qwenpaw-creator/backend/models/tts_model.py:472-514 | plugins/apps/qwenpaw-creator/backend/models/tts_model.py:547-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (41–45 lines × 2) · ×1
  • Duplicated block (41–45 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3693 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:3693-3737 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6361-6401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–42 lines × 3) · ×1
  • Duplicated block (13–42 lines × 3) plugins/tool/wan27/wan27_tool.py:338 — plugins/tool/wan27/wan27_tool.py:338-379 | plugins/tool/wan27/wan27_tool.py:640-681 | plugins/tool/wan27/wan27_tool.py:934-946 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/tool/wan27/wan27_tool.py:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (39–41 lines × 2) · ×1
  • Duplicated block (39–41 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:808 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:808-848 | plugins/apps/qwenpaw-creator/backend/services/run_review/feedback.py:110-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:808` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) plugins/tool/gpt-image2/gpt_image2_tool.py:58 — plugins/tool/gpt-image2/gpt_image2_tool.py:58-98 | plugins/tool/gpt-image2/gpt_image2_tool.py:330-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:139 — src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py:139-178 | src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py:139-178 — before extracting anything, compare `src/qwenpaw/agents/skills/make-skill-en/scripts/validate_skill.py` and `src/qwenpaw/agents/skills/make-skill-zh/scripts/validate_skill.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 467 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (38–40 lines × 2) · ×1
  • Duplicated block (38–40 lines × 2) src/qwenpaw/governance/policy.py:801 — src/qwenpaw/governance/policy.py:801-840 | src/qwenpaw/governance/policy.py:843-880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2712 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2712-2749 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3906-3943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2712` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (27–36 lines × 2) · ×1
  • Duplicated block (27–36 lines × 2) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:701 — plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:701-736 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:740-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (35–36 lines × 2) · ×1
  • Duplicated block (35–36 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:681 — plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py:681-716 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py:105-139 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_intelligence.py` and `plugins/apps/qwenpaw-creator/backend/services/source_analysis/codec.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–36 lines × 2) · ×1
  • Duplicated block (28–36 lines × 2) scripts/pack/generate_plugin_metadata.py:613 — scripts/pack/generate_plugin_metadata.py:613-648 | REDACTED:137-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (32–34 lines × 2) · ×1
  • Duplicated block (32–34 lines × 2) plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:898 — plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:898-931 | plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1231-1262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:932` calls `_patch_response_headers` and `plugins/apps/qwenpaw-creator/backend/api/project_file_routes.py:1263` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31–33 lines × 2) · ×1
  • Duplicated block (31–33 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3558 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3558-3590 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4864-4894 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–33 lines × 2) · ×1
  • Duplicated block (20–33 lines × 2) src/qwenpaw/app/agent_context.py:166 — src/qwenpaw/app/agent_context.py:166-185 | src/qwenpaw/app/agent_context.py:228-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–32 lines × 3) · ×1
  • Duplicated block (12–32 lines × 3) plugins/apps/qwenpaw-creator/backend/models/asr_model.py:152 — plugins/apps/qwenpaw-creator/backend/models/asr_model.py:152-180 | plugins/apps/qwenpaw-creator/backend/models/asr_model.py:727-758 | plugins/apps/qwenpaw-creator/backend/models/asr_model.py:1004-1015 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/asr_model.py:1004` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28–32 lines × 3) · ×1
  • Duplicated block (28–32 lines × 3) src/qwenpaw/app/chats/repo/json_repo.py:112 — src/qwenpaw/app/chats/repo/json_repo.py:112-142 | src/qwenpaw/app/crons/repo/json_repo.py:201-232 | src/qwenpaw/app/crons/repo/json_repo.py:302-329 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/chats/repo/json_repo.py:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/app/chats/repo/json_repo.py:142` calls `error` and `src/qwenpaw/app/crons/repo/json_repo.py:233` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:352 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:352-383 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:644-674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/notifications.py:352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29–32 lines × 2) · ×1
  • Duplicated block (29–32 lines × 2) plugins/apps/qwenpaw-creator/backend/services/run_review/objective/media_io.py:106 — plugins/apps/qwenpaw-creator/backend/services/run_review/objective/media_io.py:106-134 | plugins/apps/qwenpaw-creator/backend/services/run_review/objective/media_io.py:155-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (28–32 lines × 2) · ×1
  • Duplicated block (28–32 lines × 2) src/qwenpaw/providers/anthropic_provider.py:380 — src/qwenpaw/providers/anthropic_provider.py:380-407 | src/qwenpaw/providers/openai_provider.py:629-660 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `ProbeResult` names `.multimodal_prober` in one and `qwenpaw.providers.multimodal_prober` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) src/qwenpaw/app/chats/repo/json_repo.py:77 — src/qwenpaw/app/chats/repo/json_repo.py:77-105 | src/qwenpaw/app/crons/repo/json_repo.py:161-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/app/crons/repo/json_repo.py:192` calls `get`, `isinstance` and `src/qwenpaw/app/chats/repo/json_repo.py:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) src/qwenpaw/providers/provider_manager_persistence.py:173 — src/qwenpaw/providers/provider_manager_persistence.py:173-203 | src/qwenpaw/providers/provider_manager_persistence.py:469-499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:280 — plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:280-309 | plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:334-363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py:280` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) src/qwenpaw/app/routers/tools.py:279 — src/qwenpaw/app/routers/tools.py:279-307 | src/qwenpaw/app/routers/tools.py:325-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–29 lines × 2) · ×1
  • Duplicated block (25–29 lines × 2) plugins/apps/qwenpaw-creator/backend/api/file_media_routes.py:350 — plugins/apps/qwenpaw-creator/backend/api/file_media_routes.py:350-378 | plugins/apps/qwenpaw-creator/backend/api/file_media_routes.py:408-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:524 — plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:524-552 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:394-420 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py` and `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:524` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:420` calls `RuntimeError` and `plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:553` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2295 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2295-2321 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2952-2979 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2952` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25–27 lines × 6) · ×1
  • Duplicated block (25–27 lines × 6) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:143 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:143-167 | plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:146-170 | plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:168-192 | plugins/apps/qwenpaw-creator/backend/models/image/ideogram_provider.py:113-137 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:124-148 | plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:208-234 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) src/qwenpaw/app/routers/agents.py:965 — src/qwenpaw/app/routers/agents.py:965-989 | src/qwenpaw/app/routers/agents.py:1159-1185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/routers/agents.py:965` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:897 — plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:897-922 | plugins/apps/qwenpaw-creator/backend/services/media/source_observation.py:726-751 | plugins/apps/qwenpaw-creator/backend/services/media/source_video_reader.py:611-636 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `job` to `SourceMemoryBuildJob` in one and `SourceObservationJob` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (22–26 lines × 3) · ×1
  • Duplicated block (22–26 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3027 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3027-3052 | plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3466-3487 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4800-4824 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3027` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–26 lines × 3) · ×1
  • Duplicated block (25–26 lines × 3) plugins/channel/qq/qwenpaw_channel_qq/driver.py:171 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:171-196 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:134-158 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:179-203 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/telegram/qwenpaw_channel_telegram/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) plugins/apps/agent-kanban/backend/main.py:1029 — plugins/apps/agent-kanban/backend/main.py:1029-1054 | plugins/apps/agent-kanban/backend/main.py:1062-1082 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/agent-kanban/backend/main.py:1029` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–26 lines × 2) · ×1
  • Duplicated block (23–26 lines × 2) plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:366 — plugins/channel/matrix/qwenpaw_channel_matrix/driver.py:366-388 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:561-586 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:561` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21–25 lines × 5) · ×1
  • Duplicated block (21–25 lines × 5) plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:178 — plugins/channel/azure_bot/qwenpaw_channel_azure_bot/driver.py:178-198 | plugins/channel/discord/qwenpaw_channel_discord/driver.py:126-146 | plugins/channel/onebot/qwenpaw_channel_onebot/driver.py:363-385 | plugins/channel/wechat/qwenpaw_channel_wechat/driver.py:144-164 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/driver.py:114-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (22–25 lines × 4) · ×1
  • Duplicated block (22–25 lines × 4) src/qwenpaw/providers/anthropic_provider.py:623 — src/qwenpaw/providers/anthropic_provider.py:623-644 | src/qwenpaw/providers/gemini_provider.py:494-515 | src/qwenpaw/providers/gemini_provider.py:579-600 | src/qwenpaw/providers/openai_provider.py:738-762 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/providers/openai_provider.py:764` calls `_close_client` and `src/qwenpaw/providers/gemini_provider.py:517` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–25 lines × 2) · ×1
  • Duplicated block (14–25 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2535 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2535-2548 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2342-2366 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2535` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–24 lines × 4) · ×1
  • Duplicated block (22–24 lines × 4) src/qwenpaw/app/chats/utils.py:868 — src/qwenpaw/app/chats/utils.py:868-889 | src/qwenpaw/app/chats/utils.py:907-928 | src/qwenpaw/app/chats/utils.py:948-969 | src/qwenpaw/app/chats/utils.py:987-1010 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/chats/utils.py:868` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–24 lines × 3) · ×1
  • Duplicated block (23–24 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2479 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2479-2502 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4004-4026 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2311-2334 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2309` calls `dict` and `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2477` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3044 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3044-3067 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4630-4653 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4816-4839 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3044` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4841` calls `str`, `get` and `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3068` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–24 lines × 2) · ×1
  • Duplicated block (20–24 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2431 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2431-2454 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4127-4146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5509 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5509-5531 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5563-5586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:5509` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–24 lines × 2) · ×1
  • Duplicated block (18–24 lines × 2) src/qwenpaw/providers/openai_provider.py:851 — src/qwenpaw/providers/openai_provider.py:851-874 | src/qwenpaw/providers/openai_response_provider.py:382-399 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/providers/openai_provider.py:851` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–23 lines × 4) · ×1
  • Duplicated block (22–23 lines × 4) plugins/channel/qq/qwenpaw_channel_qq/driver.py:175 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:175-197 | plugins/channel/slack/qwenpaw_channel_slack/driver.py:124-146 | plugins/channel/telegram/qwenpaw_channel_telegram/driver.py:138-159 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:183-204 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/telegram/qwenpaw_channel_telegram/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/qq/qwenpaw_channel_qq/driver.py:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (17–23 lines × 3) · ×1
  • Duplicated block (17–23 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4031 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4031-4047 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4261-4283 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4303-4325 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–23 lines × 2) · ×1
  • Duplicated block (10–23 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2504 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2504-2513 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:2336-2358 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:2504` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) src/qwenpaw/app/agent_context.py:188 — src/qwenpaw/app/agent_context.py:188-210 | src/qwenpaw/app/agent_context.py:263-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/app/agent_context.py:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) src/qwenpaw/app/channels/base.py:933 — src/qwenpaw/app/channels/base.py:933-955 | src/qwenpaw/app/channels/console/channel.py:485-506 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (15–23 lines × 2) · ×1
  • Duplicated block (15–23 lines × 2) src/qwenpaw/governance/detectors.py:761 — src/qwenpaw/governance/detectors.py:761-775 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:417-439 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–22 lines × 5) · ×1
  • Duplicated block (19–22 lines × 5) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2204 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2204-2223 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2259-2277 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2381-2399 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2566-2587 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4261-4280 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–22 lines × 3) · ×1
  • Duplicated block (16–22 lines × 3) plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:642 — plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:642-663 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:698-713 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:736-752 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:642` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:719` calls `_is_gemini_file_uri` and `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:664` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6169 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6169-6190 | plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6210-6229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:6169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) src/qwenpaw/app/routers/pawapps.py:187 — src/qwenpaw/app/routers/pawapps.py:187-208 | src/qwenpaw/app/routers/pawapps.py:280-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3782 — plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3782-3802 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3820-3838 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:3915-3935 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (20 lines × 6) · ×1
  • Duplicated block (20 lines × 6) src/qwenpaw/cli/channels_cmd.py:100 — src/qwenpaw/cli/channels_cmd.py:100-119 | src/qwenpaw/cli/channels_cmd.py:138-157 | src/qwenpaw/cli/channels_cmd.py:209-228 | src/qwenpaw/cli/channels_cmd.py:362-381 | src/qwenpaw/cli/channels_cmd.py:408-427 | src/qwenpaw/cli/channels_cmd.py:597-616 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `current_config` to `IMessageChannelConfig` in one and `DiscordConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) src/qwenpaw/app/routers/agents.py:1497 — src/qwenpaw/app/routers/agents.py:1497-1516 | src/qwenpaw/app/routers/agents.py:1556-1574 | src/qwenpaw/app/routers/agents.py:1857-1876 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:625 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:625-644 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:536-550 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `task` to `Any` in one and `TaskRecord | None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:276 — plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:276-295 | plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/screen_recorder.py:169-187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/live_operation/recorder.py:276` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–20 lines × 2) · ×1
  • Duplicated block (13–20 lines × 2) src/qwenpaw/governance/detectors.py:733 — src/qwenpaw/governance/detectors.py:733-745 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:378-397 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 6) · ×1
  • Duplicated block (17 lines × 6) plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:120 — plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:120-136 | plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py:123-139 | plugins/apps/qwenpaw-creator/backend/models/image/gemini_provider.py:145-161 | plugins/apps/qwenpaw-creator/backend/models/image/ideogram_provider.py:90-106 | plugins/apps/qwenpaw-creator/backend/models/image/minimax_provider.py:101-117 | plugins/apps/qwenpaw-creator/backend/models/image/openai_provider.py:184-200 — before extracting anything, compare `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py` and `plugins/apps/qwenpaw-creator/backend/models/image/bfl_provider.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/image/ark_provider.py:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4826 — plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4826-4840 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5047-5063 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4826` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5045` calls `str`, `get` and `plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4825` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–17 lines × 2) · ×1
  • Duplicated block (10–17 lines × 2) plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:115 — plugins/apps/qwenpaw-creator/backend/services/render_review/review.py:115-131 | plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:77-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 8) · ×1
  • Duplicated block (16 lines × 8) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2233 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2233-2248 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2604-2619 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2708-2723 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2946-2961 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3031-3046 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3808-3823 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3902-3917 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4054-4069 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) plugins/bundle/omp_workflows/autopilot/mode.py:50 — plugins/bundle/omp_workflows/autopilot/mode.py:50-65 | plugins/bundle/omp_workflows/ralph/mode.py:50-65 | plugins/bundle/omp_workflows/team/mode.py:52-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/bundle/omp_workflows/autopilot/mode.py:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:118 — plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:118-130 | plugins/apps/qwenpaw-creator/scripts/build_example_archive.py:229-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–16 lines × 2) · ×1
  • Duplicated block (11–16 lines × 2) src/qwenpaw/governance/detectors.py:563 — src/qwenpaw/governance/detectors.py:563-573 | src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py:119-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 11) · ×1
  • Duplicated block (14–15 lines × 11) src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2236 — src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2236-2249 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2445-2459 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2607-2620 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2711-2724 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2949-2962 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3034-3047 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3811-3824 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3905-3918 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3980-3994 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4057-4070 | src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:4137-4151 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:3995` calls `_get_root` and `src/qwenpaw/agents/tools/deprecated_browser/browser_control.py:2621` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5710 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5710-5724 | plugins/bundle/computer-use/computer_use/dispatch.py:374-388 | src/qwenpaw/cli/cron_cmd.py:926-940 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:5710` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) plugins/channel/qq/qwenpaw_channel_qq/cards/context.py:34 — plugins/channel/qq/qwenpaw_channel_qq/cards/context.py:34-47 | plugins/channel/telegram/qwenpaw_channel_telegram/cards/context.py:34-47 | plugins/channel/wecom/qwenpaw_channel_wecom/cards/context.py:30-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/wecom/qwenpaw_channel_wecom/cards/context.py:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) src/qwenpaw/agents/context/scroll/memoryspace.py:1501 — src/qwenpaw/agents/context/scroll/memoryspace.py:1501-1512 | src/qwenpaw/agents/context/scroll/memoryspace.py:1542-1556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3042 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3042-3054 | plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3477-3489 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4628-4640 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:4814-4826 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3042` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–13 lines × 3) · ×1
  • Duplicated block (10–13 lines × 3) plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:270 — plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:270-282 | plugins/channel/xiaoyi/qwenpaw_channel_xiaoyi/platform.py:62-72 | plugins/channel/yuanbao/qwenpaw_channel_yuanbao/platform.py:110-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/onebot/qwenpaw_channel_onebot/platform.py:270` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:502 — plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:502-514 | plugins/channel/mattermost/qwenpaw_channel_mattermost/driver.py:98-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/dingtalk/qwenpaw_channel_dingtalk/driver.py:502` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1270 — plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1270-1281 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1326-1337 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1351-1362 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1376-1387 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1458-1469 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) plugins/apps/qwenpaw-creator/backend/models/text_model.py:268 — plugins/apps/qwenpaw-creator/backend/models/text_model.py:268-277 | plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:604-615 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/models/vlm_model.py:604` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) src/qwenpaw/cli/doctor_cmd.py:511 — src/qwenpaw/cli/doctor_cmd.py:511-521 | src/qwenpaw/cli/doctor_cmd.py:528-538 | src/qwenpaw/cli/doctor_cmd.py:545-555 | src/qwenpaw/cli/doctor_cmd.py:668-678 | src/qwenpaw/cli/doctor_cmd.py:834-844 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/doctor_cmd.py:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) src/qwenpaw/cli/cron_cmd.py:1000 — src/qwenpaw/cli/cron_cmd.py:1000-1010 | src/qwenpaw/cli/cron_cmd.py:1032-1040 | src/qwenpaw/cli/cron_cmd.py:1062-1070 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323 — plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323-3333 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:4787-4796 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:3323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) plugins/channel/qq/qwenpaw_channel_qq/driver.py:142 — plugins/channel/qq/qwenpaw_channel_qq/driver.py:142-151 | plugins/channel/wecom/qwenpaw_channel_wecom/driver.py:152-159 — before extracting anything, compare `plugins/channel/qq/qwenpaw_channel_qq/driver.py` and `plugins/channel/wecom/qwenpaw_channel_wecom/driver.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/channel/qq/qwenpaw_channel_qq/driver.py:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) src/qwenpaw/config/utils.py:576 — src/qwenpaw/config/utils.py:576-585 | src/qwenpaw/config/utils.py:691-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:97 — plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:97-105 | plugins/apps/qwenpaw-creator/backend/services/render_review/protocol.py:210-218 | plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:282-290 | plugins/apps/qwenpaw-creator/backend/services/run_review/media_review.py:315-323 | plugins/apps/qwenpaw-creator/backend/services/run_review/script_review.py:66-74 | plugins/apps/qwenpaw-creator/backend/services/run_review/text_review.py:205-213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `plugins/apps/qwenpaw-creator/backend/services/render_review/scene_review.py:291` calls `get` and `plugins/apps/qwenpaw-creator/backend/services/render_review/challenge.py:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) src/qwenpaw/cli/doctor_cmd.py:562 — src/qwenpaw/cli/doctor_cmd.py:562-571 | src/qwenpaw/cli/doctor_cmd.py:614-622 | src/qwenpaw/cli/doctor_cmd.py:624-632 | src/qwenpaw/cli/doctor_cmd.py:648-656 | src/qwenpaw/cli/doctor_cmd.py:658-666 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) REDACTED:135 — REDACTED:135-143 | REDACTED:200-208 | REDACTED:241-249 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:133` calls `_structured_dependency_failure` and `REDACTED:240` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×1
  • Duplicated block (6–8 lines × 3) src/qwenpaw/cli/doctor_cmd.py:471 — src/qwenpaw/cli/doctor_cmd.py:471-478 | src/qwenpaw/cli/doctor_cmd.py:710-717 | src/qwenpaw/cli/doctor_cmd.py:788-793 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/cli/doctor_cmd.py:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/cli/doctor_cmd.py:793` calls `_doctor_fix_hint` and `src/qwenpaw/cli/doctor_cmd.py:479` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) src/qwenpaw/market/providers/modelscope.py:100 — src/qwenpaw/market/providers/modelscope.py:100-107 | src/qwenpaw/market/providers/qwenpaw.py:97-103 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) src/qwenpaw/plugins/official_channels.py:279 — src/qwenpaw/plugins/official_channels.py:279-284 | src/qwenpaw/plugins/official_channels.py:416-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src/qwenpaw/market/providers/aliyun.py:261 — src/qwenpaw/market/providers/aliyun.py:261-267 | src/qwenpaw/market/providers/modelscope.py:115-121 | src/qwenpaw/market/providers/qwenpaw.py:109-115 — before extracting anything, compare `src/qwenpaw/market/providers/modelscope.py` and `src/qwenpaw/market/providers/qwenpaw.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `dict[str, Any]` in one and `dict[str, object]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1272 — plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1272-1278 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1328-1334 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1353-1359 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1378-1384 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1460-1466 | plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1506-1512 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) REDACTED:469 — REDACTED:469-474 | src/qwenpaw/app/channels/base.py:2251-2256 | src/qwenpaw/app/channels/console/channel.py:747-752 | src/qwenpaw/app/channels/renderer.py:535-540 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `parts` to `List[OutgoingContentPart]` in one and `List[_OutgoingPart]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/qwenpaw/app/channels/console/channel.py:754` calls `get` and `REDACTED:476` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:783 — plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py:783-787 | plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py:85-89 | plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:570-574 | plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:2436-2440 | plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:487-491 | plugins/apps/qwenpaw-creator/backend/services/media_files/script_execution.py:77-81 | plugins/apps/qwenpaw-creator/backend/services/source_analysis/service.py:204-208 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) console/src-tauri/src/backend_download.rs:89 — console/src-tauri/src/backend_download.rs:89-97 | console/src-tauri/src/external_link.rs:112-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) scripts/cleanup_windows_sandbox.py:564 — scripts/cleanup_windows_sandbox.py:564-633 | scripts/cleanup_windows_sandbox.py:776-826 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) REDACTED:357 — REDACTED:357-397 | REDACTED:401-441 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1155 — src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1155-1180 | REDACTED:2859-2884 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:2917-2942 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (52–53 lines × 2) · ×1
  • Duplicated block (52–53 lines × 2) REDACTED:922 — REDACTED:922-974 | REDACTED:1095-1146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (33 lines × 3) · ×1
  • Duplicated block (33 lines × 3) src/qwenpaw/sandbox/bubblewrap_sandbox.py:237 — src/qwenpaw/sandbox/bubblewrap_sandbox.py:237-269 | REDACTED:772-804 | src/qwenpaw/sandbox/macos_sandbox.py:321-353 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/sandbox/bubblewrap_sandbox.py:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) scripts/cleanup_windows_sandbox.py:205 — scripts/cleanup_windows_sandbox.py:205-227 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1263-1282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1159 — src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1159-1180 | REDACTED:2863-2884 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:2921-2942 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–21 lines × 3) · ×1
  • Duplicated block (16–21 lines × 3) scripts/cleanup_windows_sandbox.py:564 — scripts/cleanup_windows_sandbox.py:564-579 | scripts/cleanup_windows_sandbox.py:644-664 | scripts/cleanup_windows_sandbox.py:776-791 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–16 lines × 3) · ×1
  • Duplicated block (13–16 lines × 3) src/qwenpaw/sandbox/bubblewrap_sandbox.py:222 — src/qwenpaw/sandbox/bubblewrap_sandbox.py:222-234 | REDACTED:754-766 | src/qwenpaw/sandbox/macos_sandbox.py:302-317 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/qwenpaw/sandbox/bubblewrap_sandbox.py:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1268 — src/qwenpaw/sandbox/windows_appcontainer_sandbox.py:1268-1282 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1829-1842 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) REDACTED:1301 — REDACTED:1301-1313 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1209-1221 | src/qwenpaw/sandbox/windows_unelevated_sandbox.py:1557-1569 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
DM10 · One transaction, one aggregate · One operation mutates 2 aggregates · ×1
  • One operation mutates 2 aggregates: ProviderImportService._apply src/qwenpaw/portability/importer.py:144 — `ProviderImportService._apply` saves `AsyncDriverCardStore`, `AsyncCredentialStore` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
DM5 · Encapsulated state · Mutable entity · ×1
  • Mutable entity: AdvisorClient src/qwenpaw/modes/advisor/models.py:125 — `AdvisorClient` exposes publicly writable state (last_usage).
P12 · CI test-gate honesty · Test failure does not fail the CI gate · ×1
  • Test failure does not fail the CI gate REDACTED:437 — `pytest tests/integration -v -n auto --dist=loadscope --timeout=300 -m "${{ steps.marker.outputs.expr }}" || PYTEST_RC=$?` runs the tests, and `|| PYTEST_RC=$?` discards their exit status — a failing suite leaves the check green. Let the test command's failure fail the step (re-raise it after logging).
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking REDACTED:392 — `_ensure_aliyun_cli` is async and calls subprocess.run — a blocking call inside async code stalls the event loop — every other task on it waits for as long as it runs.
R10 · Code Duplication · Duplication concentrated across 13 sibling directories (122 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (122 clone groups) console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33 — 122 duplicated blocks under console/src/pages/ have copies in at least two of the sibling directories Agent, AppCenter, Chat, Coding, CommunityFeedback, Control (+7 more sibling(s) not listed) — 49 of them are reported below, and 73 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 122 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 122 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 122 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 (72 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (72 clone groups) console/src/os/useOsAppMarket.ts:32 — 72 duplicated blocks under console/src/ have copies in at least two of the sibling directories api, components, contexts, features, hooks, layouts (+7 more sibling(s) not listed) — 37 of them are reported below, and 35 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 72 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 72 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 72 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 (61 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (61 clone groups) console/src/pages/Settings/Models/components/modals/CustomProviderModal.tsx:110 — 61 duplicated blocks under the repository root have copies in at least two of the sibling directories console, plugins — 24 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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 (23 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (23 clone groups) console/src/pages/Settings/PluginManager/index.tsx:87 — 23 duplicated blocks under console/src/pages/Settings/ have copies in at least two of the sibling directories AgentStats, Agents, Backups, Environments, Models, PluginManager (+4 more sibling(s) not listed) — 6 of them are reported below, and 17 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 5 sibling directories (21 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (21 clone groups) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371 — 21 duplicated blocks under plugins/apps/qwenpaw-creator/ui/src/ have copies in at least two of the sibling directories components, lib, pages, selectors, store — 12 of them are reported below, and 9 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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 (15 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (15 clone groups) plugins/apps/qwenpaw-creator/ui/src/components/agent/MentionInput.tsx:252 — 15 duplicated blocks under plugins/apps/qwenpaw-creator/ui/src/components/ have copies in at least two of the sibling directories agent, blueprint, common, creator, layout, onboarding (+2 more sibling(s) not listed) — 8 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 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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) console/src/pages/Agent/Skills/index.tsx:100 — 8 duplicated blocks under console/src/pages/Agent/ have copies in at least two of the sibling directories ACP, Checkpoints, MCP, Skills, Tools — 6 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 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 3 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (6 clone groups) plugins/memory/adbpg/frontend/src/index.tsx:134 — 6 duplicated blocks under plugins/memory/ have copies in at least two of the sibling directories adbpg, openviking, powercontext — 4 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 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 · Duplication concentrated across 3 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (5 clone groups) console/src/pages/Control/CronJobs/index.tsx:749 — 5 duplicated blocks under console/src/pages/Control/ have copies in at least two of the sibling directories Channels, CronJobs, Sessions — 2 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (216 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (216 matched lines × 2 locations) console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33 — console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:33 · console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:27 — the two spans are one implementation copied and then locally edited — 1055 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 (169 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (169 matched lines × 2 locations) console/src/pages/Market/Community/Discussion.tsx:299 — console/src/pages/Market/Community/Discussion.tsx:299 · console/src/pages/Market/Community/Discussion.tsx:866 — the two spans are one implementation copied and then locally edited — 938 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (145 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (145 matched lines × 2 locations) console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:14 — console/src/pages/Settings/Security/components/AllowNoAuthHostsTab.tsx:14 · console/src/pages/Settings/Security/components/FileGuardSection.tsx:26 — the two spans are one implementation copied and then locally edited — 870 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 (137 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (137 matched lines × 2 locations) console/src/pages/Settings/Models/components/modals/JsonConfigEditor.tsx:5 — console/src/pages/Settings/Models/components/modals/JsonConfigEditor.tsx:5 · console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:55 — the two spans are one implementation copied and then locally edited — 756 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 (132 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (132 matched lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:123 — plugins/apps/qwenpaw-creator/ui/src/components/creator/HeroComposerCard.tsx:123 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ProjectComposer.tsx:207 — the two spans are one implementation copied and then locally edited — 702 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 (126 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (126 matched lines × 2 locations) console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:440 — console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:440 · console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:583 — the two spans are one implementation copied and then locally edited — 593 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (111 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (111 matched lines × 2 locations) console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:76 — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:76 · console/src/pages/Control/Channels/components/PendingApprovalsDrawer.tsx:76 — the two spans are one implementation copied and then locally edited — 712 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 (100 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (100 matched lines × 2 locations) console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:428 — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:428 · console/src/pages/Inbox/components/MailAccessControlDrawer.tsx:621 — the two spans are one implementation copied and then locally edited — 539 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 (83 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (83 matched lines × 2 locations) console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:127 — console/src/pages/Settings/PluginManager/components/InstalledPluginList.tsx:127 · console/src/pages/Settings/PluginManager/components/OfficialPluginList.tsx:257 — the two spans are one implementation copied and then locally edited — 494 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 (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) console/src/plugins/registry/store.ts:192 — console/src/plugins/registry/store.ts:192 · console/src/plugins/registry/store.ts:552 — the two spans are one implementation copied and then locally edited — 578 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (73 matched lines × 2 locations) console/src/pages/Chat/components/ApprovalLevelToggle.tsx:156 — console/src/pages/Chat/components/ApprovalLevelToggle.tsx:156 · console/src/pages/Chat/components/BackendApprovalToggle.tsx:75 — the two spans are one implementation copied and then locally edited — 391 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 (69 lines × 2 locations) · ×1
  • Duplicated block (69 lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2695 — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2695 · plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:2767 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (67 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (67 matched lines × 2 locations) console/src/os/useOsAppMarket.ts:32 — console/src/os/useOsAppMarket.ts:32 · console/src/pages/Settings/PluginManager/hooks/useMarketPlugins.ts:46 — the two spans are one implementation copied and then locally edited — 423 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 (64 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (64 matched lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371 — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/PreproductionDrawer.tsx:371 · plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoAssetsPage.tsx:185 — the two spans are one implementation copied and then locally edited — 290 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 (62 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (62 matched lines × 2 locations) console/src/pages/Market/Community/Discussion.tsx:740 — console/src/pages/Market/Community/Discussion.tsx:740 · console/src/pages/Market/Community/Discussion.tsx:1022 — the two spans are one implementation copied and then locally edited — 331 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (61 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (61 matched lines × 2 locations) console/src/pages/Agent/Skills/components/PoolTransferModal.tsx:127 — console/src/pages/Agent/Skills/components/PoolTransferModal.tsx:127 · console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:184 — the two spans are one implementation copied and then locally edited — 308 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 (59 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (59 matched lines × 2 locations) console/src/pages/Agent/Skills/useSkillsPage.tsx:680 — console/src/pages/Agent/Skills/useSkillsPage.tsx:680 · console/src/pages/Settings/SkillPool/useSkillPool.tsx:616 — the two spans are one implementation copied and then locally edited — 308 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 (59 identical lines × 2 files) · ×1
  • Wholesale file copy (59 identical lines × 2 files) plugins/apps/qwenpaw-data/scripts/data-console/paw-bridge.js:14 — plugins/apps/qwenpaw-data/scripts/data-console/paw-bridge.js:14 · plugins/apps/qwenpaw-data/ui/public/data-console/paw-bridge.js:14 — these 2 files are line-for-line copies of one another — 59 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 (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:484 — plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:484 · plugins/apps/qwenpaw-creator/ui/src/store/projectSnapshotStore.ts:406 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) console/src/pages/Settings/Agents/components/AgentModal.tsx:253 — console/src/pages/Settings/Agents/components/AgentModal.tsx:253 · console/src/pages/Settings/Agents/components/AgentModal.tsx:325 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:147 — console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:147 · console/src/pages/Settings/SkillPool/components/BroadcastModal.tsx:255 — the two spans are one implementation copied and then locally edited — 289 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×1
  • Duplicated block (48 lines × 2 locations) console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx:19 — console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx:19 · console/src/components/Chat/ToolCards/cards/WriteFileCard.tsx:19 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (47 matched lines × 2 locations) console/src/pages/Agent/MCP/components/MCPAccessClientPanel.tsx:25 — console/src/pages/Agent/MCP/components/MCPAccessClientPanel.tsx:25 · console/src/pages/Agent/MCP/components/MCPAccessToolPanel.tsx:26 — the two spans are one implementation copied and then locally edited — 254 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 (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) console/src/pages/Agent/Skills/index.tsx:38 — console/src/pages/Agent/Skills/index.tsx:38 · console/src/pages/Agent/Skills/useSkillsPage.tsx:900 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) plugins/apps/qwenpaw-creator/ui/src/components/onboarding/AssetsTour.tsx:13 — plugins/apps/qwenpaw-creator/ui/src/components/onboarding/AssetsTour.tsx:13 · plugins/apps/qwenpaw-creator/ui/src/components/onboarding/ProjectTour.tsx:20 — the two spans are one implementation copied and then locally edited — 234 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 175, cognitive 271) · ×1
  • Complex function (anonymous) (cyclomatic 175, cognitive 271) plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1165 — (anonymous) has cyclomatic complexity 175 and cognitive complexity 271; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 WorkbenchSurface (cyclomatic 110, cognitive 98) · ×1
  • Complex function WorkbenchSurface (cyclomatic 110, cognitive 98) plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:284 — WorkbenchSurface has cyclomatic complexity 110 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 buildAgentProgressModel (cyclomatic 90, cognitive 115) · ×1
  • Complex function buildAgentProgressModel (cyclomatic 90, cognitive 115) plugins/apps/qwenpaw-creator/ui/src/lib/agentProgressModel.ts:262 — buildAgentProgressModel has cyclomatic complexity 90 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 AgentDock (cyclomatic 82, cognitive 74) · ×1
  • Complex function AgentDock (cyclomatic 82, cognitive 74) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1136 — AgentDock has cyclomatic complexity 82 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 IssueCard (cyclomatic 70, cognitive 120) · ×1
  • Complex function IssueCard (cyclomatic 70, cognitive 120) REDACTED:248 — IssueCard has cyclomatic complexity 70 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 SessionProjectDirectory (cyclomatic 68, cognitive 64) · ×1
  • Complex function SessionProjectDirectory (cyclomatic 68, cognitive 64) console/src/features/project-directory/SessionProjectDirectory.tsx:114 — SessionProjectDirectory has cyclomatic complexity 68 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 ElementDetail (cyclomatic 66, cognitive 56) · ×1
  • Complex function ElementDetail (cyclomatic 66, cognitive 56) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:322 — ElementDetail has cyclomatic complexity 66 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 deriveAgentLiveStatus (cyclomatic 63, cognitive 61) · ×1
  • Complex function deriveAgentLiveStatus (cyclomatic 63, cognitive 61) plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:400 — deriveAgentLiveStatus has cyclomatic complexity 63 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 fileReviewPresentation (cyclomatic 63, cognitive 60) · ×1
  • Complex function fileReviewPresentation (cyclomatic 63, cognitive 60) plugins/apps/qwenpaw-creator/ui/src/lib/fileProjectReviewPresentation.ts:127 — fileReviewPresentation has cyclomatic complexity 63 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 EmbeddingModelCard (cyclomatic 55, cognitive 51) · ×1
  • Complex function EmbeddingModelCard (cyclomatic 55, cognitive 51) console/src/pages/Agent/Config/components/EmbeddingModelCard.tsx:44 — EmbeddingModelCard has cyclomatic complexity 55 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ChannelDrawer (cyclomatic 55, cognitive 42) · ×1
  • Complex function ChannelDrawer (cyclomatic 55, cognitive 42) console/src/pages/Control/Channels/components/ChannelDrawer.tsx:183 — ChannelDrawer has cyclomatic complexity 55 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ThinkingControl (cyclomatic 54, cognitive 50) · ×1
  • Complex function ThinkingControl (cyclomatic 54, cognitive 50) console/src/features/thinking/ThinkingControl.tsx:15 — ThinkingControl has cyclomatic complexity 54 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 (anonymous) (cyclomatic 53, cognitive 55) · ×1
  • Complex function (anonymous) (cyclomatic 53, cognitive 55) console/src/pages/Chat/index.tsx:3257 — (anonymous) has cyclomatic complexity 53 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FilesDrawer (cyclomatic 53, cognitive 46) · ×1
  • Complex function FilesDrawer (cyclomatic 53, cognitive 46) console/src/features/files-workspace/FilesDrawer.tsx:74 — FilesDrawer has cyclomatic complexity 53 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ToolCallCard (cyclomatic 53, cognitive 44) · ×1
  • Complex function ToolCallCard (cyclomatic 53, cognitive 44) plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:760 — ToolCallCard has cyclomatic complexity 53 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 51, cognitive 49) · ×1
  • Complex function (anonymous) (cyclomatic 51, cognitive 49) console/src/pages/Chat/index.tsx:3583 — (anonymous) has cyclomatic complexity 51 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 PostComposer (cyclomatic 51, cognitive 42) · ×1
  • Complex function PostComposer (cyclomatic 51, cognitive 42) REDACTED:149 — PostComposer has cyclomatic complexity 51 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 actionEnvelopeFromText (cyclomatic 50, cognitive 59) · ×1
  • Complex function actionEnvelopeFromText (cyclomatic 50, cognitive 59) REDACTED:307 — actionEnvelopeFromText has cyclomatic complexity 50 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ChatSenderTabsPanel (cyclomatic 50, cognitive 47) · ×1
  • Complex function ChatSenderTabsPanel (cyclomatic 50, cognitive 47) console/src/pages/Chat/components/ChatSenderTabsPanel.tsx:45 — ChatSenderTabsPanel has cyclomatic complexity 50 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 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 TabbedEditor (cyclomatic 50, cognitive 41) · ×1
  • Complex function TabbedEditor (cyclomatic 50, cognitive 41) console/src/pages/Coding/TabbedEditor.tsx:185 — TabbedEditor has cyclomatic complexity 50 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 49, cognitive 44) · ×1
  • Complex function (anonymous) (cyclomatic 49, cognitive 44) console/src/components/Chat/ToolCards/cards/deprecated/BrowserUseCard.tsx:123 — (anonymous) has cyclomatic complexity 49 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 48, cognitive 62) · ×1
  • Complex function (anonymous) (cyclomatic 48, cognitive 62) REDACTED:1030 — (anonymous) has cyclomatic complexity 48 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 ChatPage (cyclomatic 48, cognitive 42) · ×1
  • Complex function ChatPage (cyclomatic 48, cognitive 42) console/src/pages/Chat/index.tsx:1219 — ChatPage has cyclomatic complexity 48 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 PlanPage (cyclomatic 48, cognitive 42) · ×1
  • Complex function PlanPage (cyclomatic 48, cognitive 42) plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:40 — PlanPage has cyclomatic complexity 48 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 TimelineCanvas (cyclomatic 48, cognitive 39) · ×1
  • Complex function TimelineCanvas (cyclomatic 48, cognitive 39) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:120 — TimelineCanvas has cyclomatic complexity 48 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 47, cognitive 51) · ×1
  • Complex function (anonymous) (cyclomatic 47, cognitive 51) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1683 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 PostAssistance (cyclomatic 46, cognitive 37) · ×1
  • Complex function PostAssistance (cyclomatic 46, cognitive 37) console/src/pages/CommunityFeedback/PostAssistance.tsx:58 — PostAssistance has cyclomatic complexity 46 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 PostDetail (cyclomatic 45, cognitive 40) · ×1
  • Complex function PostDetail (cyclomatic 45, cognitive 40) console/src/pages/Market/Community/PostDetail.tsx:54 — PostDetail has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 renderCard (cyclomatic 45, cognitive 37) · ×1
  • Complex function renderCard (cyclomatic 45, cognitive 37) plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:3142 — renderCard has cyclomatic complexity 45 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 settingsSearchTarget (cyclomatic 44, cognitive 47) · ×1
  • Complex function settingsSearchTarget (cyclomatic 44, cognitive 47) console/src/pages/SettingsCenter/settingsSearch.ts:386 — settingsSearchTarget has cyclomatic complexity 44 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 InboxPage (cyclomatic 44, cognitive 42) · ×1
  • Complex function InboxPage (cyclomatic 44, cognitive 42) console/src/pages/Inbox/index.tsx:161 — InboxPage has cyclomatic complexity 44 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ImportWorkflow (cyclomatic 44, cognitive 37) · ×1
  • Complex function ImportWorkflow (cyclomatic 44, cognitive 37) console/src/pages/Import/index.tsx:189 — ImportWorkflow has cyclomatic complexity 44 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 BackgroundTaskPanel (cyclomatic 43, cognitive 41) · ×1
  • Complex function BackgroundTaskPanel (cyclomatic 43, cognitive 41) console/src/pages/Chat/components/BackgroundTaskPanel.tsx:61 — BackgroundTaskPanel has cyclomatic complexity 43 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function extractMediaFromBlocks (cyclomatic 41, cognitive 44) · ×1
  • Complex function extractMediaFromBlocks (cyclomatic 41, cognitive 44) console/src/components/Chat/ToolCards/cards/RunToolBatchCard.tsx:222 — extractMediaFromBlocks has cyclomatic complexity 41 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ExecutionAuthorizationCard (cyclomatic 40, cognitive 27) · ×1
  • Complex function ExecutionAuthorizationCard (cyclomatic 40, cognitive 27) plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:292 — ExecutionAuthorizationCard has cyclomatic complexity 40 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 (anonymous) (cyclomatic 39, cognitive 48) · ×1
  • Complex function (anonymous) (cyclomatic 39, cognitive 48) console/src/pages/Chat/index.tsx:409 — (anonymous) has cyclomatic complexity 39 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 47) · ×1
  • Complex function (anonymous) (cyclomatic 39, cognitive 47) console/src/pages/Chat/index.tsx:1570 — (anonymous) has cyclomatic complexity 39 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 SessionItem (cyclomatic 39, cognitive 36) · ×1
  • Complex function SessionItem (cyclomatic 39, cognitive 36) console/src/components/SessionItem/index.tsx:69 — SessionItem 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 ToolCardShell (cyclomatic 39, cognitive 33) · ×1
  • Complex function ToolCardShell (cyclomatic 39, cognitive 33) console/src/components/Chat/ToolCards/shared/ToolCardShell.tsx:61 — ToolCardShell has cyclomatic complexity 39 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function AppBrand (cyclomatic 39, cognitive 33) · ×1
  • Complex function AppBrand (cyclomatic 39, cognitive 33) console/src/layouts/AppBrand.tsx:68 — AppBrand has cyclomatic complexity 39 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx: 4799 lines of code plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx has 4799 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 · console/src/pages/Chat/index.tsx · ×1
  • console/src/pages/Chat/index.tsx: 4623 lines of code console/src/pages/Chat/index.tsx:1 — console/src/pages/Chat/index.tsx has 4623 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 · plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx: 2702 lines of code plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx has 2702 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 · plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx: 2549 lines of code plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx has 2549 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 · console/src/pages/Control/Channels/components/ChannelDrawer.tsx · ×1
  • console/src/pages/Control/Channels/components/ChannelDrawer.tsx: 2409 lines of code console/src/pages/Control/Channels/components/ChannelDrawer.tsx:1 — console/src/pages/Control/Channels/components/ChannelDrawer.tsx has 2409 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 · plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx: 2289 lines of code plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/pages/R2VWorkbenchPage.tsx has 2289 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 · plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts: 2271 lines of code plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts:1 — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/demoData.ts has 2271 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 · console/src/pages/Hub/index.tsx · ×1
  • console/src/pages/Hub/index.tsx: 2083 lines of code console/src/pages/Hub/index.tsx:1 — console/src/pages/Hub/index.tsx has 2083 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 · console/src/os/useOsStyles.ts · ×1
  • console/src/os/useOsStyles.ts: 2053 lines of code console/src/os/useOsStyles.ts:1 — console/src/os/useOsStyles.ts has 2053 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 · console/src/pages/Chat/sessionApi/index.ts · ×1
  • console/src/pages/Chat/sessionApi/index.ts: 1847 lines of code console/src/pages/Chat/sessionApi/index.ts:1 — console/src/pages/Chat/sessionApi/index.ts has 1847 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 · plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts · ×1
  • plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts: 1780 lines of code plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts:1 — plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.ts has 1780 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 · plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx: 1573 lines of code plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx has 1573 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: 1544 lines of code REDACTED:1 — REDACTED has 1544 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 · console/src/pages/Agent/Config/components/AgentLoopCard.tsx · ×1
  • console/src/pages/Agent/Config/components/AgentLoopCard.tsx: 1531 lines of code console/src/pages/Agent/Config/components/AgentLoopCard.tsx:1 — console/src/pages/Agent/Config/components/AgentLoopCard.tsx has 1531 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 · console/src/features/files-workspace/FilesNavigator.tsx · ×1
  • console/src/features/files-workspace/FilesNavigator.tsx: 1464 lines of code console/src/features/files-workspace/FilesNavigator.tsx:1 — console/src/features/files-workspace/FilesNavigator.tsx has 1464 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 · console/src/pages/Coding/TabbedEditor.tsx · ×1
  • console/src/pages/Coding/TabbedEditor.tsx: 1427 lines of code console/src/pages/Coding/TabbedEditor.tsx:1 — console/src/pages/Coding/TabbedEditor.tsx has 1427 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 · plugins/bundle/chrome/frontend/src/index.tsx · ×1
  • plugins/bundle/chrome/frontend/src/index.tsx: 1384 lines of code plugins/bundle/chrome/frontend/src/index.tsx:1 — plugins/bundle/chrome/frontend/src/index.tsx has 1384 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 · console/src/pages/Chat/ModelSelector/index.tsx · ×1
  • console/src/pages/Chat/ModelSelector/index.tsx: 1356 lines of code console/src/pages/Chat/ModelSelector/index.tsx:1 — console/src/pages/Chat/ModelSelector/index.tsx has 1356 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 · console/src/features/project-directory/SessionProjectDirectory.tsx · ×1
  • console/src/features/project-directory/SessionProjectDirectory.tsx: 1348 lines of code console/src/features/project-directory/SessionProjectDirectory.tsx:1 — console/src/features/project-directory/SessionProjectDirectory.tsx has 1348 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 · console/src/pages/Settings/SkillPool/useSkillPool.tsx · ×1
  • console/src/pages/Settings/SkillPool/useSkillPool.tsx: 1341 lines of code console/src/pages/Settings/SkillPool/useSkillPool.tsx:1 — console/src/pages/Settings/SkillPool/useSkillPool.tsx has 1341 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: 1311 lines of code REDACTED:1 — REDACTED has 1311 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 · plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx: 1311 lines of code plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.tsx has 1311 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: 1296 lines of code REDACTED:1 — REDACTED has 1296 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 · plugins/bundle/chrome/assets/extensions/chrome/service_worker.js · ×1
  • plugins/bundle/chrome/assets/extensions/chrome/service_worker.js: 1254 lines of code plugins/bundle/chrome/assets/extensions/chrome/service_worker.js:1 — plugins/bundle/chrome/assets/extensions/chrome/service_worker.js has 1254 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 · console/src/pages/Market/Community/Discussion.tsx · ×1
  • console/src/pages/Market/Community/Discussion.tsx: 1236 lines of code console/src/pages/Market/Community/Discussion.tsx:1 — console/src/pages/Market/Community/Discussion.tsx has 1236 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 · console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx · ×1
  • console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx: 1204 lines of code console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:1 — console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx has 1204 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 · console/src/pages/Inbox/index.tsx · ×1
  • console/src/pages/Inbox/index.tsx: 1190 lines of code console/src/pages/Inbox/index.tsx:1 — console/src/pages/Inbox/index.tsx has 1190 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 · console/src/layouts/Sidebar.tsx · ×1
  • console/src/layouts/Sidebar.tsx: 1185 lines of code console/src/layouts/Sidebar.tsx:1 — console/src/layouts/Sidebar.tsx has 1185 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: 1175 lines of code REDACTED:1 — REDACTED has 1175 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 · console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx · ×1
  • console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx: 1071 lines of code console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx:1 — console/src/pages/Agent/Config/components/ReMeLightMemoryCard.tsx has 1071 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 · console/src/pages/Control/CronJobs/index.tsx · ×1
  • console/src/pages/Control/CronJobs/index.tsx: 1060 lines of code console/src/pages/Control/CronJobs/index.tsx:1 — console/src/pages/Control/CronJobs/index.tsx has 1060 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 · console/src/pages/Import/index.tsx · ×1
  • console/src/pages/Import/index.tsx: 1023 lines of code console/src/pages/Import/index.tsx:1 — console/src/pages/Import/index.tsx has 1023 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: 1022 lines of code REDACTED:1 — REDACTED has 1022 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 · plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx: 1016 lines of code plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx has 1016 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 · console/src/pages/SettingsCenter/index.tsx · ×1
  • console/src/pages/SettingsCenter/index.tsx: 1003 lines of code console/src/pages/SettingsCenter/index.tsx:1 — console/src/pages/SettingsCenter/index.tsx has 1003 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 · console/src/pages/Control/CronJobs/components/JobDrawer.tsx · ×1
  • console/src/pages/Control/CronJobs/components/JobDrawer.tsx: 987 lines of code console/src/pages/Control/CronJobs/components/JobDrawer.tsx:1 — console/src/pages/Control/CronJobs/components/JobDrawer.tsx has 987 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 · console/src/layouts/SidebarSessionList.tsx · ×1
  • console/src/layouts/SidebarSessionList.tsx: 978 lines of code console/src/layouts/SidebarSessionList.tsx:1 — console/src/layouts/SidebarSessionList.tsx has 978 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 · plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx: 973 lines of code plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · console/src/pages/CommunityFeedback/PostAssistance.tsx · ×1
  • console/src/pages/CommunityFeedback/PostAssistance.tsx: 925 lines of code console/src/pages/CommunityFeedback/PostAssistance.tsx:1 — console/src/pages/CommunityFeedback/PostAssistance.tsx has 925 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 · plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx · ×1
  • plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx: 914 lines of code plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx:1 — plugins/apps/qwenpaw-creator/ui/src/pages/PlanPage.tsx has 914 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R5 · Dependency Freshness · Dependency Freshness · ×1
  • Dependency Freshness — 55 outdated package(s); JS/npm CVEs scored in D30
R7 · Dead Code · Dead file (~262 LoC) · ×1
  • Dead file (~262 LoC) plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementList.tsx — no import path from any entry point (299 application, 39 tooling, 775 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 (~257 LoC) · ×1
  • Dead file (~257 LoC) plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineSwitcher.tsx — no import path from any entry point (299 application, 39 tooling, 775 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 (~192 LoC) · ×1
  • Dead file (~192 LoC) plugins/apps/qwenpaw-creator/ui/src/selectors/visualVariantCoverage.ts — no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/apps/qwenpaw-creator/ui/src/components/creator/VisualCoverageCheckpoint.tsx) — 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 (~136 LoC) · ×1
  • Dead file (~136 LoC) plugins/apps/qwenpaw-creator/ui/src/components/creator/VisualCoverageCheckpoint.tsx — no import path from any entry point (299 application, 39 tooling, 775 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 (~130 LoC) · ×1
  • Dead file (~130 LoC) console/src/pages/Settings/Environments/components/EnvRow.tsx — no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (console/src/pages/Settings/Environments/components/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 (~125 LoC) · ×1
  • Dead file (~125 LoC) plugins/apps/qwenpaw-creator/ui/src/components/KeyboardShortcutsPanel.tsx — no import path from any entry point (299 application, 39 tooling, 775 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) console/src/pages/Settings/Environments/components/Toolbar.tsx — no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (console/src/pages/Settings/Environments/components/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 (~43 LoC) · ×1
  • Dead file (~43 LoC) plugins/apps/qwenpaw-creator/ui/src/components/EmptyState.tsx — no import path from any entry point (299 application, 39 tooling, 775 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 (~25 LoC) · ×1
  • Dead file (~25 LoC) console/src/pages/Settings/Environments/components/AddButton.tsx — no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (console/src/pages/Settings/Environments/components/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 (~20 LoC) · ×1
  • Dead file (~20 LoC) console/src/pages/Settings/Environments/components/EmptyState.tsx — no import path from any entry point (299 application, 39 tooling, 775 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (console/src/pages/Settings/Environments/components/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 (~7 LoC) · ×1
  • Dead file (~7 LoC) plugins/apps/qwenpaw-creator/ui/src/lib/assetReferences.ts — no import path from any entry point (299 application, 39 tooling, 775 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 (~6 LoC) · ×1
  • Dead file (~6 LoC) plugins/apps/qwenpaw-creator/ui/src/lib/mediaUrl.ts — no import path from any entry point (299 application, 39 tooling, 775 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 (~4 LoC) · ×1
  • Dead file (~4 LoC) console/src/pages/Settings/Environments/components/index.ts — no import path from any entry point (299 application, 39 tooling, 775 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
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity scripts/startup_profile/viewer.html:7 — `https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.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.
X19 · Unrestored process-global state · Process-global state is restored only on the happy path · ×1
  • Process-global state is restored only on the happy path REDACTED:392 — `ensure_ffprobe` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CREATOR_FFPROBE_PATH_ENV` environment variable (set at line 395, cleared at line 403) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
X25 · Inert configuration knob · Option is kept and never read · ×1
  • Option is kept and never read plugins/apps/qwenpaw-creator/ui/src/selectors/elementPlaybackSelectors.ts:234 — `resolveElementPlayback` accepts `timeline.ticks_per_second` from the caller and keeps it in `ticksPerSecond` on line 234, where only it can read the value — but nothing ever reads `ticksPerSecond`. Setting `timeline.ticks_per_second` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `ticksPerSecond` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `timeline.ticks_per_second` from the accepted options so callers stop setting a knob that does nothing.
Minor — 476 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×123
  • Orphaned file src/qwenpaw/checkpoints/policy.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/local_models/download_manager.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/security/skill_scanner/scan_policy.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/browser/sdk/facade.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/checkpoints/repository.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file plugins/channel/onebot/qwenpaw_channel_onebot/media.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/agents/skills/pptx-en/scripts/office/validators/docx.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/agents/skills/docx-zh/scripts/office/validators/docx.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/agents/skills/docx-en/scripts/office/validators/docx.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/runtime/commands/control/checkpoint_handler.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file plugins/bundle/chrome/assets/scripts/nm_host.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/drivers/storage.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/checkpoints/safe_workspace_fs.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/browser/control_link/cdp_tree.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/security/skill_scanner/__init__.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/security/skill_scanner/analyzers/pattern_analyzer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/browser/control_link/chrome/observe.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/browser/runtime/engine.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file plugins/bundle/chrome/frontend/src/locale.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/drivers/credentials/providers.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/checkpoints/runtime.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/drivers/contracts.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/agents/skills/docx-en/scripts/comment.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/browser/sdk/contracts.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/qwenpaw/checkpoints/render.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 98 more in this group — see findings.md.
D10 · Test Quality · Mock-dominated test · ×81
  • Mock-dominated test: shows the snapshot conflict and refreshes instead of a generic failure plugins/apps/qwenpaw-creator/ui/src/components/agent/__tests__/ExecutionAuthorizationCard.test.tsx:395 — This test sets up 5 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the Tauri command from backend-hosted Tauri consoles console/src/utils/openExternalLink.test.ts:159 — 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: does not crash when the native opener rejects console/src/utils/openHtmlFile.test.ts:131 — 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: routes the cancel click to the job canceller while a download runs console/src/pages/Settings/SkillPool/components/BroadcastModal.test.tsx:58 — 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: handleSave silently returns on validation errorFields without api call or message.error console/src/pages/Settings/Security/useSecurityPage.test.ts:212 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: handleSave calls message.error on other errors console/src/pages/Settings/Security/useSecurityPage.test.ts:229 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: handleSave skips updateSandbox when sandbox value unchanged console/src/pages/Settings/Security/useSecurityPage.test.ts:279 — This test sets up 4 test doubles (for example `a double assigned in a shared setup`) 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: handleSave does not call updateToolGuard when sandbox save fails console/src/pages/Settings/Security/useSecurityPage.test.ts:302 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: reports a drop failure when reading the folder throws console/src/pages/Settings/PluginManager/hooks/useInstallModal.test.ts:243 — This test sets up 4 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: opens plugin details through the shared external-link guard console/src/pages/Settings/PluginManager/components/MarketPluginList.test.tsx:121 — 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: does not open unsupported plugin details URL schemes console/src/pages/Settings/PluginManager/components/MarketPluginList.test.tsx:136 — 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: creates a provider with its connection configuration console/src/pages/Settings/Models/components/modals/CustomProviderModal.test.tsx:93 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: saves after a successful connection check console/src/pages/Settings/Models/components/modals/ProviderConfigModal.test.tsx:270 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: retains the authorization popup so explicit cancellation closes it console/src/pages/Settings/Community/index.test.tsx:269 — This test sets up 4 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: hands the new target over after the dialog is re-opened with a different backup console/src/pages/Settings/Backups/restore/PreRestoreConfirmModal.test.tsx:321 — 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: builds a full-mode request with every agent and scope flag console/src/pages/Settings/Backups/restore/RestoreBackupModal.test.tsx:267 — This test sets up 4 test doubles (for example `a double assigned in a shared setup`) 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 re-seed the form when the close transition is reported console/src/pages/Settings/Backups/create/CreateBackupModal.coverage.test.tsx:455 — This test sets up 7 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 the latest action callback after a parent rerender console/src/pages/Settings/Agents/components/AgentGallery.test.tsx:88 — This test sets up 7 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: reports the row id and the new checked state on toggle console/src/pages/Inbox/components/PushMessageCard.test.tsx:364 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: opens the message when the card body is clicked console/src/pages/Inbox/components/PushMessageCard.test.tsx:377 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: deletes the message on confirm without opening it console/src/pages/Inbox/components/PushMessageCard.test.tsx:399 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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 the message on cancel without opening it console/src/pages/Inbox/components/PushMessageCard.test.tsx:408 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) 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: does not report anything before the user types console/src/pages/Control/Sessions/components/FilterBar.test.tsx:245 — 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: submits through the form instance rather than calling onSubmit directly console/src/pages/Control/Sessions/components/SessionDrawer.test.tsx:299 — 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: still submits while saving, because the product does not guard the click console/src/pages/Control/Sessions/components/SessionDrawer.test.tsx:373 — 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.
  • + 56 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelBadges.tsx:83 — `!!config.grounding.tavily_api_key || !!config.grounding.serper_api_key || nativeSearchReady` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelBadges.tsx, plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.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 console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx:45 — `!content.status?.startsWith("call") && lineCount > 0` appears character-identically in 2 files — console/src/components/Chat/ToolCards/cards/AppendFileCard.tsx, console/src/components/Chat/ToolCards/cards/WriteFileCard.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 plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts:158 — `!controller || (projectId && controller.projectId !== projectId)` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/store/fileProjectReviewStore.ts, plugins/apps/qwenpaw-creator/ui/src/store/projectSnapshotStore.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 plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx:537 — `!current || current.pointerId !== event.pointerId` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineCanvas.tsx, plugins/apps/qwenpaw-creator/ui/src/components/timeline/TimelineTracks.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 console/src/os/useElementWidth.ts:14 — `!el || typeof ResizeObserver === "undefined"` appears character-identically in 2 files — console/src/os/useElementWidth.ts, console/src/pages/Chat/components/BackgroundTaskPanel.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 console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:113 — `!ensureCanMutate() || actionTokensRef.current.has(key)` appears character-identically in 2 files — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx, console/src/pages/Control/Channels/components/PendingApprovalsDrawer.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 console/src/os/AppStore.tsx:483 — `!isInstalled && installingId === entry.id` appears character-identically in 2 files — console/src/os/AppStore.tsx, console/src/pages/AppCenter/AppMarket.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 console/src/os/AppStore.tsx:48 — `!locales || Object.keys(locales).length === 0` appears character-identically in 3 files — console/src/os/AppStore.tsx, console/src/pages/AppCenter/AppMarket.tsx, console/src/pages/Settings/PluginManager/components/MarketPluginList.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 console/src/pages/Chat/index.tsx:731 — `!metadata || typeof metadata !== "object"` appears character-identically in 2 files — console/src/pages/Chat/index.tsx, console/src/utils/clientMessageId.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 console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:140 — `!ownerAgentId || !canMutate(ownerAgentId)` appears character-identically in 2 files — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx, console/src/pages/Control/Channels/components/PendingApprovalsDrawer.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 console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx:207 — `!parsed || typeof parsed !== "object" || Array.isArray(parsed)` appears character-identically in 2 files — console/src/pages/Settings/Models/components/modals/LocalModelManageModal.tsx, console/src/pages/Settings/Models/components/modals/ProviderConfigModal.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 plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx:133 — `!raw || typeof raw !== "object" || Array.isArray(raw)` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/agent/ExecutionAuthorizationCard.tsx, website/src/lib/parseBlogMarkdown.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 console/src/features/files-workspace/ResponseArtifactList.tsx:164 — `!segment || segment === "." || segment === ".."` appears character-identically in 2 files — console/src/features/files-workspace/ResponseArtifactList.tsx, console/src/features/files-workspace/internalFileLinks.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 console/src/os/MissionControl.tsx:73 — `!selected || isAgentAvailableInChat(selected)` appears character-identically in 2 files — console/src/os/MissionControl.tsx, console/src/os/SpacesPanel.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 plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx:285 — `(artifact.file_id && project.assets.files_by_id[artifact.file_id]?.media_type) || ""` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/timeline/ElementDetail.tsx, plugins/apps/qwenpaw-creator/ui/src/components/workbench/referenceThumbs.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 plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoAssetsPage.tsx:38 — `(query.get("sc") as ScenarioKey) || "drama"` appears character-identically in 3 files — plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoAssetsPage.tsx, plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoPage.tsx, plugins/apps/qwenpaw-creator/ui/src/pages/BlueprintDemoPlanPage.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 console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx:34 — `(trimmed.startsWith("{") && trimmed.endsWith("}")) || (trimmed.startsWith("[") && trimmed.endsWith("]"))` appears character-identically in 2 files — console/src/components/Chat/ToolCards/shared/DefaultBlock.tsx, console/src/components/Chat/ToolCards/shared/rawToolDisplay.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 plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts:160 — `Boolean(value) && typeof value === "object" && !Array.isArray(value)` appears character-identically in 3 files — plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.ts, REDACTED, plugins/apps/qwenpaw-creator/ui/src/store/creatorSessionStore.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 console/src/pages/Control/Channels/components/AccessControlDrawer.tsx:124 — `action.ownerAgentId !== null && action.ownerAgentId === ownerAgentId && actionTokensRef.current.get(action.key) === action.token && canMutat…` appears character-identically in 2 files — console/src/pages/Control/Channels/components/AccessControlDrawer.tsx, console/src/pages/Control/Channels/components/PendingApprovalsDrawer.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 plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:2488 — `activity.roleDisplayName || creatorRoleLabel(activity.role)` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx, plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.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 plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx:780 — `activity.terminalKind === "SUCCESS" || activity.status === "SUCCEEDED"` appears character-identically in 2 files — plugins/apps/qwenpaw-creator/ui/src/components/agent/AgentDock.tsx, plugins/apps/qwenpaw-creator/ui/src/lib/agentLiveStatus.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 console/src/layouts/Sidebar.tsx:217 — `agent.enabled && isAgentAvailableInChat(agent)` appears character-identically in 2 files — console/src/layouts/Sidebar.tsx, console/src/pages/SettingsCenter/SettingsAgentSelector.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 console/src/components/AgentSelector/index.tsx:216 — `agent.startup_status === "pending" || agent.startup_status === "starting"` appears character-identically in 2 files — console/src/components/AgentSelector/index.tsx, console/src/hooks/useAgentStatusPolling.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 console/src/notifications/browserApprovals.ts:142 — `approval.tool_display_name || approval.tool_name` appears character-identically in 2 files — console/src/notifications/browserApprovals.ts, console/src/pages/Inbox/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 console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx:345 — `canEditBaseUrl && baseUrlOptions.length > 0` appears character-identically in 2 files — console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx, console/src/pages/Settings/Models/components/modals/ProviderConnectionFields.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.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging src/qwenpaw/tool_calls/_coordinator.py:784 — `warning` at line 784 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/builder.py:1059 — `warning` at line 1059 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:114 — `warning` at line 114 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:121 — `debug` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:151 — `warning` at line 151 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:161 — `info` at line 161 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:293 — `info` at line 293 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/__init__.py:306 — `exception` at line 306 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/model_handler.py:342 — `exception` at line 342 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/model_handler.py:348 — `info` at line 348 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/model_handler.py:399 — `exception` at line 399 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/model_handler.py:405 — `info` at line 405 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/stop_handler.py:46 — `info` at line 46 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/stop_handler.py:65 — `warning` at line 65 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/stop_handler.py:84 — `info` at line 84 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/runtime/commands/control/stop_handler.py:99 — `warning` at line 99 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/plugin_provider_registry.py:43 — `warning` at line 43 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/plugin_provider_registry.py:50 — `info` at line 50 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/provider_manager_discovery.py:394 — `warning` at line 394 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/provider_manager_persistence.py:551 — `warning` at line 551 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/provider_manager_persistence.py:607 — `warning` at line 607 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/provider_manager_persistence.py:752 — `warning` at line 752 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/provider_manager_persistence.py:1203 — `warning` at line 1203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/retry_chat_model.py:90 — `warning` at line 90 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging src/qwenpaw/providers/retry_chat_model.py:509 — `warning` at line 509 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×21
  • Silent fallback default on parse failure plugins/apps/qwenpaw-creator/backend/api/example_routes.py:101 — `_load_manifest` returns `[]` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1916 — `_operator_written_base_url` returns `''` when `(CreatorDataRootError, ValidationError, OSError, TimeoutError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1972 — `_normalized_origin` returns `''` when `(httpx.InvalidURL, ValueError, UnicodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/api/model_routes.py:1990 — `_origin_scheme_text` returns `''` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/models/video_model.py:1393 — `visit` (in `_extract_failed_task`) returns `False` when `(ValueError, TypeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:666 — `_json_mapping` returns `{}` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py:3604 — `_json_mapping` returns `{}` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:255 — `_provider_trusted_private_origins` returns `frozenset()` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/run_review/admission.py:211 — `media_skip_reason` returns `'unknown'` when `(AttributeError, TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/runtime_files/locking.py:183 — `_caller_metadata` returns `{}` when `(ValueError, AttributeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/adapters.py:348 — `_dashscope_web_search_image_items` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-creator/e2e/utils/ffprobe.py:37 — `probe_duration_seconds` returns `0.0` when `(KeyError, ValueError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/apps/qwenpaw-data/backend/bridge/middleware.py:395 — `_sequence_number` returns `-1` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/bundle/computer-use/computer_use/access.py:146 — `_load_persistent` returns `{}` when `(OSError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/channel/azure_bot/qwenpaw_channel_azure_bot/attachments.py:82 — `attachment_uses_token` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/channel/feishu/qwenpaw_channel_feishu/utils.py:261 — `_extract_post_keys` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/channel/qq/qwenpaw_channel_qq/platform.py:726 — `_handle_approval` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure plugins/memory/powercontext/backend/manager.py:100 — `_legacy_installation_id` returns `''` when `(FileNotFoundError, OSError, ValueError, TypeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure src/qwenpaw/agents/context/scroll/recall_tool.py:358 — `_parse_row_blocks` returns `[]` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure src/qwenpaw/agents/skills/docx-en/scripts/office/helpers/simplify_redlines.py:133 — `get_tracked_change_authors` returns `{}` when `ET.ParseError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 on parse failure src/qwenpaw/agents/skills/docx-en/scripts/office/helpers/simplify_redlines.py:168 — `_get_authors_from_docx` returns `{}` when `(zipfile.BadZipFile, ET.ParseError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
D29 · Static Analysis (SAST) · REDACTED · ×20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×18
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/local_models/tag_parser.py:31 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/local_models/tag_parser.py:37 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/local_models/tag_parser.py:47 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/local_models/tag_parser.py:51 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/local_models/tag_parser.py:60 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/qwenpaw/agents/tools/web_search.py:102 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/bundle/chrome/assets/scripts/nm_host.py:56 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/chunk-EX3LRPZG-CS8Y4rFz.js:1 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/index-C81pMcLx.js:2 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/index-C81pMcLx.js:4 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/index-CE5tjohG.js:2 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/index-CE5tjohG.js:29 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex plugins/apps/qwenpaw-data/ui/public/data-console/assets/xychartDiagram-FW5EYKEG-BHEIwSWI.js:1 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:262 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:369 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:281 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:402 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:422 — 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×15
  • Silent fallback default in catch e2e/pages/channels_page.py:332 — `get_drawer_title` 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 e2e/utils/report_generator.py:76 — `_calc_total_duration` swallows every exception into `return 0.0` — 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 plugins/apps/qwenpaw-creator/backend/services/media/source_memory.py:1674 — `_list_project_ids` 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 plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py:1647 — `_accepted_provider_task_hint` 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 plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py:5349 — `_accepted_provider_tasks_note` 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 plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/config.py:45 — `dashscope_base_url` swallows every exception into `return 'https://dashscope.aliyuncs.com/compatible-mode/v1'` — 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 plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/config.py:55 — `dashscope_model` swallows every exception into `return 'qwen3.7-plus'` — 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 plugins/apps/qwenpaw-creator/backend/services/web_grounding/providers/config.py:104 — `dashscope_native_search_unavailable_reason` swallows every exception into `return 'native_search_config_unavailable'` — 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 plugins/bundle/cloudpaw/skills/terraform-cli-setup/scripts/setup_terraform.py:119 — `get_latest_version` swallows every exception into `return '1.14.6'` — 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 plugins/channel/dingtalk/qwenpaw_channel_dingtalk/ai_card.py:51 — `load` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/qwenpaw/agents/skill_system/hub.py:163 — `_hub_http_timeout` swallows every exception into `return 30.0` — 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 src/qwenpaw/agents/skill_system/hub.py:171 — `_hub_http_retries` swallows every exception into `return 3` — 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 src/qwenpaw/agents/skill_system/hub.py:179 — `_hub_http_backoff_base` swallows every exception into `return 0.8` — 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 src/qwenpaw/agents/skill_system/hub.py:187 — `_hub_http_backoff_cap` swallows every exception into `return 6.0` — 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 src/qwenpaw/agents/skill_system/hub.py:1177 — `fetch` (in `_github_repo_exists`) swallows every exception into `return False` — 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.
D24 · Comment Value · redundant comment · ×13
  • redundant comment console/src/contexts/ApprovalContext.test.tsx:15 — "Mock the API module that PendingApproval depends on" repeats the code it sits on: 5 of its 6 words (mock, api, module, pending, approval) are already in `vi.mock("../api/modules/console", () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Agent/Config/index.tsx:274 — "Add Tool Execution Level tab" repeats the code it sits on: 4 of its 5 words (tool, execution, level, tab) are already in `baseTabs.push({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/AppCenter/index.tsx:316 — "App menu items" repeats the code it sits on: 3 of its 3 words (app, menu, items) are already in `const appMenuItems: MenuProps["items"] = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Chat/components/ChatSearchPanel/ChatSearchPanel.test.tsx:17 — "extractTextFromContent" repeats the code it sits on: 3 of its 3 words (extract, text, content) are already in `const extractTextFromContent = (content: unknown): string =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Chat/components/ChatSearchPanel/ChatSearchPanel.test.tsx:27 — "getRoleLabel" repeats the code it sits on: 3 of its 3 words (get, role, label) are already in `const getRoleLabel = (role: string, t: (key: string) => string): string =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Control/Channels/useChannels.test.ts:14 — "Mock agentStore" repeats the code it sits on: 3 of its 3 words (mock, agent, store) are already in `vi.mock("../../../stores/agentStore", async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Settings/Models/components/modals/LocalModelManageModal.test.tsx:19 — "Mock react-i18next" repeats the code it sits on: 4 of its 4 words (mock, react, 18, next) are already in `vi.mock("react-i18next", () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Settings/Models/components/modals/LocalModelManageModal.test.tsx:170 — "Mock ThemeContext" repeats the code it sits on: 3 of its 3 words (mock, theme, context) are already in `vi.mock("../../../../../contexts/ThemeContext", () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Settings/Models/components/modals/LocalModelManageModal.test.tsx:175 — "Mock useAppMessage" repeats the code it sits on: 4 of its 4 words (mock, use, app, message) are already in `vi.mock("../../../../../hooks/useAppMessage", () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Settings/Security/useSecurityPage.test.ts:280 — "Set savedSandboxEnabled === sandboxEnabled (both true)" repeats the code it sits on: 5 of its 5 words (set, saved, sandbox, enabled, true) are already in `hoisted.savedSandboxEnabled = true;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/pages/Settings/SkillPool/useSkillPool.test.tsx:2529 — "Pre-set the ack in localStorage" repeats the code it sits on: 4 of its 5 words (set, ack, local, storage) are already in `localStorage.setItem("qwenpaw.skill-pool.builtin-notice.ack", "fp-seen");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment console/src/test/setup.ts:14 — "localStorage mock" repeats the code it sits on: 3 of its 3 words (local, storage, mock) are already in `const localStorageMock = (() =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment plugins/apps/qwenpaw-creator/ui/src/components/blueprint/BlueprintPrepDrawer.tsx:90 — "Visual entity detail" repeats the code it sits on: 3 of its 3 words (visual, entity, detail) are already in `function VisualDetail({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D16 · Bus Factor · Off-boarding risk · ×12
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 56 significant file(s) lose their only recent owner: plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/driver.py, plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py, plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py, plugins/apps/qwenpaw-creator/ui/src/components/creator/ModelConfigModal.tsx, plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py, plugins/apps/qwenpaw-creator/backend/api/model_routes.py, plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py, plugins/apps/qwenpaw-creator/ui/src/pages/AssetsPage.tsx (+48 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 21 significant file(s) lose their only recent owner: console/src-tauri/src/computer_use_runtime.rs, console/src-tauri/src/computer_use_server/dispatch.rs, console/src-tauri/src/computer_use_server/platform_macos/accessibility_tree.rs, console/src-tauri/src/computer_use_server/platform_macos/input.rs, plugins/bundle/computer-use/computer_use/client.py, console/src-tauri/src/computer_use_server/platform_windows/input.rs, console/src-tauri/src/computer_use_server/platform_windows/uia.rs, console/src-tauri/src/computer_use_server/state.rs (+13 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 18 significant file(s) lose their only recent owner: REDACTED, src/qwenpaw/hub/service.py, src/qwenpaw/hub/auth.py, REDACTED, src/qwenpaw/hub/model_service/catalog.py, src/qwenpaw/hub/model_service/budget.py, src/qwenpaw/hub/model_service/gateway.py, console/src/pages/Hub/governance/HubModelIdentityFields.tsx (+10 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 12 significant file(s) lose their only recent owner: REDACTED, console/src/os/WindowFrame.tsx, console/src/startup/monitor.ts, console/src/components/interaction/DurationWheel.tsx, console/src/utils/chunkRecovery.ts, console/src/pages/Settings/PluginManager/hooks/useInstallModal.ts, console/src/components/Chat/MediaDownload/index.tsx, console/src/monaco/robotframework.ts (+4 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 11 significant file(s) lose their only recent owner: src/qwenpaw/agents/skills/make-skill-zh/scripts/create_plan.py, src/qwenpaw/agents/skills/make-skill-en/scripts/create_plan.py, src/qwenpaw/market/providers/clawhub.py, console/src/pages/Agent/Skills/components/PoolTransferModal.tsx, src/qwenpaw/agents/skills/make-skill-zh/scripts/publish_skill.py, src/qwenpaw/agents/skills/make-skill-en/scripts/publish_skill.py, src/qwenpaw/market/builtin.py, src/qwenpaw/app/routers/market.py (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 8 significant file(s) lose their only recent owner: console/src/pages/Chat/components/ChatSenderTabsPanel.tsx, src/qwenpaw/runtime/tool_registry.py, plugins/bundle/omp_workflows/shared/role_prompts.py, plugins/bundle/omp_workflows/autopilot/prompts.py, plugins/bundle/omp_workflows/autopilot/gate.py, plugins/bundle/omp_workflows/team/gate.py, plugins/bundle/omp_workflows/ultrawork/gate.py, src/qwenpaw/_version_compat.py. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 7 significant file(s) lose their only recent owner: src/qwenpaw/portability/importer.py, src/qwenpaw/portability/adaptation_loop.py, src/qwenpaw/app/routers/mail_access_control.py, src/qwenpaw/portability/compatibility.py, src/qwenpaw/portability/adaptation_staging.py, src/qwenpaw/portability/providers/base.py, console/src/api/modules/mailAccessControl.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 6 significant file(s) lose their only recent owner: src/qwenpaw/cli/tui/transport/acp.py, src/qwenpaw/cli/tui/normalize.py, src/qwenpaw/cli/tui/widgets/status_bar.py, src/qwenpaw/cli/tui/widgets/permission_overlay.py, src/qwenpaw/cli/tui/launch.py, src/qwenpaw/cli/tui/events.py. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 5 significant file(s) lose their only recent owner: plugins/apps/agent-kanban/backend/main.py, src/qwenpaw/app/rate_limiter.py, src/qwenpaw/services/terminal_posix.py, console/src/plugins/moduleRegistry.ts, console/src/pages/Chat/LazyAccordion.tsx. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 6 significant file(s) lose their only recent owner: src/qwenpaw/agents/memory/reme_config.py, console/src/pages/Agent/Config/components/EmbeddingModelCard.tsx, console/src/pages/Agent/Config/components/ReMeStatusModal.tsx, src/qwenpaw/agents/memory/reme_inbox.py, src/qwenpaw/agents/memory/embedding_model.py, console/src/pages/Agent/Config/useReMeRuntimeStatus.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 3 significant file(s) lose their only recent owner: src/qwenpaw/agents/context/scroll/eviction_index.py, src/qwenpaw/agents/context/scroll/repl.py, src/qwenpaw/agents/context/scroll/prompt.py. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: plugins/channel/feishu/qwenpaw_channel_feishu/card_templates.py, plugins/channel/wecom/qwenpaw_channel_wecom/utils.py, plugins/channel/yuanbao/qwenpaw_channel_yuanbao/utils.py. Pair on, review, or document these before any departure.
M4 · Documentation accuracy · README/code drift · ×10
  • README/code drift scripts/startup_profile/README.md:84 — scripts/startup_profile/README.md names Python 3.8 or later, but packages/qwenpawmail-mcp/pyproject.toml:10 requires `requires-python = ">=3.10"` (the lowest of 2 declarations): the package does not install on Python 3.8. 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 plugins/channel/azure_bot/README.md:95 — plugins/channel/azure_bot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/matrix/README.md:117 — plugins/channel/matrix/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/onebot/README.md:72 — plugins/channel/onebot/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/qq/README.md:45 — plugins/channel/qq/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/sip/README.md:117 — plugins/channel/sip/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/voice/README.md:98 — plugins/channel/voice/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/wechat/README.md:38 — plugins/channel/wechat/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/wecom/README.md:15 — plugins/channel/wecom/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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 plugins/channel/xiaoyi/README.md:63 — plugins/channel/xiaoyi/README.md links to `../../../docs/superpowers/plans/2026-10-14-official-channel-pluginization.md`, but `docs/superpowers/plans/2026-10-14-official-channel-pluginization.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.
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 src/qwenpaw/plugins/loader.py:2553 — `debug` at line 2553 is called with an argument built by `"…".join(cmd)` (line 2556), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted src/qwenpaw/local_models/tag_parser.py:197 — `debug` at line 197 is called with an argument built by `list(arguments.keys())` (line 200), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted src/qwenpaw/hooks/request_setup/contextvars_hook.py:362 — `debug` at line 362 is called with an argument built by `[str(entry.path) for entry in resolved.dirs]` (line 365), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted src/qwenpaw/backup/_ops/restore.py:765 — `debug` at line 765 is called with an argument built by `sorted(restore_aids)` (line 770), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted src/qwenpaw/app/channels/base.py:2179 — `debug` at line 2179 is called with an argument built by `[getattr(p, "…", None) for p in parts]` (line 2182), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted src/qwenpaw/agents/routing_chat_model.py:116 — `debug` at line 116 is called with an argument built by `"…".join(decision.reasons)` (line 121), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted plugins/channel/dingtalk/qwenpaw_channel_dingtalk/handler.py:407 — `debug` at line 407 is called with an argument built by `incoming_message.to_dict()` (line 409), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×5
  • Projects may be oversized for their cohesion pyproject.toml:1 — `(repository root)` (342969 LoC, 2794 module-visible types across 179 directories) overshoots its size bounds. 5 of 47 build unit(s) (Cargo, Python, npm) overshoot their size bounds, lowering Project Cohesion to 7.9/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 — `console` (161101 LoC, 1509 module-visible types across 148 directories) overshoots its size bounds. 5 of 47 build unit(s) (Cargo, Python, npm) overshoot their size bounds, lowering Project Cohesion to 7.9/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 plugins/apps/qwenpaw-creator/requirements.txt:1 — `plugins/apps/qwenpaw-creator` (135018 LoC, 886 module-visible types across 31 directories) overshoots its size bounds. 5 of 47 build unit(s) (Cargo, Python, npm) overshoot their size bounds, lowering Project Cohesion to 7.9/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 plugins/apps/qwenpaw-creator/ui/package.json:1 — `plugins/apps/qwenpaw-creator/ui` (55779 LoC, 429 module-visible types across 21 directories) overshoots its size bounds. 5 of 47 build unit(s) (Cargo, Python, npm) overshoot their size bounds, lowering Project Cohesion to 7.9/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 website/package.json:1 — `website` (12611 LoC, 124 module-visible types across 17 directories) overshoots its size bounds. 5 of 47 build unit(s) (Cargo, Python, npm) overshoot their size bounds, lowering Project Cohesion to 7.9/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 · Pending state with no failure state · ×4
  • Pending state with no failure state plugins/apps/qwenpaw-data/ui/src/EmbeddedDataConsole.tsx:69 — The view draws `Loading console…` under `availability === "checking" || ! loaded`, but `availability` 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 console/src/pages/Coding/GitPanel.tsx:394 — The view draws `Show all files…` under `! showAllStaged && staged . length > FILE_LIMIT`, but `showAllStaged` 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 console/src/pages/Coding/GitPanel.tsx:432 — The view draws `Show all files…` under `! showAllUnstaged && unstaged . length > FILE_LIMIT`, but `showAllUnstaged` 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 console/src/pages/Agent/Config/components/AdvisorModeTab.tsx:136 — The view draws `<LoaderCircle className= size= aria-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.
D30 · Dependency Vulnerabilities · Low CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×2
  • REDACTED
  • REDACTED
M2 · Architecture documentation · Architecture diagram out of date · ×2
  • Architecture diagram out of date website/public/blog/cross-harness-agent-os.en.md:233 — `website/public/blog/cross-harness-agent-os.en.md` draws the system's parts, and the drawing no longer matches the code: it leaves out `seed`, which the repository has beside the units it does draw. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape.
  • Architecture diagram out of date website/public/blog/cross-harness-agent-os.zh.md:232 — `website/public/blog/cross-harness-agent-os.zh.md` draws the system's parts, and the drawing no longer matches the code: it leaves out `seed`, which the repository has beside the units it does draw. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 10 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 (168 single-owned of 1917 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; 1917 of the 2881 production source files in this repository met that bar). They are anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (1 file(s)), anonymized user #16 (1 file(s)), anonymized user #17 (1 file(s)), anonymized user #18 (1 file(s)) (+4 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/qwenpaw/security/tool_guard/guardians/shell_evasion_guardian.py, console/src/utils/scanError.ts, scripts/review-bot/setup_review_workspace.py, src/qwenpaw/hooks/cron/cron_hook.py, scripts/cleanup_windows_sandbox.py, plugins/bundle/qwenpaw-pet/qwenpaw_pet_desktop/window.py, scripts/github/real_behavior_proof_policy.py, src/qwenpaw/agents/utils/tool_call_coerce.py (+4 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found pyproject.toml:117 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `pyproject.toml` makes this repository a deployable product (line 117).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 123 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/qwenpaw/checkpoints/policy.py, src/qwenpaw/local_models/download_manager.py, src/qwenpaw/security/skill_scanner/scan_policy.py, src/qwenpaw/browser/sdk/facade.py, plugins/channel/onebot/qwenpaw_channel_onebot/media.py, src/qwenpaw/agents/skills/docx-en/scripts/office/validators/docx.py, src/qwenpaw/agents/skills/docx-zh/scripts/office/validators/docx.py, src/qwenpaw/agents/skills/pptx-en/scripts/office/validators/docx.py (and 115 more) (134 orphaned of 1917 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; 1917 of the 2881 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
DM9 · Scattered domain decisions · Rule about [offload_reason, status] decided in 2 places · ×1
  • Rule about [offload_reason, status] decided in 2 places — console.src.api.modules.toolCalls.ToolCallInfo's [offload_reason, status] are judged in console.src.components.Chat.ToolCards.shared.ToolCallControlPopover, console.src.hooks.useToolCallControl — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [project_id, store] decided in 2 places · ×1
  • Rule about [project_id, store] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold.ManualAdmission's [project_id, store] are judged in plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.manual_regeneration_hold.HoldAwareExecutionStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [kind, node_id] decided in 2 places · ×1
  • Rule about [kind, node_id] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.work_graph.WorkNode's [kind, node_id] are judged in plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.work_scheduler.WorkGraphScheduler, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.workgraph_execution — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [sha256, size_bytes] decided in 3 places · ×1
  • Rule about [sha256, size_bytes] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.project_files.assets.StagedAsset's [sha256, size_bytes] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution, plugins.apps.qwenpaw-creator.backend.services.project_files.assets.AssetFileStore, plugins.apps.qwenpaw-creator.backend.services.project_files.remote_cache — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [kind, owner_ref] decided in 4 places · ×1
  • Rule about [kind, owner_ref] decided in 4 places — plugins.apps.qwenpaw-creator.backend.services.project_files.models.ArtifactSlot's [kind, owner_ref] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.rough_cut, plugins.apps.qwenpaw-creator.backend.services.project_files.blueprint_readiness, plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex, plugins.apps.qwenpaw-creator.backend.services.project_files.script_artifacts — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [selected_version_id, version_ids] decided in 2 places · ×1
  • Rule about [selected_version_id, version_ids] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.project_files.models.ArtifactSlot's [selected_version_id, version_ids] are judged in plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex, plugins.apps.qwenpaw-creator.backend.services.project_files.script_import — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [artifact_versions_by_id, files_by_id] decided in 2 places · ×1
  • Rule about [artifact_versions_by_id, files_by_id] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.project_files.models.AssetIndex's [artifact_versions_by_id, files_by_id] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [etag, generation] decided in 8 places · ×1
  • Rule about [etag, generation] decided in 8 places — plugins.apps.qwenpaw-creator.backend.services.project_files.store.ProjectSnapshot's [etag, generation] are judged in plugins.apps.qwenpaw-creator.backend.api.project_file_routes, plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService, plugins.apps.qwenpaw-creator.backend.services.project_files.commit.ProjectCommitBoundary, plugins.apps.qwenpaw-creator.backend.services.project_files.poller.ProjectPoller, plugins.apps.qwenpaw-creator.backend.services.project_files.recovery.ProjectCommitRecoveryCoordinator, plugins.apps.qwenpaw-creator.backend.services.project_files.review.ProjectReviewService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [requested_model, requested_provider] decided in 2 places · ×1
  • Rule about [requested_model, requested_provider] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.ExecutionAuthorizationRecord's [requested_model, requested_provider] are judged in plugins.apps.qwenpaw-creator.backend.api.file_execution_routes, plugins.apps.qwenpaw-creator.backend.services.file_agent_runtime.driver.FileCreatorAgentRuntime — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [input_etag, request_fingerprint, target_refs] decided in 3 places · ×1
  • Rule about [input_etag, request_fingerprint, target_refs] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.SpecialistRunRecord's [input_etag, request_fingerprint, target_refs] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [input_etag, input_generation] decided in 3 places · ×1
  • Rule about [input_etag, input_generation] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [input_etag, input_generation] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [input_etag, input_refs, request_fingerprint] decided in 3 places · ×1
  • Rule about [input_etag, input_refs, request_fingerprint] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [input_etag, input_refs, request_fingerprint] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [kind, metadata, status] decided in 2 places · ×1
  • Rule about [kind, metadata, status] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [kind, metadata, status] are judged in plugins.apps.qwenpaw-creator.backend.api.file_asset_routes, plugins.apps.qwenpaw-creator.backend.services.project_files.remote_cache — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [kind, status] decided in 3 places · ×1
  • Rule about [kind, status] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [kind, status] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution, plugins.apps.qwenpaw-creator.backend.services.media_files.r2v_execution.FileR2VExecutionService, plugins.apps.qwenpaw-creator.backend.services.source_analysis.service — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [request_fingerprint, task_id] decided in 2 places · ×1
  • Rule about [request_fingerprint, task_id] decided in 2 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [request_fingerprint, task_id] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [result, status] decided in 3 places · ×1
  • Rule about [result, status] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.execution_models.TaskRecord's [result, status] are judged in plugins.apps.qwenpaw-creator.backend.services.media_files.image_execution.FileImageExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.local_execution.FileLocalMediaExecutionService, plugins.apps.qwenpaw-creator.backend.services.media_files.publication_retry — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [after_hash, before_hash] decided in 3 places · ×1
  • Rule about [after_hash, before_hash] decided in 3 places — plugins.apps.qwenpaw-creator.backend.services.runtime_files.models.ProjectChange's [after_hash, before_hash] are judged in plugins.apps.qwenpaw-creator.backend.services.project_files.commit.ProjectCommitBoundary, plugins.apps.qwenpaw-creator.backend.services.runtime_files.manual_edit_store, plugins.apps.qwenpaw-creator.backend.services.runtime_files.manual_edit_store.ManualEditBuffer — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [agent_id, channel, root_session_id, session_id, user_id] decided in 2 places · ×1
  • Rule about [agent_id, channel, root_session_id, session_id, user_id] decided in 2 places — src.qwenpaw.app.approvals.service.ApprovalActor's [agent_id, channel, root_session_id, session_id, user_id] are judged in src.qwenpaw.app.approvals.service.ApprovalService, src.qwenpaw.runtime.builtin_commands — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [model, provider_id] decided in 2 places · ×1
  • Rule about [model, provider_id] decided in 2 places — src.qwenpaw.config.config.ModelSlotConfig's [model, provider_id] are judged in src.qwenpaw.providers.provider_manager.ProviderManager, src.qwenpaw.runtime.commands.control.model_handler.ModelCommandHandler — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [name, protocol] decided in 2 places · ×1
  • Rule about [name, protocol] decided in 2 places — src.qwenpaw.drivers.contracts.DriverCard's [name, protocol] are judged in src.qwenpaw.agents.skill_system.registry, src.qwenpaw.drivers.handler.DriverHandler — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [id, version] decided in 2 places · ×1
  • Rule about [id, version] decided in 2 places — src.qwenpaw.plugins.architecture.PluginManifest's [id, version] are judged in src.qwenpaw.plugins.official_channels, src.qwenpaw.plugins.updates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [supports_image, supports_multimodal] decided in 2 places · ×1
  • Rule about [supports_image, supports_multimodal] decided in 2 places — src.qwenpaw.providers.model_info.ModelInfo's [supports_image, supports_multimodal] are judged in src.qwenpaw.agents.prompt, src.qwenpaw.agents.tools.view_media — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
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 27/29 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/qwenpawmail-mcp`, `plugins/channel/azure_bot`.
P3 · Security & performance tooling · Dependabot does not watch cargo · ×1
  • Dependabot does not watch cargo REDACTED:7 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
R7 · Dead Code · Unused export 'resolveCommunityFeedbackLink' · ×1
  • Unused export 'resolveCommunityFeedbackLink' console/src/api/modules/community.ts:71 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MemberModelCatalog' · ×1
  • Unused export 'MemberModelCatalog' console/src/api/modules/hubGovernance.ts:115 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'QWENPAW_COMMUNITY_URL' · ×1
  • Unused export 'QWENPAW_COMMUNITY_URL' console/src/constants/community.ts:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ResolvedTheme' · ×1
  • Unused export 'ResolvedTheme' console/src/contexts/ThemeContext.tsx:13 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'agentFilesScopeKey' · ×1
  • Unused export 'agentFilesScopeKey' console/src/features/files-workspace/filesWorkspaceScope.ts:21 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'deriveOpenKeys' · ×1
  • Unused export 'deriveOpenKeys' console/src/layouts/registry/adapter.tsx:162 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'useApprovalNotificationsEnabled' · ×1
  • Unused export 'useApprovalNotificationsEnabled' console/src/notifications/preferences.ts:109 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'unreadNotifyCount' · ×1
  • Unused export 'unreadNotifyCount' console/src/os/osNotifyStore.ts:214 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'topSegment' · ×1
  • Unused export 'topSegment' console/src/os/osRouteMap.ts:55 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DefaultConfig' · ×1
  • Unused export 'DefaultConfig' console/src/pages/Chat/OptionsPanel/defaultConfig.ts:84 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ApprovalCard' · ×1
  • Unused export 'ApprovalCard' console/src/pages/Inbox/components/ApprovalCard.tsx:32 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Inbox/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Inbox/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'CreateHarvestModal' · ×1
  • Unused export 'CreateHarvestModal' console/src/pages/Inbox/components/CreateHarvestModal.tsx:42 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Inbox/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Inbox/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'HarvestCard' · ×1
  • Unused export 'HarvestCard' console/src/pages/Inbox/components/HarvestCard.tsx:22 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Inbox/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Inbox/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'MagazineStackViewer' · ×1
  • Unused export 'MagazineStackViewer' console/src/pages/Inbox/components/MagazineStackViewer.tsx:14 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Inbox/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Inbox/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'MarkdownComposer' · ×1
  • Unused export 'MarkdownComposer' console/src/pages/Market/Community/MarkdownComposer.tsx:120 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ModelsSection' · ×1
  • Unused export 'ModelsSection' console/src/pages/Settings/Models/components/sections/ModelsSection.tsx:32 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/Models/components/sections/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/Models/components/sections/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SkillCategoryBadges' · ×1
  • Unused export 'SkillCategoryBadges' console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:10 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/SkillPool/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/SkillPool/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SkillCategoriesAndTags' · ×1
  • Unused export 'SkillCategoriesAndTags' console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:42 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/SkillPool/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/SkillPool/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SkillTags' · ×1
  • Unused export 'SkillTags' console/src/pages/Settings/SkillPool/components/SkillMeta.tsx:82 — Nothing ultimately consumes this binding: its only referrer is the re-export in console/src/pages/Settings/SkillPool/components/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in console/src/pages/Settings/SkillPool/components/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'post' · ×1
  • Unused export 'post' console/src/plugins/pawapp-sdk/api.ts:183 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'get' · ×1
  • Unused export 'get' console/src/plugins/pawapp-sdk/api.ts:195 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'stream' · ×1
  • Unused export 'stream' console/src/plugins/pawapp-sdk/api.ts:373 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'task' · ×1
  • Unused export 'task' console/src/plugins/pawapp-sdk/api.ts:385 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'paw' · ×1
  • Unused export 'paw' console/src/plugins/pawapp-sdk/index.ts:41 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'useSlotEntries' · ×1
  • Unused export 'useSlotEntries' console/src/plugins/registry/hooks.ts:23 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_AGENT_DISPLAY_NAME' · ×1
  • Unused export 'DEFAULT_AGENT_DISPLAY_NAME' console/src/utils/agentDisplayName.ts:5 — Nothing imports this binding — it is safe to review for removal.
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 24/68 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 — 15/16 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 — ~0.7 `!` null assertions per 1k TypeScript source lines — 174 assertion(s) across the 247082 source line(s) of the 1200 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: website/src/pages/Evaluation/Chart.tsx (18), website/src/pages/Evaluation/metrics.ts (12), console/src/plugins/registry/store.ts (8). 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.
Minor — 18 finding(s)
D12 · Dependency Hygiene · Outdated · ×14
  • Outdated: futures-util — `futures-util` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
  • Outdated: libc — `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: log — `log` is locked at 0.4.34 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
  • Outdated: objc2 — `objc2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p objc2` and commit the updated REDACTED.
  • Outdated: serde — `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.149 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: tauri — `tauri` is locked at 2.11.1 but 2.12.6 is the current stable release on crates.io, and it already satisfies the `"2.10.3"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri` and commit the updated REDACTED.
  • Outdated: tauri-build — `tauri-build` is locked at 2.6.1 but 2.7.5 is the current stable release on crates.io, and it already satisfies the `"2.5.6"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-build` and commit the updated REDACTED.
  • Outdated: tauri-plugin-dialog — `tauri-plugin-dialog` is locked at 2.7.1 but 2.8.4 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-dialog` and commit the updated REDACTED.
  • Outdated: tauri-plugin-log — `tauri-plugin-log` is locked at 2.8.0 but 2.10.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-log` and commit the updated REDACTED.
  • Outdated: tauri-plugin-shell — `tauri-plugin-shell` is locked at 2.3.5 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-shell` and commit the updated REDACTED.
  • Outdated: tauri-plugin-updater — `tauri-plugin-updater` is locked at 2.10.1 but 2.14.1 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-updater` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.52.2 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.23.1 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in console/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
D10 · Test Quality · Skipped (documented) · ×3
  • Skipped (documented): importFromHub: an empty task id exits the poll loop with success:false console/src/pages/Agent/Skills/useSkills.paths.test.ts:600 — Skipped with a documented reason — a deferral, not lazy debt: declared it.fails — the body is expected to fail, so its failure is not reported
  • Skipped (documented): cancelImport: tolerates a start request that has not resolved yet console/src/pages/Agent/Skills/useSkills.paths.test.ts:875 — Skipped with a documented reason — a deferral, not lazy debt: declared it.fails — the body is expected to fail, so its failure is not reported
  • Skipped (documented): (unnamed test) console/src/features/terminal/TerminalView.test.tsx:19 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names console/src/api/modules/mcp.ts:16 — 0 of 2 documented parameters and 5 of 1401 summaries in `qwenpaw-console` only repeat the member or parameter name (e.g. "List all MCP clients" for `listMCPClients`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-a246540246a3422b8b3b72d818357607/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-a246540246a3422b8b3b72d818357607/history-1.json --exit-code 0 --source .1artifacts/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=1784" --report-format json --report-path /tmp/watchdog-gitleaks-a246540246a3422b8b3b72d818357607/history-2.json --exit-code 0 --source .0artifacts/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-a246540246a3422b8b3b72d818357607/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 --exclude plugins/bundle/cloudpaw/ui .416artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .93artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .29artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.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 --exclude plugins/bundle/cloudpaw/ui .1artifacts/raw/semgrep-gdpr.json
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 01a1e4f0-c057-7055-811b-e237ff86b8ca · 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