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

aaif-goose/goose

Measured 25 October 2026, 21:37 UTC, at code version e45707d

No regression since the last survey

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

CAI score 54out of 100 At risk Down 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 large codebase: 318,993 lines of product code in 26 projects, tests not counted · Estimated rebuild effort: about 2.5 person-years · Weakest lens: Accessibility, 43

Findings by how serious they are

158 critical 1629 serious 233 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 21:37 UTC

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

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

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

93of 93 dimensions measured by tools.
1993of 2020 findings point to an exact file and line, so you can open each one in the code. The other 27 concern the repository as a whole, such as missing documentation.
93dimensions across 9 lenses, read from 318,993 lines of product code in 26 projects.
Chapters

Executive summary

aaif-goose/goose is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because it has controls that only work with a mouse. It scores 54 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 43, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 4 points. Automating accessibility checks comes next, worth about 2 points. Raising Accessibility to 70 would lift the score to about 63.

Forty-seven known security holes in the packages the code depends on can be used by attackers. Fourteen controls can't be used without a mouse, and thirteen passwords or keys in the code's history and three in the code are open to anyone who can read the repository. Making the controls work with a keyboard, updating the vulnerable packages and replacing each exposed password or key would close these risks. Limiting each secret to its own step would fix the five secrets exposed to more of the pipeline than needed, and the five pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 20 form fields without a label need a label.

The product code is 318,993 lines, about €360,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 43 · counts for 45%Performance 60 · counts for 25%Code Health 61 · counts for 14%Production Readiness 62 · counts for 8%Architecture 69 · counts for 4%Maturity 76 · counts for 2%Security and Compliance 77 · counts for 1%Domain Modelling 91 · counts for 1%Event Sourcing 100 · counts for 0%

If Accessibility rose from 43 to 70, the lowest score rated Strong, the score would rise from 54 to about 63.

Code composition: what the lines of code are
Product code 87%Tests 13%
New since the last survey: 176 findings

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

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

Fixed since the last survey: 322 findings

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

  • Cyclomatic Complexity · goose_cli::session::builder::build_session (cyclomatic 21) crates/goose-cli/src/session/builder.rs
  • Cyclomatic Complexity · ProgressiveMessageList.ProgressiveMessageList (cyclomatic 20) ui/desktop/src/components/ProgressiveMessageList.tsx
  • Cyclomatic Complexity · diff-cli-structures.categorize_breaking_changes (cyclomatic 17) documentation/automation/cli-command-tracking/scripts/diff-cli-structures.py
  • Cyclomatic Complexity · extract-cli-structure.parse_option_block (cyclomatic 16) documentation/automation/cli-command-tracking/scripts/extract-cli-structure.py
  • Cyclomatic Complexity · ParameterInput.ParameterInput (cyclomatic 16) ui/desktop/src/components/parameter/ParameterInput.tsx
  • Cognitive Complexity · diff-cli-structures.categorize_breaking_changes (cognitive 40) documentation/automation/cli-command-tracking/scripts/diff-cli-structures.py
  • Cognitive Complexity · goose::skills::scan_skills_from_dir (cognitive 27) crates/goose/src/skills/mod.rs
  • Cognitive Complexity · goose_cli::session::builder::build_session (cognitive 26) crates/goose-cli/src/session/builder.rs
  • Cognitive Complexity · goose_local_inference::llamacpp::inference_emulated_tools::build_emulator_tool_description (cognitive 22) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Cognitive Complexity · goose_local_inference::tool_emulation::build_emulator_tool_description (cognitive 22) crates/goose-local-inference/src/tool_emulation.rs
  • Cognitive Complexity · UnknownToolOperation::run (cognitive 21) crates/goose/src/agents/state_machine/ops_unknown_tool.rs
  • Cognitive Complexity · diff-cli-structures.compare_options (cognitive 19) documentation/automation/cli-command-tracking/scripts/diff-cli-structures.py
  • Cognitive Complexity · goose::context_mgmt::maybe_summarize_tool_pairs (cognitive 18) crates/goose/src/context_mgmt/mod.rs
  • Cognitive Complexity · SessionListView.EditSessionModal (cognitive 18) ui/desktop/src/components/sessions/SessionListView.tsx
  • Cognitive Complexity · extract-cli-structure.parse_option_block (cognitive 16) documentation/automation/cli-command-tracking/scripts/extract-cli-structure.py
  • Cognitive Complexity · extract-cli-structure.parse_subcommands (cognitive 16) documentation/automation/cli-command-tracking/scripts/extract-cli-structure.py
  • God Classes · FunctionTooLong: goose_cli::session::builder::build_session crates/goose-cli/src/session/builder.rs
  • God Classes · MethodTooLong: UnknownToolOperation.run crates/goose/src/agents/state_machine/ops_unknown_tool.rs
  • God Classes · FunctionTooLong: ProgressiveMessageList.ProgressiveMessageList ui/desktop/src/components/ProgressiveMessageList.tsx
  • God Classes · ClassTooLong: RecipeFormFields ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx
  • God Classes · FileTooLong: shared/RecipeFormFields.tsx ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx
  • God Classes · FileTooLong: components/BaseChat.tsx ui/desktop/src/components/BaseChat.tsx
  • God Classes · MethodTooLong: ShellTool.shell_with_cwd_and_emitter crates/goose/src/agents/platform_extensions/developer/shell.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/goose-providers/src/anthropic.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/goose-providers/src/anthropic.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/goose-providers/src/anthropic.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/goose-providers/src/databricks_v2.rs
  • Code Duplication · Duplicated block (48–49 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Code Duplication · Duplicated block (30 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Code Duplication · Duplicated block (11–12 lines × 2) crates/goose/src/agents/state_machine/ops_tool_pair_compaction.rs
  • Code Duplication · Duplicated block (11 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/goose-agent/src/inference.rs
  • Code Duplication · Duplicated block (7–8 lines × 2) crates/goose-providers/src/openai.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/goose-providers/src/openai_compatible.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/goose/src/agents/final_output_tool.rs
  • Code Duplication · Duplicated block (14 lines × 2) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/providers/claude_code.rs crates/goose/src/providers/claude_code.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose-cli/src/commands/configure.rs crates/goose-cli/src/commands/configure.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose-cli/src/session/input.rs crates/goose-cli/src/session/input.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/session/export_markdown.rs crates/goose/src/session/export_markdown.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose-provider-types/src/conversation.rs crates/goose-provider-types/src/conversation.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/providers/inventory/mod.rs crates/goose/src/providers/inventory/mod.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose-providers/src/snowflake.rs crates/goose-providers/src/snowflake.rs
  • Churn × Complexity Hotspots · Hotspot: ui/desktop/src/components/onboarding/LocalModelPicker.tsx ui/desktop/src/components/onboarding/LocalModelPicker.tsx
  • Churn × Complexity Hotspots · Hotspot: ui/desktop/src/components/SessionActionsHeader.tsx ui/desktop/src/components/SessionActionsHeader.tsx
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/permission/permission_inspector.rs crates/goose/src/permission/permission_inspector.rs
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/providers/gcpvertexai.rs crates/goose/src/providers/gcpvertexai.rs
  • Churn × Complexity Hotspots · Hotspot: ui/desktop/src/components/onboarding/ProviderConfigForm.tsx ui/desktop/src/components/onboarding/ProviderConfigForm.tsx
  • Churn × Complexity Hotspots · Hotspot: crates/goose/src/session/import_formats/pi.rs crates/goose/src/session/import_formats/pi.rs
  • Churn × Complexity Hotspots · Hotspot: ui/desktop/src/components/settings/app/ExternalBackendSection.tsx ui/desktop/src/components/settings/app/ExternalBackendSection.tsx
  • Churn × Complexity Hotspots · Hotspot: ui/desktop/src/components/onboarding/ProviderSelector.tsx ui/desktop/src/components/onboarding/ProviderSelector.tsx
  • Churn × Complexity Hotspots · Repeated repair: crates/goose/src/providers/gemini_oauth.rs crates/goose/src/providers/gemini_oauth.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/goose-provider-types/src/errors.rs crates/goose-provider-types/src/errors.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/goose/src/acp/server/schedule.rs crates/goose/src/acp/server/schedule.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/goose/src/agents/schedule_tool.rs crates/goose/src/agents/schedule_tool.rs
  • Churn × Complexity Hotspots · Repeated repair: ui/desktop/src/acp/sessionNotificationAdapter.ts ui/desktop/src/acp/sessionNotificationAdapter.ts
  • Churn × Complexity Hotspots · Repeated repair: crates/goose/src/providers/xai_oauth.rs crates/goose/src/providers/xai_oauth.rs
  • Churn × Complexity Hotspots · Repeated repair: ui/desktop/src/acp/adapter/shared.ts ui/desktop/src/acp/adapter/shared.ts
  • Static Analysis (SAST) · High: REDACTED .github/workflows/code-review.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/code-review.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/docs-update-cli-ref.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/goose-issue-solver.yml
  • Static Analysis (SAST) · High: watchdog-secret-interpolated-into-run .github/workflows/goose-issue-solver.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/goose-issue-solver.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/goose-pr-reviewer.yml
  • Static Analysis (SAST) · High: watchdog-secret-interpolated-into-run .github/workflows/goose-pr-reviewer.yml
  • Static Analysis (SAST) · Medium: REDACTED .github/workflows/docs-update-cli-ref.yml
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium advisory (unmaintained): RUSTSEC-2024-0370 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unmaintained): RUSTSEC-2026-0249 REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Change Coupling · Change coupling: claude_acp.rs ↔ codex_acp.rs crates/goose/src/providers/claude_acp.rs
  • Change Coupling · Change coupling: BaseChat.tsx ↔ Hub.tsx ui/desktop/src/components/BaseChat.tsx
  • Supply-chain Provenance & Signing · CI installs an unverified third-party binary .github/workflows/docs-update-cli-ref.yml
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Code Duplication · Duplicated block with local edits (123 matched lines × 2 locations) ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx
  • Code Duplication · Duplicated block with local edits (87 matched lines × 2 locations) ui/desktop/src/components/schedule/ScheduleDetailView.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) ui/desktop/src/components/settings/extensions/modal/ExtensionConfigFields.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) ui/desktop/src/components/settings/security/SecurityToggle.tsx
Rebuild cost: about €360,000 · Estimate
Cost to rebuild€120,000 to €600,000, for 2,006 to 6,363 hours of work, about 2.5 person-years for 1 to 5 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 54. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 318,993 lines of product code

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

Top priorities

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

1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 4 points · Medium effort · Keyboard semantics
2
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Raises the score by about 2 points · Medium effort · A11y enforcement
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 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 €360,000 to build again, about 2.5 person-years of work. Its weakest lens is Accessibility, at 43 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.7 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 248,445 lines over the last 90 days, which is about 1,007,582 lines a year. At that pace, the extra work comes to an estimated 82.7 to 496.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch @aaif/goose-acp goose-acp @aaif/goose-binary-darwin-arm64 goose-binary-darwin-arm64 @aaif/goose-acp->@aaif/goose-binary-darwin-arm64 @aaif/goose-binary-darwin-x64 goose-binary-darwin-x64 @aaif/goose-acp->@aaif/goose-binary-darwin-x64 @aaif/goose-binary-linux-arm64 goose-binary-linux-arm64 @aaif/goose-acp->@aaif/goose-binary-linux-arm64 @aaif/goose-binary-linux-x64 goose-binary-linux-x64 @aaif/goose-acp->@aaif/goose-binary-linux-x64 @aaif/goose-binary-win32-x64 goose-binary-win32-x64 @aaif/goose-acp->@aaif/goose-binary-win32-x64 @aaif/goose-acp-client goose-acp-client goose (Cargo) goose (Cargo) goose-acp-macros goose-acp-macros goose (Cargo)->goose-acp-macros goose-agent goose-agent goose (Cargo)->goose-agent goose-context-management goose-context-management goose (Cargo)->goose-context-management goose-download-manager goose-download-manager goose (Cargo)->goose-download-manager goose-providers goose-providers goose (Cargo)->goose-providers goose-sdk-types goose-sdk-types goose (Cargo)->goose-sdk-types goose-provider-types goose-provider-types goose-agent->goose-provider-types goose-agent->goose-sdk-types goose-app goose-app goose-app->@aaif/goose-acp-client goose-cli goose-cli goose-cli->goose (Cargo) goose-mcp goose-mcp goose-cli->goose-mcp goose-cli->goose-providers goose-context-management->goose-provider-types goose-local-inference goose-local-inference goose-local-inference->goose-download-manager goose-local-inference->goose-provider-types goose-local-inference->goose-sdk-types goose-providers->goose-local-inference goose-providers->goose-provider-types goose-sdk goose-sdk goose-sdk->goose-context-management goose-sdk->goose-providers goose-sdk->goose-sdk-types __more__ +6 more projects

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.

838 modules, with 1412 dependencies between them. 10 loops run through 46 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 798 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 goose.agents.types2 goose.bin.build_canonical_models3 goose_provider_types.conversation.token_usage4 goose_provider_types.errors5 goose_provider_types.goose_mode6 goose_provider_types.permission7 goose_provider_types.thinking8 goose_sdk_types.custom_requests9 ui.desktop.src.acp10 ui.desktop.src.components11 goose.agents.tool_execution12 goose.config.base13 goose.tool_inspection14 goose_provider_types.model15 goose.agents.extension16 goose.agents.mcp_client17 goose_provider_types.base18 goose.agents.extension_manager.lease19 goose.recipe20 goose_providers.api_client21 goose.providers.base22 goose_providers.declarative23 goose_sdk.bindings24 goose_provider_types.conversation.message25 goose_provider_types.conversation26 goose_agent.operation27 goose.agents.state_machine.effects28 goose.session.session_manager29 goose.agents.platform_extensions30 goose.providers.inventory31 goose_cli.session32 goose.agents.extension_manager33 goose.providers.chatgpt_codex34 goose_cli.cli35 goose_local_inference36 goose.hooks37 goose.providers.xai_oauth38 goose.agents.agent39 goose.agents.state_machine.ops_toolcalling40 goose.acp.server
1 goose.agents.types
2 goose.bin.build_canonical_models
3 goose_provider_types.conversation.token_usage
4 goose_provider_types.errors
5 goose_provider_types.goose_mode
6 goose_provider_types.permission
7 goose_provider_types.thinking
8 goose_sdk_types.custom_requests
9 ui.desktop.src.acp
10 ui.desktop.src.components
11 goose.agents.tool_execution1
12 goose.config.base1
13 goose.tool_inspection2
14 goose_provider_types.model1
15 goose.agents.extension2
16 goose.agents.mcp_client2
17 goose_provider_types.base11111111
18 goose.agents.extension_manager.lease435
19 goose.recipe22
20 goose_providers.api_client11
21 goose.providers.base111
22 goose_providers.declarative11
23 goose_sdk.bindings31122
24 goose_provider_types.conversation.message422111
25 goose_provider_types.conversation3
26 goose_agent.operation44
27 goose.agents.state_machine.effects1112
28 goose.session.session_manager541326311
29 goose.agents.platform_extensions1
30 goose.providers.inventory13211
31 goose_cli.session11114222
32 goose.agents.extension_manager152231
33 goose.providers.chatgpt_codex1211211
34 goose_cli.cli11
35 goose_local_inference111111111
36 goose.hooks1
37 goose.providers.xai_oauth111113114
38 goose.agents.agent1122121123112
39 goose.agents.state_machine.ops_toolcalling11113131214
40 goose.acp.server111922113261524
Uses a module listed above itPart of a loopThe module itself
1 goose.agents.types2 goose.bin.build_canonical_models3 goose_provider_types.conversation.token_usage4 goose_provider_types.errors5 goose_provider_types.goose_mode6 goose_provider_types.permission7 goose_provider_types.thinking8 goose_sdk_types.custom_requests9 ui.desktop.src.acp10 ui.desktop.src.components11 goose.agents.tool_execution12 goose.config.base13 goose.tool_inspection14 goose_provider_types.model15 goose.agents.extension16 goose.agents.mcp_client17 goose_provider_types.base18 goose.agents.extension_manager.lease19 goose.recipe20 goose_providers.api_client21 goose.providers.base22 goose_providers.declarative23 goose_sdk.bindings24 goose_provider_types.conversation.message25 goose_provider_types.conversation26 goose_agent.operation27 goose.agents.state_machine.effects28 goose.session.session_manager29 goose.agents.platform_extensions30 goose.providers.inventory31 goose_cli.session32 goose.agents.extension_manager33 goose.providers.chatgpt_codex34 goose_cli.cli35 goose_local_inference36 goose.hooks37 goose.providers.xai_oauth38 goose.agents.agent39 goose.agents.state_machine.ops_toolcalling40 goose.acp.servergoose.agents.types1goose.bin.build_canonical_models2goose_provider_types.conversation.token_usage3goose_provider_types.errors4goose_provider_types.goose_mode5goose_provider_types.permission6goose_provider_types.thinking7goose_sdk_types.custom_requests8ui.desktop.src.acp9ui.desktop.src.components10goose.agents.tool_execution11goose.config.base12goose.tool_inspection13goose_provider_types.model14goose.agents.extension15goose.agents.mcp_client16goose_provider_types.base17goose.agents.extension_manager.lease18goose.recipe19goose_providers.api_client20goose.providers.base21goose_providers.declarative22goose_sdk.bindings23goose_provider_types.conversation.message24goose_provider_types.conversation25goose_agent.operation26goose.agents.state_machine.effects27goose.session.session_manager28goose.agents.platform_extensions29goose.providers.inventory30goose_cli.session31goose.agents.extension_manager32goose.providers.chatgpt_codex33goose_cli.cli34goose_local_inference35goose.hooks36goose.providers.xai_oauth37goose.agents.agent38goose.agents.state_machine.ops_toolcalling39goose.acp.server4011212211111111435221111111311224221113441112541326311113211111142221522311211211111111111111111113114112212112311211113131214111922113261524+798 more modules (most-connected shown)

At a glance — Code Health · 61% · Adequate · gated by D2, X4 ·

At a glance — Architecture · 69% · Adequate · gated by R9 ·

At a glance — Maturity · 76% · Strong ·

At a glance — Readiness · 62% · Adequate · gated by P7 ·

At a glance — Security · 77% · Adequate · gated by D28, D29, D30 ·

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

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 43% · Weak · gated by AC4 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures91High / Critical
A05:2025 — Injection60High / Critical
A07:2025 — Authentication Failures17High / Critical
A02:2025 — Security Misconfiguration7High / Critical

Roadmap

First, ensure all custom controls are fully keyboard-operable and anchors have valid hrefs to support navigation. Next, enforce accessibility standards across the toolchain by integrating linting, testing, and CI gates, while simultaneously adding programmatic labels to every form control and button. Finally, provide text alternatives for all media, maintain visible focus styles, respect reduced motion preferences, and improve color contrast to ensure a safe and inclusive experience.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.7 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+2.3 ptsMediumA11y enforcement
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.2 ptsMediumForms & labels
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3).+1.0 ptsLowREDACTED Scanning
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+1.9 ptsMediumText alternatives
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+1.5 ptsMediumVisual & motion safety
Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.+1.4 ptsMediumAsync & latency hygiene
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+1.4 ptsMediumPage structure

File quality

Per-file score 0–10 — a quality signature. Of 417 files carrying findings, judged against the Production bar: 1% slop · 73% mixed · 26% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
ui/desktop/src/main.ts5.5MixedCyclomatic Complexity: main.appMain (cyclomatic 94)
crates/goose-cli/src/session/mod.rs5.5MixedCyclomatic Complexity: CliSession::process_agent_response (cyclomatic 51)

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

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

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

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

Could not be resolved — 11

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

Methodology & how to trust this report

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

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

What we checked — 93 dimensions across the health lenses
D1D2D3D4D5D6D9D10D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6AX9C2DM4DM5DM6ES1ES2M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a174ff-2788-72fc-a7d2-a7265c2cb50f.

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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs 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 82.4% — 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. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 995 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 84 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in documentation/ (11 tests); vitest via `npm install --ignore-scripts` (no lockfile) in oidc-proxy/ (11 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in ui/desktop/; node:test via `pnpm install --frozen-lockfile --ignore-scripts` in ui/goose-acp/): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in ui/desktop/ was NOT MEASURED: the dependency install for ui/desktop/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in ui/goose-acp/ was NOT MEASURED: the dependency install for ui/goose-acp/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 3 dependency(ies) and leaving 1 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `documentation/docusaurus.config.ts`, `ui/desktop/src/acp/config.ts`, `ui/desktop/src/vite-env.d.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 62 further occurrence(s) are not listed individually; the score already reflects all 102.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (documentation/docs/docker/docker-compose.yml). compose up failed (exit 17 — an image could not be built) — failed to solve: rust:bullseye: failed to resolve source metadata for docker.io/library/rust:bullseye: failed to do request: Head "https://registry-1.docker.io/v2/library/rust/manifests/bullseye": Forbidden; runtime evidence skipped.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Kotlin, Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Kotlin, Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P2 Observability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 159 further occurrence(s) are not listed individually; the score already reflects all 199.
  • P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 138 further occurrence(s) are not listed individually; the score already reflects all 178.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 215 further occurrence(s) are not listed individually; the score already reflects all 255.

Repo exclusion declarations: 8 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.5 / 10Adequate✓ 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 5.5 / 10 · rule-coverage 100% · ceiling Prevented

242 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SwitchModelModal.SwitchModelModal at 107. A further 6 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 goose_cli::cli::cli at 24 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: REDACTED (github_manager.person at 21), ui/desktop/src/utils/toolIconMapping.tsx (toolIconMapping.getToolIcon at 19), ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx (ExtensionModal.ExtensionModal::hasFormChanges at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

goose::agents::platform_extensions::analyze::parser::extract_inheritance (cyclomatic 51) · ×24crates/goose/src/agents/platform_extensions/analyze/parser.rs:197
goose_provider_types::formats::openai::response_to_streaming_message (cyclomatic 93) · ×20crates/goose-provider-types/src/formats/openai.rs:1267
goose_cli::session::input::handle_slash_command (cyclomatic 30) · ×14crates/goose-cli/src/session/input.rs:220
SessionStorage::apply_update (cyclomatic 79) · ×3REDACTED:1911
CliSession::process_agent_response (cyclomatic 51) · ×3crates/goose-cli/src/session/mod.rs:1310

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

What to do

  1. Bring the 13 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with SwitchModelModal.SwitchModelModal (cyclomatic 107), McpAppRenderer.McpAppRenderer (cyclomatic 104), main.appMain (cyclomatic 94). — 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 5.5 to about 6.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

424 method(s) exceeded the cognitive complexity threshold of 15; the worst was goose_provider_types::formats::openai::response_to_streaming_message at 364.

goose::agents::platform_extensions::analyze::parser::extract_inheritance (cognitive 121) · ×78crates/goose/src/agents/platform_extensions/analyze/parser.rs:197
goose_cli::commands::configure::configure_single_key (cognitive 97) · ×36crates/goose-cli/src/commands/configure.rs:709
goose_provider_types::formats::openai::response_to_streaming_message (cognitive 364) · ×35crates/goose-provider-types/src/formats/openai.rs:1267
goose_local_inference::llamacpp::inference_native_tools::generate_with_native_tools (cognitive 109) · ×11crates/goose-local-inference/src/llamacpp/inference_native_tools.rs:14
goose_providers::live::run_actor (cognitive 45) · ×6crates/goose-providers/src/live.rs:190

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

What to do

  1. Bring the 7 bodies over 120 down to 120 or less in Cognitive Complexity — start with goose_provider_types::formats::openai::response_to_streaming_message (cognitive 364), goose_mcp::computercontroller::pdf_tool::pdf_tool (cognitive 245), goose_provider_types::formats::anthropic::response_to_streaming_message (cognitive 142). — 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 7 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

269 god class(es) detected.

FunctionTooLong: ChatInput.ChatInput · ×140ui/desktop/src/components/ChatInput.tsx:219
FileTooLong: REDACTED · ×72REDACTED
ClassTooLong: SessionStorage · ×24REDACTED:837
MethodTooLong: CliSession.process_agent_response · ×22crates/goose-cli/src/session/mod.rs:1310
TooManyMethods: GooseAcpAgent · ×10crates/goose/src/acp/server.rs:313

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

What to do

  1. Resolve the 140 FunctionTooLong finding(s) in God Classes — start with cli.rs (4), configure.rs (3), McpAppRenderer.tsx (2). — One of this dimension's main actionable groups (140 warning-level).
  2. Resolve the 72 FileTooLong finding(s) in God Classes — start with mod.rs (6), openai.rs (2), handler.rs (2). — One of this dimension's main actionable groups (72 warning-level).
  3. Resolve the 24 ClassTooLong finding(s) in God Classes — start with mod.rs (2), REDACTED, server.rs. — One of this dimension's main actionable groups (24 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

230 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .tsx (16% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (7 lines × 2) · ×20crates/goose-providers/src/anthropic.rs:386
Duplicated block (11 lines × 2) · ×18crates/goose-agent/src/inference.rs:230
Duplicated block (8 lines × 2) · ×17crates/goose-mcp/src/autovisualiser/mod.rs:774
Duplicated block (12 lines × 2) · ×14crates/goose-cli/src/session/output.rs:1311
Duplicated block (9 lines × 2) · ×14crates/goose-cli/src/commands/review/handler.rs:388

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

What to do

  1. Resolve the 20 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with chatgpt_codex.rs (3), claude_code.rs (3), anthropic.rs. — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 18 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with handler.rs (2), databricks.rs (2), inference.rs. — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 17 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), databricks.rs (2), thinking.rs. — One of this dimension's main actionable groups (17 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling7.8 / 10Strong✓ Tool-verified

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

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

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

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

26 production modules (Gradle+Cargo+npm+Python), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 6 module(s) off the main sequence, with abstractness counted on 20 of the 26 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: @aaif/goose-acp-client · ×6
Unstable project goose (Cargo)

What to do

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

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

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

9 of 255 classes have LCOM4 above 3.

Low cohesion: GooseAcpAgent (LCOM4 48) · ×9crates/goose/src/acp/server.rs:313

What to do

  1. Resolve the 9 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs (2), server.rs, model.rs. — One of this dimension's main actionable groups (9 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution9.9 / 10Exemplary✓ Tool-verified

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

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

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

5069 test methods: 4700 unit, 338 integration, 0 BDD, 31 e2e. The JavaScript/TypeScript suite contributes 995 `it`/`test` case(s) across 127 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 4072 `#[test]` function(s) across 372 file(s) declaring at least one; its unit/integration split is Cargo's own — 51 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 2 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.9 / 10Stronggated by 6 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Prevented

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

No assertions: ${label} — $provider / $model · ×5ui/desktop/tests/integration/test_providers_lib.ts:310
Skipped test: ${label} — $provider / $model — $skippedReasonui/desktop/tests/integration/test_providers_lib.ts:332
Mock-dominated test: shows the scoped-parameter incompatibility before returning home · ×7ui/desktop/src/App.test.tsx:302
Skipped (documented): (unnamed test) · ×15ui/desktop/src/desktopFileAccess.test.ts:72

What to do

  1. Resolve the 7 Mock-dominated test finding(s) in Test Quality — start with chatSessionController.test.ts (2), App.test.tsx, ChatSessionsContainer.test.tsx. — One of this dimension's main actionable groups (7 recommendation-level).
  2. Resolve the 5 No assertions finding(s) in Test Quality — start with test_providers_lib.ts (2), performance.spec.ts (2), app.spec.ts. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 1 Skipped test finding(s) in Test Quality — start with test_providers_lib.ts. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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

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

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

1 secret(s) detected.

REDACTED

What to do

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

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

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 of 1109 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. A further 1 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. 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 REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: ansi_colours

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).

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

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

Top hotspots: ui/desktop/src/components/ChatInput.tsx (11×281=3091); crates/goose-provider-types/src/formats/openai.rs (27×93=2511); ui/desktop/src/main.ts (21×94=1974) Repeated repair below the complexity floor: crates/goose-provider-types/src/base.rs (10 of 19 changes were fixes); crates/goose-providers/src/anthropic.rs (10 of 18 changes were fixes); crates/goose-provider-types/src/model.rs (7 of 11 changes were fixes)

Hotspot: ui/desktop/src/components/ChatInput.tsx · ×65ui/desktop/src/components/ChatInput.tsx:219
Repeated repair: crates/goose-provider-types/src/base.rs · ×29crates/goose-provider-types/src/base.rs:432

What to do

  1. Resolve the 65 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), databricks.rs (2), bedrock.rs (2). — One of this dimension's main actionable groups (65 warning-level).
  2. Resolve the 29 Repeated repair finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), base.rs, anthropic.rs. — One of this dimension's main actionable groups (29 warning-level).

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

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

37 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/goose/src/hints/import_files.rs. Counted over 642 of the 941 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 · ×4
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 24 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

24 deducted task-comment markers across 318993 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 · ×24ui/desktop/src/recipe/index.ts:19

What to do

  1. Resolve the 24 TodoComment finding(s) in Explicit Debt — start with mod.rs (5), extension_data.rs (4), index.ts. — One of this dimension's main actionable groups (24 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

1 of 1 documentation facets pass in full. 203 document(s) read across 1 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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — 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.

D26 · Project Cohesion6.7 / 10Adequate✓ Tool-verified

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

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

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

4 of 24 build units (Cargo, Gradle, Python, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

60 finding(s): 0 critical, 25 high, 35 medium, 0 low. semgrep hit a parse error in 16 file(s) — `bin/activate-hermit` (line 12), `bin/activate-hermit.fish` (lines 8–24), `crates/goose-cli/src/cli.rs` (line 1798, lines 1799–1800, line 2864), `crates/goose/src/acp/provider.rs` (line 1235, line 1409, line 1438), `crates/goose/src/acp/server.rs` (line 3878, line 3898), … (+11 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 13 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

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

What to do

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

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

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

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

80 finding(s): 5 critical, 42 high, 27 medium, 6 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 40 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17), REDACTED (14), REDACTED (7). — One of this dimension's main actionable groups (40 issue-level).
  2. Resolve the 5 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

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

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

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

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

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

7 finding(s): 0 critical, 2 high, 2 medium, 3 low.

REDACTED
REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness9.4 / 10Adequategated by 1 critical finding✓ 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.4 / 10 · rule-coverage 100% · ceiling Documented

38 of 642 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/goose/src/agents/platform_extensions/analyze/parser.rs. Counted over 642 of the 941 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgecrates/goose/src/agents/platform_extensions/analyze/parser.rs:1
Orphaned file · ×37crates/goose/src/agents/platform_extensions/analyze/format.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with parser.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 37 Orphaned file finding(s) in Knowledge Freshness — start with format.rs, prepare_aggregate_metrics.py, languages.rs. — One of this dimension's main actionable groups (37 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.8 / 10Stronggated by 17 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.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: main.ts↔preload.ts 93%; agent.rs↔subagent_task_config.rs 83%; claude_acp.rs↔codex_acp.rs 83%

Change coupling: main.ts ↔ preload.ts · ×14ui/desktop/src/main.ts:1
Change-coupling hub: agent.rs → ext_manager.rs, platform_tools.rs, prompt_manager.rs, reply_parts.rs, retry.rs, subagent_task_config.rs · ×2crates/goose/src/agents/agent.rs
Change coupling clique: claude_acp.rs, codex_acp.rs, pi_acp.rscrates/goose/src/providers/claude_acp.rs

What to do

  1. Resolve the 14 Change coupling finding(s) in Change Coupling — start with mod.rs (3), main.ts, schedule_tool.rs. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with agent.rs, claude_code.rs. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with claude_acp.rs. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  2. 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).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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 5 platform declaration(s) and 6 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 alternatives4.5 / 10Weak✓ Tool-verified

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

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

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

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — crates/goose/src/goose_apps/clock.html:89
  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — crates/goose/src/session/export_html/template.js:243, crates/goose/src/session/export_html/template.js:402

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 & labels4.1 / 10Weak✓ Tool-verified

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

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

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

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×15) — ui/desktop/src/components/ChatInput.tsx:1571, ui/desktop/src/components/LauncherView.tsx:42, ui/desktop/src/components/SessionActionsHeader.tsx:597, …
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — ui/desktop/src/components/MessageQueue.tsx:422, ui/desktop/src/components/onboarding/LocalModelPicker.tsx:325, ui/desktop/src/components/onboarding/LocalModelPicker.tsx:387, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — ui/desktop/src/components/alerts/AlertBox.tsx:177, ui/desktop/src/components/alerts/AlertBox.tsx:199
  • 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. (×3) — ui/desktop/src/components/onboarding/ProviderSelector.tsx:183, ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:191, ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:231
  • 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. (×15) — ui/desktop/src/components/parameter/ParameterInput.tsx:173, ui/desktop/src/components/parameter/ParameterInput.tsx:191, ui/desktop/src/components/parameter/ParameterInput.tsx:209, …

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

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×15) — REDACTED:2, REDACTED:2, REDACTED:2, …
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×5) — crates/goose/src/config/signup_openrouter/templates/error.html:2, crates/goose/src/config/signup_openrouter/templates/invalid.html:2, crates/goose/src/config/signup_openrouter/templates/success.html:2, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — ui/desktop/src/components/apps/AppsView.tsx:322

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 semantics2.9 / 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. — crates/goose/src/session/export_html/template.js:366
  • The repo's own CSS styles .thinking-block with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — crates/goose/src/session/export_html/template.js:372
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×9) — ui/desktop/src/components/ImagePreview.tsx:42, ui/desktop/src/components/Layout/NavigationPanel.tsx:198, ui/desktop/src/components/MentionPopover.tsx:640, …
  • 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. (×2) — ui/desktop/src/components/MessageQueue.tsx:370, ui/desktop/src/components/bottom_menu/BottomMenuAlertPopover.tsx:245
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. — ui/desktop/src/components/common/InlineEditText.tsx:190
  • An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. (×5) — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:66, ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:128, ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:43, …

What to do

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

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

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

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

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

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

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

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

  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — ui/desktop/src/components/ChatInput.tsx:1571
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×5) — ui/desktop/src/components/GitBranchIndicator.tsx:137, ui/desktop/src/components/LauncherView.tsx:42, ui/desktop/src/components/conversation/SearchBar.tsx:190, …
  • `.bg-inline-code` sets color: #ff7235 on background-color: #f4f6f7 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — ui/desktop/src/styles/main.css:556
  • `.video` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — documentation/src/components/HomepageFeatures/styles.module.css:29
  • `.communityCard` moves (`transition: border-color 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — documentation/src/pages/index.module.css:257
  • `.navbar__item` moves (`transition: opacity 0.3s ease, transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — documentation/src/css/custom.css:321
  • `.navbar__toggle` moves (`transition: opacity 0.3s ease, transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — documentation/src/css/custom.css:327
  • `.card-glow` moves (`animation: rotate 6s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — documentation/src/css/extensions.css:73
  • `.dropdown` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — documentation/src/components/SocialShare/styles.module.css:52

What to do

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

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

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

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

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

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.6 / 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.

What to do

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

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

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

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

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

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

AX6 · Interface segregation9.8 / 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.

  • `AcpChatSessionActions` declares 24 required operations: `deleteSnapshot`, `applyAcpSessionNotification`, `applyAcpGooseSessionNotification`, `applyPermissionRequest`, `cancelPermissionRequest`, `applyElicitationRequest`, `setElicitationStatus`, `setSessionMetadata`, `startSessionLoad`, `finishSessionLoad`, `failSessionLoad`, `setSessionLoadError`, `setMessages`, `addPendingLocalSteerMessage`, `setChatState`, `resolveUserInputRequest`, `startPromptAttempt`, `startPromptCancellation`, `clearPromptCancellation`, `restorePromptCancellation`, `waitForPromptCancellation`, `finishPromptAttemptIfCurrent`, `clearActivePromptAttempt`, `isCurrentPromptAttempt`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — ui/desktop/src/acp/chatSessionStore.ts:62

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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.

DM4 · Rich vs anemic domain model7.9 / 10Strong✓ Tool-verified

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

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

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

  • `Usage` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. — crates/goose-sdk/src/bindings.rs:554

What to do

  • Move the domain logic onto the entity (invariant-enforcing `&mut self` commands) instead of a foreign service.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

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.

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

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

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

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

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 13 of 32 project(s) that lack one — worth up to 0.8 pts.
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.

What to do

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

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

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

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

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

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

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

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

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

P10 · Library API & 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 model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

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

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

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

  • Only 12/18 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/goose-sdk`, `crates/goose-sdk/examples/uniffi/kotlin`, `crates/goose-test`, `crates/goose-test-support` and 1 more.
  • `services/ask-ai-bot/utils/discord/server-context.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — services/ask-ai-bot/utils/discord/server-context.ts:35
  • `ui/desktop/src/gooseServe.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/gooseServe.ts:18
  • `ui/desktop/src/gooseServe.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/gooseServe.ts:19
  • `ui/desktop/src/proxy.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/proxy.ts:19
  • `ui/desktop/src/proxy.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/proxy.ts:26
  • `ui/desktop/src/App.tsx` reports through `console.*` at line 157 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/App.tsx:157
  • `ui/desktop/src/App.tsx` reports through `console.*` at line 432 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/App.tsx:432
  • `ui/desktop/src/App.tsx` reports through `console.*` at line 464 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/App.tsx:464
  • `ui/desktop/src/App.tsx` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/App.tsx:522
  • `ui/desktop/src/renderer.tsx` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/renderer.tsx:20
  • `ui/desktop/src/renderer.tsx` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/renderer.tsx:26
  • `ui/desktop/src/toasts.tsx` reports through `console.*` at line 188 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/toasts.tsx:188
  • `ui/desktop/src/utils/csp.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/csp.ts:51
  • `ui/desktop/src/utils/date.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/date.ts:21
  • `ui/desktop/src/utils/localMessageStorage.ts` reports through `console.*` at line 32 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/localMessageStorage.ts:32
  • `ui/desktop/src/utils/localMessageStorage.ts` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/localMessageStorage.ts:41
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:21
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:35
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:43
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:51
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 57 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:57
  • `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 86 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/platform_events.ts:86
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:26
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:35
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:48
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 61 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:61
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 66 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:66
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 70 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:70
  • `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 84 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/utils/recentDirs.ts:84
  • `ui/desktop/src/hooks/useAudioRecorder.ts` reports through `console.*` at line 147 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useAudioRecorder.ts:147
  • `ui/desktop/src/hooks/useChatSession.ts` reports through `console.*` at line 130 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useChatSession.ts:130
  • `ui/desktop/src/hooks/useChatSession.ts` reports through `console.*` at line 265 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useChatSession.ts:265
  • `ui/desktop/src/hooks/useChatSession.ts` reports through `console.*` at line 284 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useChatSession.ts:284
  • `ui/desktop/src/hooks/useChatSession.ts` reports through `console.*` at line 318 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useChatSession.ts:318
  • `ui/desktop/src/hooks/useFileDrop.ts` reports through `console.*` at line 60 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useFileDrop.ts:60
  • `ui/desktop/src/hooks/useFileDrop.ts` reports through `console.*` at line 92 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useFileDrop.ts:92
  • `ui/desktop/src/hooks/useFileDrop.ts` reports through `console.*` at line 105 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useFileDrop.ts:105
  • `ui/desktop/src/hooks/useNavigationSessions.ts` reports through `console.*` at line 91 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useNavigationSessions.ts:91
  • `ui/desktop/src/hooks/useNavigationSessions.ts` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ui/desktop/src/hooks/useNavigationSessions.ts:108

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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.

What to do

  • Dependabot is configured but does not watch `pip`, `gradle` — add those `package-ecosystem` entries 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 & Backup7.0 / 10Strong✓ Tool-verified

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

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

What to do

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

  • `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — crates/goose-cli/src/commands/update.rs:135, crates/goose/src/bin/build_canonical_models.rs:327, crates/goose/src/posthog.rs:80, …
  • `reqwest::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. — crates/goose-cli/src/commands/update.rs:330
  • `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/goose/src/agents/extension_manager/streamable_http.rs:224
  • `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. (×3) — documentation/scripts/community_stars.py:55, documentation/scripts/community_stars.py:70, documentation/scripts/community_stars.py:97
  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — documentation/src/utils/github-stars.ts:81, documentation/src/utils/mcp-servers.ts:7

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
  • 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.
  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `export` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. (×3) — crates/goose/src/otel/otlp.rs:80, crates/goose/src/otel/otlp.rs:116, crates/goose/src/otel/otlp.rs:148
  • `execute_with_slots` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — crates/goose/src/agents/platform_extensions/javascript.rs:361
  • `fs.mkdirSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — documentation/plugins/markdown-export.cjs:33
  • `fs.readFileSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — documentation/plugins/markdown-export.cjs:35
  • `fs.writeFileSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — documentation/plugins/markdown-export.cjs:41

What to do

  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.6 / 10Exemplary✓ Tool-verified

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

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

What to do

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

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

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

  • 46 duplicated blocks under ui/desktop/src/components/ have copies in at least two of the sibling directories Layout, apps, bottom_menu, common, extensions, onboarding (+7 more sibling(s) not listed) — 16 of them are reported below, and 30 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 46 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 46 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 46 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. — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111
  • 24 duplicated blocks under ui/desktop/src/components/settings/ have copies in at least two of the sibling directories app, auth, chat, dictation, extensions, keyboard (+7 more sibling(s) not listed) — 12 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 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 24 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. — ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60
  • ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:34 · ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx:38 — the two spans are one implementation copied and then locally edited — 826 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:34
  • ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:155 · ui/desktop/src/components/recipes/shared/SubRecipeModal.tsx:111 — the two spans are one implementation copied and then locally edited — 723 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:155
  • ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:33 · ui/desktop/src/components/recipes/shared/JsonSchemaEditor.tsx:33 — the two spans are one implementation copied and then locally edited — 478 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:33
  • ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 · ui/desktop/src/components/schedule/SchedulesView.tsx:237 — the two spans are one implementation copied and then locally edited — 579 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100
  • ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60 · ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:152 — the two spans are one implementation copied and then locally edited — 477 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60
  • ui/desktop/src/acp/recipe.ts:9 · ui/desktop/src/acp/schedules.ts:12 — the two spans are one implementation copied and then locally edited — 349 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/acp/recipe.ts:9
  • ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111 · ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:393 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111
  • ui/desktop/src/components/settings/security/SecurityToggle.tsx:390 · ui/desktop/src/components/settings/security/SecurityToggle.tsx:467 — the two spans are one implementation copied and then locally edited — 216 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/settings/security/SecurityToggle.tsx:390
  • ui/desktop/src/components/recipes/RecipesView.tsx:853 · ui/desktop/src/components/skills/SkillsView.tsx:155 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/recipes/RecipesView.tsx:853
  • ui/desktop/src/components/extensions/ExtensionsView.tsx:146 · ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:213 — the two spans are one implementation copied and then locally edited — 186 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/extensions/ExtensionsView.tsx:146
  • ui/desktop/src/components/recipes/RecipesView.tsx:567 · ui/desktop/src/components/recipes/RecipesView.tsx:627 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/recipes/RecipesView.tsx:567
  • ui/desktop/src/utils/autoUpdater.ts:156 · ui/desktop/src/utils/autoUpdater.ts:477 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/utils/autoUpdater.ts:156
  • ui/desktop/scripts/generate-mac-update-manifest.js:53 · ui/desktop/scripts/generate-windows-update-manifest.js:44 — the two spans are one implementation copied and then locally edited — 200 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/scripts/generate-mac-update-manifest.js:53
  • ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:178 · ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:258 — the two spans are one implementation copied and then locally edited — 202 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:178
  • ui/desktop/scripts/generate-mac-update-manifest.js:14 · ui/desktop/scripts/generate-windows-update-manifest.js: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. — ui/desktop/scripts/generate-mac-update-manifest.js:14
  • ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:244 · ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:273 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:244
  • ui/desktop/src/components/conversation/SearchView.tsx:214 · ui/desktop/src/components/conversation/SearchView.tsx:242 — the two spans are one implementation copied and then locally edited — 114 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/conversation/SearchView.tsx:214
  • ui/desktop/src/components/icons/CodeXml.tsx:1 · ui/desktop/src/components/icons/Cog.tsx:1 · ui/desktop/src/components/icons/GalleryHorizontalEnd.tsx:1 · ui/desktop/src/components/icons/Grape.tsx:1 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — ui/desktop/src/components/icons/CodeXml.tsx:1
  • ui/desktop/src/components/icons/Fuel.tsx:1 · ui/desktop/src/components/icons/Gavel.tsx:1 — 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. — ui/desktop/src/components/icons/Fuel.tsx:1
  • ui/desktop/src/components/TelemetryConsentPrompt.tsx:91 · ui/desktop/src/components/onboarding/OnboardingSuccess.tsx:83 — the two spans are one implementation copied and then locally edited — 148 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/components/TelemetryConsentPrompt.tsx:91
  • ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:358 · ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:358
  • ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:20 · ui/desktop/src/components/settings/permission/PermissionSetting.tsx:21 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:20
  • ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:65 · ui/desktop/src/components/settings/permission/PermissionSetting.tsx:62 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:65
  • ui/desktop/src/components/recipes/RecipesView.tsx:468 · ui/desktop/src/components/recipes/RecipesView.tsx: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. — ui/desktop/src/components/recipes/RecipesView.tsx:468
  • ui/desktop/src/components/schedule/SchedulesView.tsx:378 · ui/desktop/src/components/schedule/SchedulesView.tsx:406 · ui/desktop/src/components/schedule/SchedulesView.tsx:434 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/schedule/SchedulesView.tsx:378
  • ui/desktop/src/components/sessions/SessionListView.tsx:885 · ui/desktop/src/components/sessions/SessionListView.tsx:936 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — ui/desktop/src/components/sessions/SessionListView.tsx:885
  • ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:527 · ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:527
  • ui/desktop/src/main.ts:584 · ui/desktop/src/main.ts:661 — the two spans are one implementation copied and then locally edited — 163 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/desktop/src/main.ts:584
  • ui/desktop/src/acp/capabilities.ts:18 · ui/desktop/src/acp/capabilities.ts:39 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/acp/capabilities.ts:18
  • ui/desktop/src/components/settings/extensions/agent-api.ts:16 · ui/desktop/src/components/settings/extensions/agent-api.ts:55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/components/settings/extensions/agent-api.ts:16
  • ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:669 · ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:696 · ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:798 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:669
  • ui/desktop/src/components/GooseMessage.tsx:114 · ui/desktop/src/components/GooseMessage.tsx:206 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — ui/desktop/src/components/GooseMessage.tsx:114
  • ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:63 · ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:40 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:63
  • ui/desktop/src/components/recipes/RecipesView.tsx:706 · ui/desktop/src/components/recipes/RecipesView.tsx:788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/components/recipes/RecipesView.tsx:706
  • ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:137 · ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:156 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:137
  • ui/desktop/src/desktopFileAccess.ts:159 · ui/desktop/src/desktopFileAccess.ts:261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ui/desktop/src/desktopFileAccess.ts:159
  • ui/desktop/src/components/ChatInput.tsx:1641 · ui/desktop/src/components/ChatInput.tsx:1699 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ui/desktop/src/components/ChatInput.tsx:1641
  • ui/desktop/src/components/schedule/CronPicker.tsx:249 · ui/desktop/src/components/schedule/CronPicker.tsx:288 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — ui/desktop/src/components/schedule/CronPicker.tsx:249

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

  • ui/desktop/src/components/MarkdownContent.tsx:9 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. — ui/desktop/src/components/MarkdownContent.tsx:9
  • ui/goose-acp-client/src/index.ts:3 reaches into another package with a relative path (./generated/index.js) — import the package by name instead. — ui/goose-acp-client/src/index.ts:3

What to do

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

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

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

  • ChatInput has cyclomatic complexity 59 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. — ui/desktop/src/components/ChatInput.tsx:219
  • (anonymous) has cyclomatic complexity 54 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/ToolCallWithResponse.tsx:597
  • (anonymous) has cyclomatic complexity 48 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/main.ts:999
  • CustomProviderForm has cyclomatic complexity 48 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257
  • GooseMessage has cyclomatic complexity 47 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/GooseMessage.tsx:47
  • SecurityToggle has cyclomatic complexity 41 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/security/SecurityToggle.tsx:184
  • BaseChat has cyclomatic complexity 41 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/BaseChat.tsx:74
  • appMain has cyclomatic complexity 39 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. — ui/desktop/src/main.ts:2414
  • ProviderConfigurationModal has cyclomatic complexity 36 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:179
  • SwitchModelModal has cyclomatic complexity 36 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:252
  • MessageUsageStats has cyclomatic complexity 34 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/MessageUsageStats.tsx:112
  • McpAppRenderer has cyclomatic complexity 32 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502
  • LiveVoiceButton has cyclomatic complexity 31 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/LiveVoiceButton.tsx:55
  • (anonymous) has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/MentionPopover.tsx:194
  • (anonymous) has cyclomatic complexity 30 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/ItemIcon.tsx:31
  • renderContentBlock has cyclomatic complexity 27 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/goose/src/session/export_html/template.js:359
  • AcpReadinessPanel has cyclomatic complexity 27 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:64
  • parseCommandLine has cyclomatic complexity 26 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/settings/extensions/utils.ts:223
  • ScheduleDetailView has cyclomatic complexity 25 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100
  • ToolCallView has cyclomatic complexity 25 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ui/desktop/src/components/ToolCallWithResponse.tsx:501

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.7 / 10Adequate✓ Tool-verified

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

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

  • ui/desktop/src/main.ts has 2737 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/main.ts:1
  • ui/desktop/src/components/ChatInput.tsx has 1784 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/ChatInput.tsx:1
  • ui/desktop/src/components/ToolCallWithResponse.tsx has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/ToolCallWithResponse.tsx:1
  • ui/desktop/src/components/McpApps/McpAppRenderer.tsx has 1031 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/McpApps/McpAppRenderer.tsx:1
  • ui/desktop/src/components/sessions/SessionListView.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. — ui/desktop/src/components/sessions/SessionListView.tsx:1
  • ui/desktop/src/components/recipes/RecipesView.tsx has 995 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/recipes/RecipesView.tsx:1
  • ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx has 951 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:1
  • ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx has 927 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:1
  • ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx has 756 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:1
  • ui/desktop/src/utils/autoUpdater.ts has 749 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/utils/autoUpdater.ts:1
  • ui/desktop/src/acp/chatSessionStore.ts has 699 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/acp/chatSessionStore.ts:1
  • ui/desktop/src/utils/githubUpdater.ts has 699 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/utils/githubUpdater.ts:1
  • ui/desktop/src/components/SessionActionsHeader.tsx has 639 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/SessionActionsHeader.tsx:1
  • ui/desktop/src/App.tsx has 626 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/App.tsx:1
  • ui/desktop/src/components/MentionPopover.tsx has 613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/MentionPopover.tsx:1
  • ui/desktop/src/utils/analytics.ts has 600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/utils/analytics.ts:1
  • ui/desktop/src/components/McpApps/PipWindow.tsx has 594 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/McpApps/PipWindow.tsx:1
  • ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx has 588 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:1
  • ui/desktop/src/components/settings/app/AppSettingsSection.tsx has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/app/AppSettingsSection.tsx:1
  • ui/desktop/src/components/BaseChat.tsx has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/BaseChat.tsx:1
  • ui/desktop/src/components/schedule/SchedulesView.tsx has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/schedule/SchedulesView.tsx:1
  • ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx has 569 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:1
  • ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:1
  • crates/goose/src/session/export_html/template.js has 563 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/goose/src/session/export_html/template.js:1
  • ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:1
  • ui/desktop/src/components/schedule/ScheduleModal.tsx has 557 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/schedule/ScheduleModal.tsx:1
  • ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:1
  • ui/desktop/src/gooseServe.ts has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/gooseServe.ts:1
  • ui/desktop/src/components/MessageQueue.tsx has 522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/MessageQueue.tsx:1
  • ui/desktop/src/components/settings/AgentLoopSettings.tsx has 515 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/AgentLoopSettings.tsx:1
  • ui/desktop/src/components/settings/security/SecurityToggle.tsx has 515 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/security/SecurityToggle.tsx:1
  • ui/desktop/src/components/schedule/ScheduleDetailView.tsx has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/schedule/ScheduleDetailView.tsx:1
  • ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx:1
  • ui/desktop/src/components/onboarding/LocalModelPicker.tsx has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/onboarding/LocalModelPicker.tsx:1
  • ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx has 415 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:1
  • ui/desktop/src/components/Layout/NavigationPanel.tsx has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/desktop/src/components/Layout/NavigationPanel.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.1 / 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. (×38) — crates/goose/src/session/export_html/template.js:1, ui/desktop/scripts/prepare-platform-binaries.js:1, REDACTED:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness7.7 / 10Strong✓ 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.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code9.3 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 21 file(s) (~1561 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: services/ask-ai-bot/index.ts imports './.discraft/commands/index', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — services/ask-ai-bot
  • Unreachable from the 70 application, 25 tooling and 133 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 (70 application, 25 tooling, 133 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×3) — ui/desktop/src/components/settings/mode/ConversationLimitsDropdown.tsx, ui/desktop/scripts/sign-windows-installer.js, ui/desktop/scripts/build-main.js
  • Nothing imports this binding — it is safe to review for removal. (×9) — REDACTED:283, ui/desktop/src/i18n/index.ts:22, ui/desktop/src/recipe/recipe_management.ts:66, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in ui/desktop/src/components/icons/toolcalls/index.tsx, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in ui/desktop/src/components/icons/toolcalls/index.tsx in the same commit, or the barrel will import a name that no longer exists. (×3) — ui/desktop/src/components/icons/toolcalls/Archive.tsx:1, ui/desktop/src/components/icons/toolcalls/Globe.tsx:1, ui/desktop/src/components/icons/toolcalls/Settings.tsx:1
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — oidc-proxy/test/index.test.js:97

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) — ui/desktop/src/components/MarkdownContent.test.tsx:3, ui/desktop/src/allowlistFetcher.ts:2

What to do

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

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

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

  • ui/desktop/src/acp/acpConnection.ts → ui/desktop/src/acp/chatNotifications.ts → ui/desktop/src/utils/platform_events.ts → ui/desktop/src/acp/mcp-apps.ts → ui/desktop/src/acp/acpConnection.ts — ui/desktop/src/acp/acpConnection.ts:6
  • ui/desktop/src/acp/chatSessionController.ts → ui/desktop/src/utils/extensionErrorUtils.ts → ui/desktop/src/toasts.tsx → ui/desktop/src/components/GroupedExtensionLoadingToast.tsx → ui/desktop/src/sessions.ts → ui/desktop/src/acp/chatSessionController.ts — ui/desktop/src/acp/chatSessionController.ts:6
  • ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx → ui/desktop/src/components/settings/extensions/subcomponents/ExtensionList.tsx → ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx — ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx:6
  • ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx → ui/desktop/src/components/settings/keyboard/ShortcutRecorder.tsx → ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:6
  • ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx → ui/desktop/src/components/settings/mode/ModeSelectionItem.tsx → ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx — ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx:4

What to do

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

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

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

  • Set: Content-Security-Policy, Referrer-Policy. Missing: Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−1.5 on this card.) The server: `axum_server::bind_rustls(` (crates/goose-cli/src/cli.rs:1890).

What to do

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

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

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

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

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

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

X13 · Undrained process stream5.9 / 10Adequate✓ Tool-verified

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.

  • `spawn` pipes `stderr` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `ps.stderr`, while `ps.stdout` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stderr (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`ps.stderr.on('data', …)`, or `ps.stderr.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot. — ui/desktop/src/main.ts:2264

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.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X2 · Cancellation propagation5.7 / 10Adequate✓ Tool-verified

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

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

  • Only 2/7 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `downloadUpdate` 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 })`. — ui/desktop/src/utils/githubUpdater.ts:632
  • `fetchJwks` 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 })`. — oidc-proxy/src/index.js:141
  • `fetchGitHubStars` 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 })`. — documentation/src/utils/github-stars.ts:71
  • `fetchMCPServers` 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 })`. — documentation/src/utils/mcp-servers.ts:5
  • `fetchLatestRelease` 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 })`. — documentation/src/components/LinuxDesktopInstallButtons.js:37

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

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

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

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

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

X24 · Document value interpolated into markup unescaped5.5 / 10Adequate✓ 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.

  • `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. (×2) — crates/goose/src/session/export_html/template.js:114, crates/goose/src/session/export_html/template.js:122
  • `e.id` is text this program did not author, and it is written into a URL attribute through markup built here 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. — crates/goose/src/session/export_html/template.js:469
  • `parts.join('')` is text this program did not author, and it is written into the text of an element through `innerHTML` 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. — crates/goose/src/session/export_html/template.js:531
  • `contentRef.current.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` 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. — ui/desktop/src/components/MessageCopyLink.tsx:32

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

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

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

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. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

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

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

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

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

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

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

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

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

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×16) — ui/goose-acp-client/generate-schema.ts:116, ui/desktop/src/main.ts:816, ui/desktop/src/main.ts:2207, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×7) — ui/desktop/src/App.tsx:450, ui/desktop/src/App.tsx:453, ui/desktop/src/components/GitBranchIndicator.tsx:54, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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. — ui/desktop/src/liveVoice/LiveVoiceMediaSession.ts:202
  • `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. — scripts/diagnostics-viewer.py:313

What to do

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

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

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

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

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

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

  • `info` at line 472 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. — scripts/provider-error-proxy/proxy.py:472
  • `info` at line 523 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. — scripts/provider-error-proxy/proxy.py:523
  • `info` at line 528 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. — scripts/provider-error-proxy/proxy.py:528
  • `info` at line 530 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. — scripts/provider-error-proxy/proxy.py:530
  • `warning` at line 545 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. — scripts/provider-error-proxy/proxy.py:545
  • `info` at line 547 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. — scripts/provider-error-proxy/proxy.py:547
  • `info` at line 588 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. — scripts/provider-error-proxy/proxy.py:588
  • `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. — scripts/provider-error-proxy/proxy.py:601
  • `info` at line 602 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. — scripts/provider-error-proxy/proxy.py:602
  • `info` 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.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. — scripts/provider-error-proxy/proxy.py:607
  • `info` at line 608 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. — scripts/provider-error-proxy/proxy.py:608
  • `error` at line 617 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.error("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.error("order moved", order_id=order_id, status=status)` with structlog. — scripts/provider-error-proxy/proxy.py:617
  • `error` at line 755 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.error("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.error("order moved", order_id=order_id, status=status)` with structlog. — scripts/provider-error-proxy/proxy.py:755
  • `info` at line 874 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. — scripts/provider-error-proxy/proxy.py:874
  • `warn!` at line 347 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-roaming/src/node.rs:347
  • `warn!` at line 516 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — crates/goose-roaming/src/node.rs:516, crates/goose-provider-types/src/formats/google.rs:516
  • `warn!` at line 532 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-roaming/src/node.rs:532
  • `warn!` at line 552 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-roaming/src/node.rs:552
  • `warn!` at line 606 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-roaming/src/node.rs:606
  • `debug!` at line 408 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-providers/src/anthropic.rs:408
  • `warn!` at line 314 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-providers/src/http_status.rs:314
  • `debug!` at line 551 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-providers/src/ollama.rs:551
  • `debug!` at line 814 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-providers/src/openai.rs:814
  • `warn!` at line 135 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/retry.rs:135
  • `warn!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/retry.rs:219
  • `warn!` at line 226 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/retry.rs:226
  • `warn!` at line 236 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/retry.rs:236
  • `info!` at line 259 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/retry.rs:259
  • `debug!` at line 726 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/anthropic.rs:726
  • `debug!` at line 1079 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/anthropic.rs:1079
  • `debug!` at line 1179 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/anthropic.rs:1179
  • `debug!` at line 1309 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/anthropic.rs:1309
  • `warn!` at line 332 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/google.rs:332
  • `debug!` at line 445 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/google.rs:445
  • `warn!` at line 503 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/google.rs:503
  • `warn!` at line 710 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/google.rs:710
  • `debug!` at line 458 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/openai_responses.rs:458
  • `debug!` at line 587 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/openai_responses.rs:587
  • `debug!` at line 319 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/goose-provider-types/src/formats/snowflake.rs:319

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types9.8 / 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.

  • ~0.4 `!` null assertions per 1k TypeScript source lines — 33 assertion(s) across the 79047 source line(s) of the 464 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: ui/desktop/src/utils/autoUpdater.ts (6), services/ask-ai-bot/utils/ai/tools/docs.ts (4), ui/desktop/src/components/ChatInput.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

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

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health61%Adequate — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture69%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity76%StrongSolid.
Readiness62%Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77%Adequate — gated by D28, D29, D30Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling91%ExemplarySolid.
Event Sourcing100%ExemplaryStrongest area.
Accessibility43%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 43 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: rust:bullseye: failed to resolve source metadata for docker.io/library/rust:bullseye: failed to do request: Head "https://registry-1.docker.io/v2/library/rust/manifests/bullseye": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 3 dependency(ies) and leaving 1 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Kotlin, Python, Rust, TypeScript, html not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .kt, .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — sqlx is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — coverage data present for 4 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 `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Kotlin code has 95 production line(s), 0 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

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 — 158 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×40
  • 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
  • + 15 more in this group — see findings.md.
AC2 · Forms & labels · <label> that labels no control · ×15
  • <label> that labels no control ui/desktop/src/components/parameter/ParameterInput.tsx:173 — 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 ui/desktop/src/components/parameter/ParameterInput.tsx:191 — 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 ui/desktop/src/components/parameter/ParameterInput.tsx:209 — 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 ui/desktop/src/components/parameter/ParameterInput.tsx:227 — 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 ui/desktop/src/components/parameter/ParameterInput.tsx:244 — 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 ui/desktop/src/components/recipes/RecipeActivityEditor.tsx:136 — 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 ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:397 — 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 ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:123 — 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 ui/desktop/src/components/recipes/shared/JsonSchemaEditor.tsx:143 — 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 ui/desktop/src/components/recipes/shared/RecipeExtensionSelector.tsx:217 — 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 ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:477 — 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 ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:570 — 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 ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:185 — 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 ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:206 — 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 ui/desktop/src/components/recipes/shared/SubRecipeEditor.tsx:121 — 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.
AC2 · Forms & labels · <input> without a programmatic label · ×13
  • <input> without a programmatic label ui/desktop/src/components/LauncherView.tsx:42 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/SessionActionsHeader.tsx:597 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/common/InlineEditText.tsx:166 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/conversation/SearchBar.tsx:190 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/onboarding/LocalModelPicker.tsx:325 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label ui/desktop/src/components/onboarding/LocalModelPicker.tsx:387 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label ui/desktop/src/components/parameter/ParameterInput.tsx:176 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/parameter/ParameterInput.tsx:230 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/recipes/RecipeActivityEditor.tsx:167 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/recipes/RecipesView.tsx:1034 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/recipes/shared/KeyValueEditor.tsx:66 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/recipes/shared/KeyValueEditor.tsx:74 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:486 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D28 · Secrets (history) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×8
  • Click handler on a non-interactive <div> crates/goose/src/session/export_html/template.js:366 — 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> ui/desktop/src/components/Layout/NavigationPanel.tsx:198 — 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> ui/desktop/src/components/MentionPopover.tsx:640 — 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> ui/desktop/src/components/common/InlineEditText.tsx:190 — 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> ui/desktop/src/components/onboarding/ProviderSelector.tsx:138 — 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> ui/desktop/src/components/onboarding/ProviderSelector.tsx:156 — 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> ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:558 — 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> ui/desktop/src/components/settings/providers/subcomponents/CardContainer.tsx:40 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels · <textarea> without a programmatic label · ×5
  • <textarea> without a programmatic label ui/desktop/src/components/ChatInput.tsx:1571 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label ui/desktop/src/components/MessageQueue.tsx:422 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <textarea> without a programmatic label ui/desktop/src/components/parameter/ParameterInput.tsx:247 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:140 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label ui/desktop/src/components/recipes/shared/JsonSchemaEditor.tsx:162 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC3 · Page structure · <html> without a lang · ×5
  • <html> without a lang crates/goose/src/config/signup_openrouter/templates/error.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang crates/goose/src/config/signup_openrouter/templates/invalid.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang crates/goose/src/config/signup_openrouter/templates/success.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang crates/goose/src/goose_apps/clock.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang ui/desktop/index.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×3
  • Import cycle (2 files) ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx:6 — ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx → ui/desktop/src/components/settings/extensions/subcomponents/ExtensionList.tsx → ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx
  • Import cycle (2 files) ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:6 — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx → ui/desktop/src/components/settings/keyboard/ShortcutRecorder.tsx → ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx
  • Import cycle (2 files) ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx:4 — ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx → ui/desktop/src/components/settings/mode/ModeSelectionItem.tsx → ui/desktop/src/components/settings/mode/ConfigureApproveMode.tsx
AC1 · Text alternatives · <img> without a text alternative · ×2
  • <img> without a text alternative crates/goose/src/session/export_html/template.js:243 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative crates/goose/src/session/export_html/template.js:402 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text ui/desktop/src/components/alerts/AlertBox.tsx:177 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text ui/desktop/src/components/alerts/AlertBox.tsx:199 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · <select> without a programmatic label · ×2
  • <select> without a programmatic label ui/desktop/src/components/parameter/ParameterInput.tsx:194 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/desktop/src/components/parameter/ParameterInput.tsx:212 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×2
  • Hover-only interaction on <div> ui/desktop/src/components/MessageQueue.tsx:370 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> ui/desktop/src/components/bottom_menu/BottomMenuAlertPopover.tsx:245 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×1
  • Clickable element isn't keyboard-operable crates/goose/src/session/export_html/template.js:372 — The repo's own CSS styles .thinking-block with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×1
  • Click handler on a non-interactive <img> ui/desktop/src/components/ImagePreview.tsx:42 — 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 non-interactive <p> · ×1
  • Click handler on a non-interactive <p> ui/desktop/src/components/MessageQueue.tsx:472 — 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 non-interactive <span> · ×1
  • Click handler on a non-interactive <span> ui/desktop/src/components/settings/app/AppSettingsSection.tsx:349 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D14 · License Compliance · Banned license · ×1
  • Banned license: ansi_colours — `ansi_colours` 1.2.3 is published on crates.io under `LGPL-3.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository's REDACTED — so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an `OR` is a choice and is only charged when every branch is banned, while an `AND` binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge crates/goose/src/agents/platform_extensions/analyze/parser.rs: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.
DM4 · Rich vs anemic domain model · Anemic domain model · ×1
  • Anemic domain model: Usage crates/goose-sdk/src/bindings.rs:554 — `Usage` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
R8 · Dependency Hygiene · Unlisted import '@testing-library/dom' · ×1
  • Unlisted import '@testing-library/dom' ui/desktop/src/components/MarkdownContent.test.tsx:3 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'yaml' · ×1
  • Unlisted import 'yaml' ui/desktop/src/allowlistFetcher.ts:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) ui/desktop/src/acp/acpConnection.ts:6 — ui/desktop/src/acp/acpConnection.ts → ui/desktop/src/acp/chatNotifications.ts → ui/desktop/src/utils/platform_events.ts → ui/desktop/src/acp/mcp-apps.ts → ui/desktop/src/acp/acpConnection.ts
R9 · Circular Imports · Import cycle (5 files) · ×1
  • Import cycle (5 files) ui/desktop/src/acp/chatSessionController.ts:6 — ui/desktop/src/acp/chatSessionController.ts → ui/desktop/src/utils/extensionErrorUtils.ts → ui/desktop/src/toasts.tsx → ui/desktop/src/components/GroupedExtensionLoadingToast.tsx → ui/desktop/src/sessions.ts → ui/desktop/src/acp/chatSessionController.ts
Serious — 1629 finding(s)
D3 · God Classes · FunctionTooLong · ×140
  • FunctionTooLong: ChatInput.ChatInput ui/desktop/src/components/ChatInput.tsx:219 — FunctionTooLong — ChatInput runs 1255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1155 over it, 12.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SessionListView.SessionListView ui/desktop/src/components/sessions/SessionListView.tsx:281 — FunctionTooLong — SessionListView runs 643 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 543 over it, 6.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CustomProviderForm.CustomProviderForm ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257 — FunctionTooLong — CustomProviderForm runs 623 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 523 over it, 6.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: RecipesView.RecipesView ui/desktop/src/components/recipes/RecipesView.tsx:302 — FunctionTooLong — RecipesView runs 605 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 505 over it, 6.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: deeplink-generator.DeeplinkGenerator documentation/src/pages/deeplink-generator.tsx:33 — FunctionTooLong — DeeplinkGenerator runs 504 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 404 over it, 5.04× 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: McpAppRenderer.McpAppRenderer ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502 — FunctionTooLong — McpAppRenderer runs 448 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 348 over it, 4.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: BaseChat.BaseChat ui/desktop/src/components/BaseChat.tsx:74 — FunctionTooLong — BaseChat runs 431 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 331 over it, 4.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: RecipeFormFields.RecipeFormFields ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:133 — FunctionTooLong — RecipeFormFields runs 400 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 300 over it, 4.00× 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: main.appMain ui/desktop/src/main.ts:2414 — FunctionTooLong — appMain runs 389 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 289 over it, 3.89× 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: ScheduleModal.ScheduleModal ui/desktop/src/components/schedule/ScheduleModal.tsx:118 — FunctionTooLong — ScheduleModal runs 382 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 282 over it, 3.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CreateEditRecipeModal.CreateEditRecipeModal ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:118 — FunctionTooLong — CreateEditRecipeModal runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75× 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: MessageQueue.MessageQueue ui/desktop/src/components/MessageQueue.tsx:112 — FunctionTooLong — MessageQueue runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Goose.Rain ui/desktop/src/components/icons/Goose.tsx:26 — FunctionTooLong — Rain runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AppSettingsSection.AppSettingsSection ui/desktop/src/components/settings/app/AppSettingsSection.tsx:181 — FunctionTooLong — AppSettingsSection runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: main.createChat ui/desktop/src/main.ts:996 — FunctionTooLong — createChat runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ScheduleDetailView.ScheduleDetailView ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 — FunctionTooLong — ScheduleDetailView runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.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: LocalInferenceSettings.LocalInferenceSettings ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:161 — FunctionTooLong — LocalInferenceSettings runs 348 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 248 over it, 3.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: ModelSettingsPanel.ModelSettingsPanel ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:387 — FunctionTooLong — ModelSettingsPanel runs 341 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 241 over it, 3.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: chatSessionStore.createAcpChatSessionStoreInternal ui/desktop/src/acp/chatSessionStore.ts:122 — FunctionTooLong — createAcpChatSessionStoreInternal runs 332 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 232 over it, 3.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LocalModelPicker.LocalModelPicker ui/desktop/src/components/onboarding/LocalModelPicker.tsx:107 — FunctionTooLong — LocalModelPicker runs 329 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 229 over it, 3.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ExtensionModal.ExtensionModal ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx:72 — FunctionTooLong — ExtensionModal runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SecurityToggle.SecurityToggle ui/desktop/src/components/settings/security/SecurityToggle.tsx:184 — FunctionTooLong — SecurityToggle runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SchedulesView.SchedulesView ui/desktop/src/components/schedule/SchedulesView.tsx:237 — FunctionTooLong — SchedulesView runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SessionActionsHeader.SessionActionsHeader ui/desktop/src/components/SessionActionsHeader.tsx:348 — FunctionTooLong — SessionActionsHeader runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ToolCallWithResponse.ToolCallView ui/desktop/src/components/ToolCallWithResponse.tsx:501 — FunctionTooLong — ToolCallView runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 115 more in this group — see findings.md.
D2 · Cognitive Complexity · goose · ×78
  • goose::agents::platform_extensions::analyze::parser::extract_inheritance (cognitive 121) crates/goose/src/agents/platform_extensions/analyze/parser.rs:197 — goose::agents::platform_extensions::analyze::parser::extract_inheritance has cognitive complexity 121 (threshold 15). Drivers by points: if/else 36 (110 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 78). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose::agents::reply_parts::stream_response_from_provider (cognitive 84) crates/goose/src/agents/reply_parts.rs:249 — goose::agents::reply_parts::stream_response_from_provider has cognitive complexity 84 (threshold 15). Drivers by points: if/else 22 (48 pts), match/switch 6 (22 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose::agents::platform_extensions::analyze::parser::find_enclosing_class (cognitive 61) crates/goose/src/agents/platform_extensions/analyze/parser.rs:377 — goose::agents::platform_extensions::analyze::parser::find_enclosing_class has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (47 pts), loops 4 (12 pts), boolean chains 2 (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.
  • goose::session::import_formats::codex::convert (cognitive 56) crates/goose/src/session/import_formats/codex.rs:31 — goose::session::import_formats::codex::convert has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 2 (6 pts), boolean chains 2, match/switch 1 (2 pts) (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.
  • goose::session::export_markdown::tool_response_to_markdown_for_audience (cognitive 55) crates/goose/src/session/export_markdown.rs:223 — goose::session::export_markdown::tool_response_to_markdown_for_audience has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 5 (17 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 34). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose::providers::chatgpt_codex::build_input_items (cognitive 48) crates/goose/src/providers/chatgpt_codex.rs:122 — goose::providers::chatgpt_codex::build_input_items has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 4 (14 pts), loops 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.
  • goose::bin::generate_acp_schema::main (cognitive 43) crates/goose/src/bin/generate_acp_schema.rs:12 — goose::bin::generate_acp_schema::main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 8, 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.
  • goose::sources::list_sources_with_roots (cognitive 43) crates/goose/src/sources.rs:905 — goose::sources::list_sources_with_roots has cognitive complexity 43 (threshold 15). Drivers by points: loops 5 (19 pts), if/else 4 (17 pts), match/switch 3 (6 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.
  • goose::acp::provider::handle_requests (cognitive 40) crates/goose/src/acp/provider.rs:1545 — goose::acp::provider::handle_requests has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 4 (11 pts), loops 2 (3 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.
  • goose::providers::toolshim::parse_tokenized_tool_calls_with_status (cognitive 39) crates/goose/src/providers/toolshim.rs:551 — goose::providers::toolshim::parse_tokenized_tool_calls_with_status has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 3, 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.
  • goose::agents::tool_schema_normalize::collect_used_defs (cognitive 37) crates/goose/src/agents/tool_schema_normalize.rs:378 — goose::agents::tool_schema_normalize::collect_used_defs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 7 (15 pts), match/switch 2 (nesting depth added 19). Of this number, 26 points are the body's own statements and 11 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.
  • goose::providers::bedrock::process_stream_event (cognitive 37) crates/goose/src/providers/bedrock.rs:693 — goose::providers::bedrock::process_stream_event has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 4 (10 pts), boolean chains 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose::hooks::load_hooks_file (cognitive 35) crates/goose/src/hooks/mod.rs:949 — goose::hooks::load_hooks_file has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (12 pts), loops 4 (9 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.
  • goose::session::diagnostics::generate_diagnostics (cognitive 35) crates/goose/src/session/diagnostics.rs:297 — goose::session::diagnostics::generate_diagnostics has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (23 pts), match/switch 2 (8 pts), loops 1 (3 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.
  • goose::session::export_markdown::value_to_markdown (cognitive 35) crates/goose/src/session/export_markdown.rs:31 — goose::session::export_markdown::value_to_markdown has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose::session::import_formats::pi::convert (cognitive 34) crates/goose/src/session/import_formats/pi.rs:22 — goose::session::import_formats::pi::convert has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 3 (6 pts), 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.
  • goose::agents::platform_extensions::analyze::parser::extract_fn_signature_from_node (cognitive 33) crates/goose/src/agents/platform_extensions/analyze/parser.rs:448 — goose::agents::platform_extensions::analyze::parser::extract_fn_signature_from_node has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 1 (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.
  • goose::providers::inventory::enrich_model_ids_with_canonical (cognitive 32) crates/goose/src/providers/inventory/mod.rs:1061 — goose::providers::inventory::enrich_model_ids_with_canonical has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (6 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.
  • goose::goose_apps::app::fetch_mcp_apps (cognitive 31) crates/goose/src/goose_apps/app.rs:211 — goose::goose_apps::app::fetch_mcp_apps has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (4 pts), match/switch 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.
  • goose::dictation::providers::resolve_model_native_config (cognitive 28) crates/goose/src/dictation/providers.rs:520 — goose::dictation::providers::resolve_model_native_config has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose::sources::import_sources (cognitive 28) crates/goose/src/sources.rs:1121 — goose::sources::import_sources has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (9 pts), match/switch 2, 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.
  • goose::agents::tool_schema_normalize::inline_refs_scoped (cognitive 27) crates/goose/src/agents/tool_schema_normalize.rs:280 — goose::agents::tool_schema_normalize::inline_refs_scoped has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, match/switch 1 (4 pts), loops 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.
  • goose::session::export_markdown::tool_request_to_markdown (cognitive 27) crates/goose/src/session/export_markdown.rs:123 — goose::session::export_markdown::tool_request_to_markdown has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose::sources::list_agent_sources (cognitive 27) crates/goose/src/sources.rs:550 — goose::sources::list_agent_sources has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 4 (10 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.
  • goose::agents::platform_extensions::javascript::evaluate (cognitive 26) crates/goose/src/agents/platform_extensions/javascript.rs:214 — goose::agents::platform_extensions::javascript::evaluate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), loops 3, 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.
  • + 53 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×72
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 65% of them inside a single declaration: SessionStorage (2 blocks, 837-3021). The bar is 500 significant lines; this is 1816 over it, 4.63× 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: src/cli.rs crates/goose-cli/src/cli.rs — FileTooLong — 2148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 1648 over it, 4.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: acp/server.rs crates/goose/src/acp/server.rs — FileTooLong — 1982 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 64% of them inside a single declaration: GooseAcpAgent (3 blocks, 313-2659), declaring 42 free functions. The bar is 500 significant lines; this is 1482 over it, 3.96× 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: src/main.ts ui/desktop/src/main.ts — FileTooLong — 1981 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1481 over it, 3.96× 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: session/mod.rs crates/goose-cli/src/session/mod.rs — FileTooLong — 1945 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 65% of them inside a single declaration: CliSession (2 blocks, 239-2050). The bar is 500 significant lines; this is 1445 over it, 3.89× 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: commands/configure.rs crates/goose-cli/src/commands/configure.rs — FileTooLong — 1690 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 48 free functions. The bar is 500 significant lines; this is 1190 over it, 3.38× 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: acp/provider.rs crates/goose/src/acp/provider.rs — FileTooLong — 1651 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 42 free functions. The bar is 500 significant lines; this is 1151 over it, 3.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/hf_models.rs crates/goose-local-inference/src/hf_models.rs — FileTooLong — 1635 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 88 free functions. The bar is 500 significant lines; this is 1135 over it, 3.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: src/custom_requests.rs crates/goose-sdk-types/src/custom_requests.rs — FileTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1131 over it, 3.26× 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/ChatInput.tsx ui/desktop/src/components/ChatInput.tsx — FileTooLong — 1427 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: ChatInput (219-1963). The bar is 500 significant lines; this is 927 over it, 2.85× 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: formats/openai.rs crates/goose-provider-types/src/formats/openai.rs — FileTooLong — 1268 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 40 free functions. The bar is 500 significant lines; this is 768 over it, 2.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/bindings.rs crates/goose-sdk/src/bindings.rs — FileTooLong — 1176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 676 over it, 2.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: session/output.rs crates/goose-cli/src/session/output.rs — FileTooLong — 1165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 80 free functions. The bar is 500 significant lines; this is 665 over it, 2.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: platform_extensions/summon.rs crates/goose/src/agents/platform_extensions/summon.rs — FileTooLong — 1115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: SummonClient (3 blocks, 390-1515). The bar is 500 significant lines; this is 615 over it, 2.23× 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: agents/agent.rs crates/goose/src/agents/agent.rs — FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 531 over it, 2.06× 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: server/providers.rs crates/goose/src/acp/server/providers.rs — FileTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: GooseAcpAgent (487-1255). The bar is 500 significant lines; this is 448 over it, 1.90× 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: inventory/mod.rs crates/goose/src/providers/inventory/mod.rs — FileTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 441 over it, 1.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: formats/openai_responses.rs crates/goose-provider-types/src/formats/openai_responses.rs — FileTooLong — 935 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 435 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: conversation/message.rs crates/goose-provider-types/src/conversation/message.rs — FileTooLong — 933 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 433 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/sources.rs crates/goose/src/sources.rs — FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 425 over it, 1.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: formats/anthropic.rs crates/goose-provider-types/src/formats/anthropic.rs — FileTooLong — 913 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 413 over it, 1.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: sessions/SessionListView.tsx ui/desktop/src/components/sessions/SessionListView.tsx — FileTooLong — 871 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: SessionListView (281-1107). The bar is 500 significant lines; this is 371 over it, 1.74× 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: providers/toolshim.rs crates/goose/src/providers/toolshim.rs — FileTooLong — 863 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 363 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: autovisualiser/mod.rs crates/goose-mcp/src/autovisualiser/mod.rs — FileTooLong — 849 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 349 over it, 1.70× 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: recipes/RecipesView.tsx ui/desktop/src/components/recipes/RecipesView.tsx — FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: RecipesView (302-1066). The bar is 500 significant lines; this is 345 over it, 1.69× 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.
  • + 47 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×65
  • Hotspot: ui/desktop/src/components/ChatInput.tsx ui/desktop/src/components/ChatInput.tsx:219 — ui/desktop/src/components/ChatInput.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 281 in ChatInput.ChatInput at line 219. 4 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/ChatInput.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-provider-types/src/formats/openai.rs crates/goose-provider-types/src/formats/openai.rs:1267 — crates/goose-provider-types/src/formats/openai.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in goose_provider_types::formats::openai::response_to_streaming_message at line 1267. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/formats/openai.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/main.ts ui/desktop/src/main.ts:2414 — ui/desktop/src/main.ts changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in main.appMain at line 2414. 9 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/main.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1911 — REDACTED changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in SessionStorage::apply_update at line 1911. 9 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-cli/src/session/mod.rs crates/goose-cli/src/session/mod.rs:1310 — crates/goose-cli/src/session/mod.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in CliSession::process_agent_response at line 1310. 7 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-cli/src/session/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-provider-types/src/formats/anthropic.rs crates/goose-provider-types/src/formats/anthropic.rs:1005 — crates/goose-provider-types/src/formats/anthropic.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in goose_provider_types::formats::anthropic::response_to_streaming_message at line 1005. 8 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/formats/anthropic.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/BaseChat.tsx ui/desktop/src/components/BaseChat.tsx:74 — ui/desktop/src/components/BaseChat.tsx changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in BaseChat.BaseChat at line 74. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/BaseChat.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose/src/acp/server.rs crates/goose/src/acp/server.rs:2111 — crates/goose/src/acp/server.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in GooseAcpAgent::forward_agent_stream at line 2111. 14 of those changes were fix/bug commits, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/acp/server.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose/src/agents/reply_parts.rs crates/goose/src/agents/reply_parts.rs:249 — crates/goose/src/agents/reply_parts.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in goose::agents::reply_parts::stream_response_from_provider at line 249. 7 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/agents/reply_parts.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/ToolCallWithResponse.tsx ui/desktop/src/components/ToolCallWithResponse.tsx:501 — ui/desktop/src/components/ToolCallWithResponse.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in ToolCallWithResponse.ToolCallView at line 501. 2 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/ToolCallWithResponse.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose/src/acp/provider.rs crates/goose/src/acp/provider.rs:840 — crates/goose/src/acp/provider.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in AcpProvider::stream at line 840. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/acp/provider.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-cli/src/cli.rs crates/goose-cli/src/cli.rs:2573 — crates/goose-cli/src/cli.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in goose_cli::cli::handle_local_models_command at line 2573. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-cli/src/cli.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-provider-types/src/formats/openai_responses.rs crates/goose-provider-types/src/formats/openai_responses.rs:1089 — crates/goose-provider-types/src/formats/openai_responses.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in goose_provider_types::formats::openai_responses::responses_api_to_streaming_message at line 1089. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/formats/openai_responses.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257 — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in CustomProviderForm.CustomProviderForm at line 257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose/src/agents/state_machine/ops_toolcalling.rs crates/goose/src/agents/state_machine/ops_toolcalling.rs:910 — crates/goose/src/agents/state_machine/ops_toolcalling.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ToolExecutionOperation::run at line 910. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/agents/state_machine/ops_toolcalling.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-cli/src/session/output.rs crates/goose-cli/src/session/output.rs:371 — crates/goose-cli/src/session/output.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in goose_cli::session::output::render_message_streaming at line 371. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-cli/src/session/output.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-provider-types/src/formats/databricks.rs crates/goose-provider-types/src/formats/databricks.rs:126 — crates/goose-provider-types/src/formats/databricks.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in goose_provider_types::formats::databricks::format_messages 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/formats/databricks.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/McpApps/McpAppRenderer.tsx ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502 — ui/desktop/src/components/McpApps/McpAppRenderer.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in McpAppRenderer.McpAppRenderer at line 502. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/McpApps/McpAppRenderer.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/sessions/SessionListView.tsx ui/desktop/src/components/sessions/SessionListView.tsx:281 — ui/desktop/src/components/sessions/SessionListView.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in SessionListView.SessionListView at line 281. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/sessions/SessionListView.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose/src/providers/bedrock.rs crates/goose/src/providers/bedrock.rs:693 — crates/goose/src/providers/bedrock.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in goose::providers::bedrock::process_stream_event at line 693. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/bedrock.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/GooseMessage.tsx ui/desktop/src/components/GooseMessage.tsx:47 — ui/desktop/src/components/GooseMessage.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in GooseMessage.GooseMessage 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/GooseMessage.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-cli/src/session/builder.rs crates/goose-cli/src/session/builder.rs:664 — crates/goose-cli/src/session/builder.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in goose_cli::session::builder::try_build_session at line 664. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-cli/src/session/builder.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-provider-types/src/canonical/name_builder.rs crates/goose-provider-types/src/canonical/name_builder.rs:44 — crates/goose-provider-types/src/canonical/name_builder.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in goose_provider_types::canonical::name_builder::map_provider_name at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/canonical/name_builder.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/goose-agent/src/inference.rs crates/goose-agent/src/inference.rs:430 — crates/goose-agent/src/inference.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in InferenceRunner::infer at line 430. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-agent/src/inference.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/desktop/src/components/schedule/ScheduleModal.tsx ui/desktop/src/components/schedule/ScheduleModal.tsx:118 — ui/desktop/src/components/schedule/ScheduleModal.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in ScheduleModal.ScheduleModal at line 118. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/components/schedule/ScheduleModal.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.
  • + 40 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×38
  • No test reaches this file crates/goose/src/session/export_html/template.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 ui/desktop/scripts/prepare-platform-binaries.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 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 ui/goose-acp-client/generate-schema.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 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 services/ask-ai-bot/utils/ai/tools/docs.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 services/ask-ai-bot/utils/ai/index.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 services/ask-ai-bot/utils/ai/tools/github.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 ui/scripts/npm-versions.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file services/ask-ai-bot/utils/ai/tools/index.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 services/ask-ai-bot/events/messageCreate.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 services/ask-ai-bot/utils/ai/chunk-markdown.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 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 ui/desktop/scripts/generate-windows-update-manifest.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 ui/desktop/src/components/settings/mode/ConversationLimitsDropdown.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 ui/goose-acp/bin/goose.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file services/ask-ai-bot/utils/ai/tools/codebase-viewer.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 services/ask-ai-bot/index.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 services/ask-ai-bot/utils/discord/message-content.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 ui/desktop/scripts/sign-windows-installer.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 services/ask-ai-bot/utils/discord/thread-memory.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 ui/desktop/src/renderer.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 ui/desktop/scripts/build-main.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 ui/desktop/scripts/i18n-check.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 services/ask-ai-bot/utils/discord/server-context.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.
  • + 13 more in this group — see findings.md.
D2 · Cognitive Complexity · goose_cli · ×36
  • goose_cli::commands::configure::configure_single_key (cognitive 97) crates/goose-cli/src/commands/configure.rs:709 — goose_cli::commands::configure::configure_single_key has cognitive complexity 97 (threshold 15). Drivers by points: if/else 30 (93 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 64). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::cli::handle_local_models_command (cognitive 53) crates/goose-cli/src/cli.rs:2573 — goose_cli::cli::handle_local_models_command has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (39 pts), loops 4 (9 pts), match/switch 2 (4 pts), boolean chains 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.
  • goose_cli::commands::review::handler::handle_review (cognitive 42) crates/goose-cli/src/commands/review/handler.rs:74 — goose_cli::commands::review::handler::handle_review has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (34 pts), loops 3 (7 pts), match/switch 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.
  • goose_cli::session::elicitation::collect_elicitation_input_inner (cognitive 41) crates/goose-cli/src/session/elicitation.rs:61 — goose_cli::session::elicitation::collect_elicitation_input_inner has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 4 (9 pts), boolean chains 2, 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.
  • goose_cli::session::handle_mcp_notification (cognitive 37) crates/goose-cli/src/session/mod.rs:2358 — goose_cli::session::handle_mcp_notification has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (35 pts), boolean chains 1, match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::session::display_log_notification (cognitive 34) crates/goose-cli/src/session/mod.rs:2577 — goose_cli::session::display_log_notification has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 1 (4 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.
  • goose_cli::commands::recipe::handle_list (cognitive 33) crates/goose-cli/src/commands/recipe.rs:102 — goose_cli::commands::recipe::handle_list has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 3 (6 pts), loops 1 (3 pts) (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::bin::generate_manpages::generate_see_also (cognitive 29) crates/goose-cli/src/bin/generate_manpages.rs:110 — goose_cli::bin::generate_manpages::generate_see_also has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, 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.
  • goose_cli::session::builder::resolve_provider_and_model (cognitive 28) crates/goose-cli/src/session/builder.rs:289 — goose_cli::session::builder::resolve_provider_and_model has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • goose_cli::session::output::print_params (cognitive 28) crates/goose-cli/src/session/output.rs:1373 — goose_cli::session::output::print_params has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (8 pts), loops 2 (7 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.
  • goose_cli::session::builder::try_build_session (cognitive 26) crates/goose-cli/src/session/builder.rs:664 — goose_cli::session::builder::try_build_session has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 5 (8 pts), boolean chains 2, 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.
  • goose_cli::commands::configure::configure_provider_dialog (cognitive 25) crates/goose-cli/src/commands/configure.rs:832 — goose_cli::commands::configure::configure_provider_dialog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 5 (6 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.
  • goose_cli::session::output::extract_markdown_table (cognitive 25) crates/goose-cli/src/session/output.rs:1181 — goose_cli::session::output::extract_markdown_table has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 5, 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.
  • goose_cli::commands::info::handle_info (cognitive 24) crates/goose-cli/src/commands/info.rs:105 — goose_cli::commands::info::handle_info has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (5 pts), match/switch 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.
  • goose_cli::commands::roam::handle_peers (cognitive 23) crates/goose-cli/src/commands/roam.rs:434 — goose_cli::commands::roam::handle_peers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::session::input::get_input (cognitive 23) crates/goose-cli/src/session/input.rs:116 — goose_cli::session::input::get_input has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 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.
  • goose_cli::session::output::print_table (cognitive 22) crates/goose-cli/src/session/output.rs:1262 — goose_cli::session::output::print_table has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 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.
  • goose_cli::cli::handle_mcp_probe (cognitive 21) crates/goose-cli/src/cli.rs:1463 — goose_cli::cli::handle_mcp_probe has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 4 (8 pts), loops 1 (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.
  • goose_cli::cli::handle_interactive_session (cognitive 21) crates/goose-cli/src/cli.rs:2030 — goose_cli::cli::handle_interactive_session has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
  • goose_cli::commands::session::handle_session_list (cognitive 21) crates/goose-cli/src/commands/session.rs:194 — goose_cli::commands::session::handle_session_list has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_cli::session::format_logging_notification (cognitive 21) crates/goose-cli/src/session/mod.rs:2518 — goose_cli::session::format_logging_notification has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::session::log_tool_metrics (cognitive 21) crates/goose-cli/src/session/mod.rs:2629 — goose_cli::session::log_tool_metrics has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 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.
  • goose_cli::commands::configure::add_provider (cognitive 20) crates/goose-cli/src/commands/configure.rs:2185 — goose_cli::commands::configure::add_provider has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 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.
  • goose_cli::session::input::handle_slash_command (cognitive 20) crates/goose-cli/src/session/input.rs:220 — goose_cli::session::input::handle_slash_command has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • goose_cli::session::output::render_tool_response (cognitive 20) crates/goose-cli/src/session/output.rs:599 — goose_cli::session::output::render_tool_response has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • + 11 more in this group — see findings.md.
D2 · Cognitive Complexity · goose_provider_types · ×35
  • goose_provider_types::formats::openai::response_to_streaming_message (cognitive 364) crates/goose-provider-types/src/formats/openai.rs:1267 — goose_provider_types::formats::openai::response_to_streaming_message has cognitive complexity 364 (threshold 15). Drivers by points: if/else 80 (314 pts), loops 6 (34 pts), boolean chains 10, match/switch 1 (6 pts) (nesting depth added 267). 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.
  • goose_provider_types::formats::anthropic::response_to_streaming_message (cognitive 142) crates/goose-provider-types/src/formats/anthropic.rs:1005 — goose_provider_types::formats::anthropic::response_to_streaming_message has cognitive complexity 142 (threshold 15). Drivers by points: if/else 38 (119 pts), match/switch 5 (18 pts), loops 2 (3 pts), boolean chains 2 (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.
  • goose_provider_types::formats::openai::format_messages_with_options (cognitive 139) crates/goose-provider-types/src/formats/openai.rs:242 — goose_provider_types::formats::openai::format_messages_with_options has cognitive complexity 139 (threshold 15). Drivers by points: if/else 37 (99 pts), match/switch 6 (24 pts), boolean chains 8, loops 3 (8 pts) (nesting depth added 85). 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.
  • goose_provider_types::formats::anthropic::format_messages_with_options (cognitive 128) crates/goose-provider-types/src/formats/anthropic.rs:285 — goose_provider_types::formats::anthropic::format_messages_with_options has cognitive complexity 128 (threshold 15). Drivers by points: if/else 26 (104 pts), match/switch 4 (13 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 92). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::google::format_messages (cognitive 76) crates/goose-provider-types/src/formats/google.rs:80 — goose_provider_types::formats::google::format_messages has cognitive complexity 76 (threshold 15). Drivers by points: if/else 15 (42 pts), match/switch 7 (28 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::databricks::format_messages (cognitive 66) crates/goose-provider-types/src/formats/databricks.rs:126 — goose_provider_types::formats::databricks::format_messages has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 4 (13 pts), match/switch 3 (9 pts), boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::databricks::response_to_message (cognitive 54) crates/goose-provider-types/src/formats/databricks.rs:375 — goose_provider_types::formats::databricks::response_to_message has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (30 pts), match/switch 3 (14 pts), loops 3 (10 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.
  • goose_provider_types::formats::google::response_to_streaming_message (cognitive 52) crates/goose-provider-types/src/formats/google.rs:454 — goose_provider_types::formats::google::response_to_streaming_message has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (40 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (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.
  • goose_provider_types::formats::openai_responses::add_message_items (cognitive 49) crates/goose-provider-types/src/formats/openai_responses.rs:411 — goose_provider_types::formats::openai_responses::add_message_items has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 4 (13 pts), loops 2 (3 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.
  • goose_provider_types::formats::snowflake::format_messages (cognitive 49) crates/goose-provider-types/src/formats/snowflake.rs:14 — goose_provider_types::formats::snowflake::format_messages has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (41 pts), match/switch 2 (5 pts), loops 2 (3 pts) (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.
  • goose_provider_types::formats::openai_responses::responses_api_to_streaming_message (cognitive 45) crates/goose-provider-types/src/formats/openai_responses.rs:1089 — goose_provider_types::formats::openai_responses::responses_api_to_streaming_message has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (38 pts), match/switch 2 (6 pts), loops 1 (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.
  • goose_provider_types::conversation::fix_tool_calling (cognitive 43) crates/goose-provider-types/src/conversation.rs:426 — goose_provider_types::conversation::fix_tool_calling has cognitive complexity 43 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 7 (16 pts), match/switch 3 (10 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.
  • goose_provider_types::formats::openai::response_to_message (cognitive 42) crates/goose-provider-types/src/formats/openai.rs:742 — goose_provider_types::formats::openai::response_to_message has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 1 (4 pts), loops 1 (3 pts), boolean chains 1 (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.
  • goose_provider_types::formats::openai_responses::create_responses_request_for_model (cognitive 42) crates/goose-provider-types/src/formats/openai_responses.rs:630 — goose_provider_types::formats::openai_responses::create_responses_request_for_model has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::snowflake::parse_streaming_response (cognitive 41) crates/goose-provider-types/src/formats/snowflake.rs:141 — goose_provider_types::formats::snowflake::parse_streaming_response has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (32 pts), match/switch 2 (7 pts), boolean chains 1, loops 1 (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.
  • goose_provider_types::images::detect_image_path (cognitive 37) crates/goose-provider-types/src/images.rs:38 — goose_provider_types::images::detect_image_path has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 3 (8 pts), match/switch 1 (6 pts), boolean chains 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.
  • goose_provider_types::formats::openai::normalize_nullable (cognitive 34) crates/goose-provider-types/src/formats/openai.rs:1068 — goose_provider_types::formats::openai::normalize_nullable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 1 (6 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.
  • goose_provider_types::canonical::name_builder::map_to_canonical_model (cognitive 32) crates/goose-provider-types/src/canonical/name_builder.rs:68 — goose_provider_types::canonical::name_builder::map_to_canonical_model has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::openai::merge_split_tool_call_messages (cognitive 32) crates/goose-provider-types/src/formats/openai.rs:599 — goose_provider_types::formats::openai::merge_split_tool_call_messages has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (8 pts), boolean chains 6 (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.
  • goose_provider_types::formats::anthropic::apply_thinking_config (cognitive 29) crates/goose-provider-types/src/formats/anthropic.rs:828 — goose_provider_types::formats::anthropic::apply_thinking_config has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_provider_types::formats::ollama::response_to_streaming_message_ollama (cognitive 27) crates/goose-provider-types/src/formats/ollama.rs:160 — goose_provider_types::formats::ollama::response_to_streaming_message_ollama has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, 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.
  • goose_provider_types::formats::openai::create_request_for_model_with_options (cognitive 27) crates/goose-provider-types/src/formats/openai.rs:1744 — goose_provider_types::formats::openai::create_request_for_model_with_options has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (22 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.
  • goose_provider_types::formats::openai_responses::process_streaming_output_items (cognitive 27) crates/goose-provider-types/src/formats/openai_responses.rs:985 — goose_provider_types::formats::openai_responses::process_streaming_output_items has cognitive complexity 27 (threshold 15). Drivers by points: if/else 3 (15 pts), match/switch 2 (6 pts), loops 2 (4 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.
  • goose_provider_types::base::collect_stream (cognitive 26) crates/goose-provider-types/src/base.rs:432 — goose_provider_types::base::collect_stream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 3 (9 pts), loops 2 (5 pts), boolean chains 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.
  • goose_provider_types::formats::databricks::create_request_for_provider (cognitive 26) crates/goose-provider-types/src/formats/databricks.rs:531 — goose_provider_types::formats::databricks::create_request_for_provider has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 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.
  • + 10 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×29
  • Repeated repair: crates/goose-provider-types/src/base.rs crates/goose-provider-types/src/base.rs:432 — crates/goose-provider-types/src/base.rs changed 19 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is goose_provider_types::base::collect_stream at line 432), 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): drive pre-key model lists from the canonical registry (#11475)”; “fix(security): bind CLI session naming to trusted path (#11787)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix(agents): fail fast when a recipe's structured response can't reach an ACP-bridged provider (#11307)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/base.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-providers/src/anthropic.rs crates/goose-providers/src/anthropic.rs:507 — crates/goose-providers/src/anthropic.rs changed 18 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is goose_providers::anthropic::from_declarative_config at line 507), 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(anthropic): forward unknown request_params to wire, mirroring openai engine (#12720)”; “fix(providers): drive pre-key model lists from the canonical registry (#11475)”; “fix(anthropic): preserved-thinking compliance for the provider layer (#11836)”; “fix: unify context limit resolution behind provider API (#11213)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-providers/src/anthropic.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-provider-types/src/model.rs crates/goose-provider-types/src/model.rs:363 — crates/goose-provider-types/src/model.rs changed 11 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 10 (its worst body is ModelConfig::normalize_effort_suffix at line 363), 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(gdk): resolve vision support from the canonical catalog so tool result images reach the model (#12440)”; “fix Databricks GLM-5.3 and Kimi K3 reasoning effort (#12079)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix: Avoid sending images to non vision capable models (#11496)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-provider-types/src/model.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:351 — REDACTED changed 11 times in last 90 days and 6 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 ApiClient::configure_transport at line 351), 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(voice): use system trust for WebSockets (#13075)”; “fix(anthropic): preserved-thinking compliance for the provider layer (#11836)”; “fix(security): bind Foundry API keys to request origin (#11347)”; “fix: secure Copilot API endpoint transport (#11129)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/providers/anthropic_def.rs crates/goose/src/providers/anthropic_def.rs:45 — crates/goose/src/providers/anthropic_def.rs changed 10 times in last 90 days and 6 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 goose::providers::anthropic_def::from_env at line 45), 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(anthropic): preserved-thinking compliance for the provider layer (#11836)”; “fix: send session ID header for OpenCode Go (#11944)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix: gate clear_thinking behind an opt-in flag (Z.AI-only) (#10439)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/anthropic_def.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-providers/src/databricks_v2.rs crates/goose-providers/src/databricks_v2.rs:377 — crates/goose-providers/src/databricks_v2.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is DatabricksV2Provider::stream_mlflow_chat_completions at line 377), 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): request summarized thinking from Claude models (#13029)”; “fix(databricks): send the system prompt as system on the MLflow chat route (#13057)”; “fix(databricks): omit stream_options for Gemini model services (#12675)”; “fix(databricks_v2): send Claude model services through the Anthropic route (#12486)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-providers/src/databricks_v2.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/providers/githubcopilot.rs crates/goose/src/providers/githubcopilot.rs:384 — crates/goose/src/providers/githubcopilot.rs changed 7 times in last 90 days and 6 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 GithubCopilotProvider::get_api_info at line 384), 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(provider): refresh revoked Copilot tokens when listing models (#12627)”; “fix: refresh revoked GitHub Copilot API token once (#12616)”; “fix(providers): inform user of clipboard copy and remove copilot auth retry on timeout (#11160)”; “fix: secure Copilot API endpoint transport (#11129)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/githubcopilot.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/model_config.rs crates/goose/src/model_config.rs:52 — crates/goose/src/model_config.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is goose::model_config::materialize_model_config_inner at line 52), 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: resolve vision support from the canonical catalog for all providers (#12522)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix: Avoid sending images to non vision capable models (#11496)”; “fix(core): compact with the main session model, not the fast model (#11255)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/model_config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-providers/src/http_status.rs crates/goose-providers/src/http_status.rs:136 — crates/goose-providers/src/http_status.rs 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 13 (its worst body is goose_providers::http_status::is_context_length_exceeded_message at line 136), 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): classify many-image dimension limit errors as context length-exceeded (#12208)”; “fix(providers): bound non-streaming JSON responses (#11109)”; “fix (providers): handle error code for context length exceeded (#11283)”; “fix(providers): classify byte-size request limit errors as context-length-exceeded (#11173)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-providers/src/http_status.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/providers/kimicode.rs crates/goose/src/providers/kimicode.rs:253 — crates/goose/src/providers/kimicode.rs changed 5 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 9 (its worst body is KimiCodeProvider::use_or_refresh at line 253), 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): map kimi_code provider name and pass correct provider to create_request (#11130)”; “fix implicit OAuth during model discovery (#10929)”; “fix(providers): stop killing streaming responses at the total request timeout (#10620)”; “fix(kimi-code): update known models metadata with current platform lineup (#10713)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/kimicode.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/acp/mod.rs crates/goose/src/acp/mod.rs:27 — crates/goose/src/acp/mod.rs 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 2 (its worst body is goose::acp::configured_model_for_provider at line 27), 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 (acp): fail session/prompt when a turn ends on an error (#13043)”; “fix(acp): bound the handoff memo so long sessions stay resumable (#11204)”; “Revert "feat(acp): add _goose/unstable/session/extensions/apply method (#11081)" (#11217)”; “fix(acp): return authe error for acp provider from goose acp server (#11202)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/acp/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-providers/src/openai_compatible.rs crates/goose-providers/src/openai_compatible.rs:105 — crates/goose-providers/src/openai_compatible.rs 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 3 (its worst body is OpenAiCompatibleProvider::stream_payload at line 105), 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: Avoid sending images to non vision capable models (#11496)”; “fix(providers): bound non-streaming JSON responses (#11109)”; “fix(providers): stop killing streaming responses at the total request timeout (#10620)”; “fix(cerebras): preserve thinking inline for models that reject reasoning_content (#10774)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-providers/src/openai_compatible.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose-providers/src/azure_foundry.rs crates/goose-providers/src/azure_foundry.rs:282 — crates/goose-providers/src/azure_foundry.rs changed 6 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 6 (its worst body is AzureFoundryProvider::fetch_deployments at line 282), 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(costs): estimate through canonical provider aliases (#11916)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix(security): bind Foundry API keys to request origin (#11347)”; “fix(cerebras): preserve thinking inline for models that reject reasoning_content (#10774)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose-providers/src/azure_foundry.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/providers/litellm.rs crates/goose/src/providers/litellm.rs:112 — crates/goose/src/providers/litellm.rs changed 6 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 5 (its worst body is LiteLLMProvider::get_or_fetch_models at line 112), 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(litellm): stream chat completions by default (#11870)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix(providers): stop paying the prompt-cache write premium on one-shot fast-model calls (#11179)”; “fix: keep LiteLLM default local (#10996)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/litellm.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: ui/desktop/src/acp/chatSessionController.ts ui/desktop/src/acp/chatSessionController.ts:175 — ui/desktop/src/acp/chatSessionController.ts 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 11 (its worst body is chatSessionController.submitMessage at line 175), 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 (acp): fail session/prompt when a turn ends on an error (#13043)”; “fix(desktop): start a chat with no extensions when the user selects none (#11908)”; “fix(acp): return authe error for acp provider from goose acp server (#11202)”; “fix(desktop): allow removing images when editing user messages (#9979)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/acp/chatSessionController.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: crates/goose/src/providers/canonical_cost.rs crates/goose/src/providers/canonical_cost.rs:60 — crates/goose/src/providers/canonical_cost.rs 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 7 (its worst body is goose::providers::canonical_cost::resolve_pricing at line 60), 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(cost): apply long-context price tiers to cost estimates (#12787)”; “fix(costs): estimate through canonical provider aliases (#11916)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix(providers): estimate cost for Azure Foundry models via inferred catalog pricing (#11264)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/canonical_cost.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/skills/mod.rs crates/goose/src/skills/mod.rs:81 — crates/goose/src/skills/mod.rs 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 7 (its worst body is goose::skills::validate_skill_name at line 81), 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(recipes): confine library writes (#11482)”; “fix(security): honor plugin enablement for skills (#11439)”; “fix: decouple source file and tool response limits (#11391)”; “fix: contain and bound skill supporting file reads (#11342)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/skills/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: ui/desktop/src/acp/errors.ts ui/desktop/src/acp/errors.ts:97 — ui/desktop/src/acp/errors.ts changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is errors.acpErrorMessage at line 97), 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 (acp): fail session/prompt when a turn ends on an error (#13043)”; “fix(desktop): require recipe consent before session/new spawns extensions (#12094)”; “fix(acp): return authe error for acp provider from goose acp server (#11202)”; “fix: bind deeplink recipe parameters to startup session (#11123)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/acp/errors.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: crates/goose/src/recipe/template_recipe.rs crates/goose/src/recipe/template_recipe.rs:165 — crates/goose/src/recipe/template_recipe.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is goose::recipe::template_recipe::load_template_from_recipe_dir at line 165), 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(schedule): validate recipes consistently (#11561)”; “fix(security): build recipes from one validated snapshot (#11612)”; “test(recipe): add a regression guard for minijinja's builtins feature (#11319)”; “fix: contain recipe template paths (#10930)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/recipe/template_recipe.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/security/scanner.rs crates/goose/src/security/scanner.rs:65 — crates/goose/src/security/scanner.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is PromptInjectionScanner::create_classifier at line 65), 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(security): treat an unavailable prompt classifier as no signal (#12452)”; “fix(security): fuse command scanner signals (#11440)”; “Revert "feat(security): chunk command-classifier input with overlapping windows" (#10416) (#10870)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/security/scanner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/providers/xai.rs crates/goose/src/providers/xai.rs:20 — crates/goose/src/providers/xai.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is XaiProvider::metadata at line 20), 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): drive pre-key model lists from the canonical registry (#11475)”; “fix: unify context limit resolution behind provider API (#11213)”; “fix(providers): restore dynamic model discovery and current Grok support (#10756)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/providers/xai.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/goose/src/agents/extension_malware_check.rs crates/goose/src/agents/extension_malware_check.rs:211 — crates/goose/src/agents/extension_malware_check.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is goose::agents::extension_malware_check::parse_npm_token at line 211), 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(security): recognize Windows package runners (#11466)”; “fix: scan uvx from selectors for malware (#10988)”; “fix: parse PyPI requirements for OSV checks (#10510)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- crates/goose/src/agents/extension_malware_check.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: ui/desktop/src/sessions.ts ui/desktop/src/sessions.ts:40 — ui/desktop/src/sessions.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 4 (its worst body is sessions.selectedExtensionConfigs at line 40), 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(desktop): require recipe consent before session/new spawns extensions (#12094)”; “fix(desktop): start a chat with no extensions when the user selects none (#11908)”; “fix: bind deeplink recipe parameters to startup session (#11123)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/sessions.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: ui/desktop/src/acp/chatSessionStore.ts ui/desktop/src/acp/chatSessionStore.ts:650 — ui/desktop/src/acp/chatSessionStore.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 12 (its worst body is chatSessionStore.applyChatStateChanges at line 650), 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(ui): bind ACP permissions to request generations (#11415)”; “fix(acp): return authe error for acp provider from goose acp server (#11202)”; “fix(desktop): avoid O(n²) cloning during session load (#10665)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/acp/chatSessionStore.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: ui/desktop/src/utils/workingDir.ts ui/desktop/src/utils/workingDir.ts:21 — ui/desktop/src/utils/workingDir.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is workingDir.getEffectiveWorkingDir at line 21), 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(desktop): inherit active chat folder for New Chat (#12941)”; “fix(desktop): honor remote working directory for new chats and allow typed paths (#11322)”; “fix(ui): support remote working directory for external backend (#10827)”. 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-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 20:24:29 +00:00' --until='2026-10-25 20:24:29 +00:00' --full-history --no-merges -- ui/desktop/src/utils/workingDir.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.
  • + 4 more in this group — see findings.md.
D1 · Cyclomatic Complexity · goose · ×24
  • goose::agents::platform_extensions::analyze::parser::extract_inheritance (cyclomatic 51) crates/goose/src/agents/platform_extensions/analyze/parser.rs:197 — goose::agents::platform_extensions::analyze::parser::extract_inheritance 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.
  • goose::session::export_markdown::tool_response_to_markdown_for_audience (cyclomatic 37) crates/goose/src/session/export_markdown.rs:223 — goose::session::export_markdown::tool_response_to_markdown_for_audience 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.
  • goose::agents::reply_parts::stream_response_from_provider (cyclomatic 35) crates/goose/src/agents/reply_parts.rs:249 — goose::agents::reply_parts::stream_response_from_provider 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.
  • goose::recipe::validate_recipe::schema_field (cyclomatic 32) crates/goose/src/recipe/validate_recipe.rs:86 — goose::recipe::validate_recipe::schema_field has cyclomatic complexity 32 (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.
  • goose::providers::bedrock::process_stream_event (cyclomatic 24) crates/goose/src/providers/bedrock.rs:693 — goose::providers::bedrock::process_stream_event 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.
  • goose::session::import_formats::codex::convert (cyclomatic 24) crates/goose/src/session/import_formats/codex.rs:31 — goose::session::import_formats::codex::convert 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.
  • goose::bin::generate_acp_schema::main (cyclomatic 23) crates/goose/src/bin/generate_acp_schema.rs:12 — goose::bin::generate_acp_schema::main 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.
  • goose::posthog::classify_error (cyclomatic 22) crates/goose/src/posthog.rs:456 — goose::posthog::classify_error 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.
  • goose::acp::provider::handle_requests (cyclomatic 21) crates/goose/src/acp/provider.rs:1545 — goose::acp::provider::handle_requests 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.
  • goose::agents::tool_schema_normalize::collect_used_defs (cyclomatic 20) crates/goose/src/agents/tool_schema_normalize.rs:378 — goose::agents::tool_schema_normalize::collect_used_defs has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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.
  • goose::sources::import_sources (cyclomatic 20) crates/goose/src/sources.rs:1121 — goose::sources::import_sources 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.
  • goose::agents::platform_extensions::analyze::parser::find_enclosing_class (cyclomatic 19) crates/goose/src/agents/platform_extensions/analyze/parser.rs:377 — goose::agents::platform_extensions::analyze::parser::find_enclosing_class 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.
  • goose::providers::toolshim::parse_tokenized_tool_calls_with_status (cyclomatic 19) crates/goose/src/providers/toolshim.rs:551 — goose::providers::toolshim::parse_tokenized_tool_calls_with_status 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.
  • goose::security::egress_inspector::detect_direction (cyclomatic 19) crates/goose/src/security/egress_inspector.rs:211 — goose::security::egress_inspector::detect_direction 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.
  • goose::session::import_formats::pi::convert (cyclomatic 19) crates/goose/src/session/import_formats/pi.rs:22 — goose::session::import_formats::pi::convert 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.
  • goose::agents::platform_extensions::javascript::evaluate (cyclomatic 18) crates/goose/src/agents/platform_extensions/javascript.rs:214 — goose::agents::platform_extensions::javascript::evaluate 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.
  • goose::dictation::providers::resolve_model_native_config (cyclomatic 18) crates/goose/src/dictation/providers.rs:520 — goose::dictation::providers::resolve_model_native_config 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.
  • goose::providers::chatgpt_codex::build_input_items (cyclomatic 17) crates/goose/src/providers/chatgpt_codex.rs:122 — goose::providers::chatgpt_codex::build_input_items 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.
  • goose::sources::list_sources_with_roots (cyclomatic 17) crates/goose/src/sources.rs:905 — goose::sources::list_sources_with_roots 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.
  • goose::agents::tool_schema_normalize::inline_refs_scoped (cyclomatic 16) crates/goose/src/agents/tool_schema_normalize.rs:280 — goose::agents::tool_schema_normalize::inline_refs_scoped 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.
  • goose::config::declarative_providers::update_custom_provider (cyclomatic 16) crates/goose/src/config/declarative_providers.rs:250 — goose::config::declarative_providers::update_custom_provider 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.
  • goose::context_mgmt::compact_messages (cyclomatic 16) crates/goose/src/context_mgmt/mod.rs:87 — goose::context_mgmt::compact_messages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • goose::providers::formats::bedrock::to_bedrock_message_content (cyclomatic 16) crates/goose/src/providers/formats/bedrock.rs:209 — goose::providers::formats::bedrock::to_bedrock_message_content has cyclomatic complexity 16 (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.
  • goose::providers::inventory::enrich_model_ids_with_canonical (cyclomatic 16) crates/goose/src/providers/inventory/mod.rs:1061 — goose::providers::inventory::enrich_model_ids_with_canonical has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · TodoComment · ×24
  • TodoComment ui/desktop/src/recipe/index.ts:19 — // TODO: Separate these from the raw recipe type — 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 ui/desktop/src/contexts/ChatContext.tsx:5 — // TODO(Douwe): We should not need this anymore — 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 ui/desktop/src/components/settings/permission/PermissionSetting.tsx:71 — // TODO(Douwe): this should really be a real extension: — 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 ui/desktop/src/components/settings/extensions/utils.ts:5 — // TODO: keep in sync with rust better — 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 ui/desktop/src/components/settings/app/AppSettingsSection.tsx:549 — // TODO: replace with AAIF logo asset — 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 ui/desktop/src/components/McpApps/McpAppRenderer.tsx:662 — // todo: pass permissions to SDK once it supports sendSandboxResourceReady — 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 documentation/scripts/community_stars.py:5 — # TODO: Update BLOCK_ORGS, is_block_employee(), and team categorization logic — 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 crates/goose-test-support/src/session.rs:7 — // TODO: add a Responses API mock to OpenAiFixture so tests can cover — 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 crates/goose-provider-types/src/canonical.rs:36 — /// TODO: This trades speed for correctness — the canonical registry may not perfectly — 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 crates/goose/tests/acp_fixtures/mod.rs:379 — // TODO: Paths::in_state_dir is global, ignoring per-test data_root — 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 crates/goose/tests/acp_common_tests/mod.rs:535 — // TODO: add a Responses API mock to OpenAiFixture for responses-routed models. — 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 crates/goose/tests/acp_common_tests/mod.rs:1044 — // TODO: add a Responses API mock to OpenAiFixture for responses-routed models. — 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 crates/goose/tests/acp_common_tests/mod.rs:1447 — // TODO: add a Responses API mock to OpenAiFixture so we can test with — 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 crates/goose/src/session/extension_data.rs:83 — /// TODO extension state implementation — 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 crates/goose/src/session/extension_data.rs:95 — /// Create a new TODO state — 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 crates/goose/src/session/extension_data.rs:261 — // Create and save TODO state — 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 crates/goose/src/session/extension_data.rs:265 — // Retrieve TODO state — 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 REDACTED:920 — // TODO: Remove this workaround once ModelConfig guarantees deserialize(serialize(config)) == config. — 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 crates/goose/src/providers/openai_def.rs:156 — // TODO(jack): replace this — 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 crates/goose/src/providers/formats/gcpvertexai.rs:288 — // TODO: Branch on publisher for format selection once we know which — 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 crates/goose/src/providers/formats/mod.rs:26 — // TODO: Remove this config fallback wrapper once gemini_oauth and Vertex/GCP Gemini — 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 crates/goose/src/otel/otlp.rs:365 — // TODO: remove once https://github.com/open-telemetry/opentelemetry-rust/pull/3351 is released.
  • TodoComment crates/goose/src/agents/platform_extensions/apps.rs:167 — // TODO(Douwe): we have the same check in cache, consider unifying that — 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 crates/goose/src/agents/extension_manager/streamable_http.rs:251 — // TODO: Remove this compatibility retry once rmcp handles empty discovery SSE — 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.
D3 · God Classes · ClassTooLong · ×24
  • ClassTooLong: SessionStorage REDACTED:837 — ClassTooLong — 1499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 2 blocks, lines 837-3021. The bar is 400 significant lines; this is 1099 over it, 3.75× 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: GooseAcpAgent crates/goose/src/acp/server.rs:313 — ClassTooLong — 1263 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 307 methods, 3 blocks, lines 313-2659. The bar is 400 significant lines; this is 863 over it, 3.16× 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: CliSession crates/goose-cli/src/session/mod.rs:239 — ClassTooLong — 1257 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 43 methods, 2 blocks, lines 239-2050. The bar is 400 significant lines; this is 857 over it, 3.14× 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: ChatInput ui/desktop/src/components/ChatInput.tsx:1 — ClassTooLong — 1255 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 855 over it, 3.14× 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: SummonClient crates/goose/src/agents/platform_extensions/summon.rs:390 — ClassTooLong — 822 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 3 blocks, lines 390-1515. The bar is 400 significant lines; this is 422 over it, 2.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SessionListView ui/desktop/src/components/sessions/SessionListView.tsx:1 — ClassTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 243 over it, 1.61× 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: CustomProviderForm ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:1 — ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 223 over it, 1.56× 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: RecipesView ui/desktop/src/components/recipes/RecipesView.tsx:1 — ClassTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 205 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Config crates/goose/src/config/base.rs:120 — ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 6 blocks, lines 120-1423. The bar is 400 significant lines; this is 195 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: AcpProvider crates/goose/src/acp/provider.rs:274 — ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 5 blocks, lines 274-1139. The bar is 400 significant lines; this is 185 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DatabricksProvider crates/goose-providers/src/databricks.rs:89 — ClassTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 4 blocks, lines 89-864. 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: SwitchModelModal ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:1 — ClassTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 168 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.
  • ClassTooLong: Scheduler crates/goose/src/scheduler/full.rs:99 — ClassTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 3 blocks, lines 99-1147. The bar is 400 significant lines; this is 150 over it, 1.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GatewayHandler crates/goose/src/gateway/handler.rs:52 — ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 52-824. The bar is 400 significant lines; this is 127 over it, 1.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: BedrockProvider crates/goose/src/providers/bedrock.rs:178 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 5 blocks, lines 178-1140. The bar is 400 significant lines; this is 93 over it, 1.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: ToolExecutionOperation crates/goose/src/agents/state_machine/ops_toolcalling.rs:352 — ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 352-1107. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ProviderInventoryService crates/goose/src/providers/inventory/mod.rs:194 — ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 2 blocks, lines 194-869. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ExtensionLease crates/goose/src/agents/extension_manager/lease.rs:195 — ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 2 blocks, lines 195-796. The bar is 400 significant lines; this is 57 over it, 1.14× 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: McpAppRenderer ui/desktop/src/components/McpApps/McpAppRenderer.tsx:1 — ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 48 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ClaudeCodeProvider crates/goose/src/providers/claude_code.rs:261 — ClassTooLong — 441 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 5 blocks, lines 261-1037. The bar is 400 significant lines; this is 41 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OpenAiProvider crates/goose-providers/src/openai.rs:129 — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 5 blocks, lines 129-933. The bar is 400 significant lines; this is 40 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GithubCopilotProvider crates/goose/src/providers/githubcopilot.rs:215 — ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 5 blocks, lines 215-779. The bar is 400 significant lines; this is 38 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BaseChat ui/desktop/src/components/BaseChat.tsx:1 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DownloadManager crates/goose-download-manager/src/lib.rs:87 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 3 blocks, lines 87-683. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X3 · Exception handling · Swallowed exception (empty catch) · ×23
  • Swallowed exception (empty catch) ui/goose-acp-client/generate-schema.ts:116 — 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) ui/desktop/src/main.ts:816 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/src/main.ts:2207 — 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) ui/desktop/src/App.tsx:450 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/src/App.tsx:453 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/src/utils/workingDir.ts:47 — 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) ui/desktop/src/liveVoice/LiveVoiceMediaSession.ts:110 — 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) ui/desktop/src/i18n/index.ts:83 — 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) ui/desktop/src/hooks/useFileDrop.ts:28 — 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) ui/desktop/src/components/GitBranchIndicator.tsx:54 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/src/components/GitBranchIndicator.tsx:76 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/src/components/MarkdownContent.tsx:264 — 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) ui/desktop/src/components/MentionPopover.tsx:414 — 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) ui/desktop/src/components/settings/localInference/HuggingFaceModelSearch.tsx:139 — 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) ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:412 — 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) ui/desktop/src/components/onboarding/LocalModelPicker.tsx:250 — 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) ui/desktop/src/components/Layout/AppLayout.tsx:52 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) ui/desktop/scripts/i18n-check.js:37 — 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:60 — 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) services/ask-ai-bot/utils/discord/thread-memory.ts:43 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:100 — 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) services/ask-ai-bot/events/messageCreate.ts:114 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) crates/goose/src/session/export_html/template.js:193 — 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.
D3 · God Classes · MethodTooLong · ×22
  • MethodTooLong: CliSession.process_agent_response crates/goose-cli/src/session/mod.rs:1310 — MethodTooLong — process_agent_response runs 285 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GatewayHandler.relay_to_session crates/goose/src/gateway/handler.rs:451 — MethodTooLong — relay_to_session runs 251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SessionStorage.apply_migration REDACTED:1459 — MethodTooLong — apply_migration runs 250 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ClaudeCodeProvider.stream crates/goose/src/providers/claude_code.rs:749 — MethodTooLong — stream runs 205 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LocalInferenceProvider.stream crates/goose-local-inference/src/lib.rs:775 — MethodTooLong — stream runs 199 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AcpProvider.stream crates/goose/src/acp/provider.rs:840 — MethodTooLong — stream runs 193 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 93 over it, 1.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.
  • MethodTooLong: AcpClientLoop.run crates/goose/src/acp/provider.rs:1207 — MethodTooLong — run runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DatabricksProvider.stream crates/goose-providers/src/databricks.rs:596 — MethodTooLong — stream runs 163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DownloadManager.download_one_file crates/goose-download-manager/src/lib.rs:425 — MethodTooLong — download_one_file runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MlxBackend.generate crates/goose-local-inference/src/mlx.rs:183 — MethodTooLong — generate runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ToolExecutionOperation.run crates/goose/src/agents/state_machine/ops_toolcalling.rs:910 — MethodTooLong — run runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InferenceRunner.infer crates/goose-agent/src/inference.rs:430 — MethodTooLong — infer runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SnowflakeProvider.post crates/goose-providers/src/snowflake.rs:100 — MethodTooLong — post runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CliSession.handle_model crates/goose-cli/src/session/mod.rs:886 — MethodTooLong — handle_model runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RemainingToolCallsOperation.run crates/goose/src/agents/state_machine/ops_remaining_tool_calls.rs:81 — MethodTooLong — run runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SessionStorage.create_schema REDACTED:1131 — MethodTooLong — create_schema runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GooseAcpAgent.forward_agent_stream crates/goose/src/acp/server.rs:2111 — MethodTooLong — forward_agent_stream runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BedrockProvider.stream crates/goose/src/providers/bedrock.rs:965 — MethodTooLong — stream runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SessionStorage.apply_update REDACTED:1911 — MethodTooLong — apply_update runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LlamaCppBackend.generate crates/goose-local-inference/src/llamacpp/mod.rs:463 — MethodTooLong — generate runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RecipeOperation.run crates/goose/src/agents/state_machine/ops_recipe.rs:248 — MethodTooLong — run runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GooseAcpAgent.handle_message_content crates/goose/src/acp/server.rs:1347 — MethodTooLong — handle_message_content runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D1 · Cyclomatic Complexity · goose_provider_types · ×20
  • goose_provider_types::formats::openai::response_to_streaming_message (cyclomatic 93) crates/goose-provider-types/src/formats/openai.rs:1267 — goose_provider_types::formats::openai::response_to_streaming_message has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • goose_provider_types::formats::anthropic::response_to_streaming_message (cyclomatic 54) crates/goose-provider-types/src/formats/anthropic.rs:1005 — goose_provider_types::formats::anthropic::response_to_streaming_message 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.
  • goose_provider_types::formats::openai::format_messages_with_options (cyclomatic 52) crates/goose-provider-types/src/formats/openai.rs:242 — goose_provider_types::formats::openai::format_messages_with_options 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.
  • goose_provider_types::formats::anthropic::format_messages_with_options (cyclomatic 42) crates/goose-provider-types/src/formats/anthropic.rs:285 — goose_provider_types::formats::anthropic::format_messages_with_options 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.
  • goose_provider_types::formats::openai_responses::responses_api_to_streaming_message (cyclomatic 32) crates/goose-provider-types/src/formats/openai_responses.rs:1089 — goose_provider_types::formats::openai_responses::responses_api_to_streaming_message 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.
  • goose_provider_types::formats::google::format_messages (cyclomatic 31) crates/goose-provider-types/src/formats/google.rs:80 — goose_provider_types::formats::google::format_messages 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.
  • goose_provider_types::formats::databricks::format_messages (cyclomatic 27) crates/goose-provider-types/src/formats/databricks.rs:126 — goose_provider_types::formats::databricks::format_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.
  • goose_provider_types::formats::openai_responses::create_responses_request_for_model (cyclomatic 26) crates/goose-provider-types/src/formats/openai_responses.rs:630 — goose_provider_types::formats::openai_responses::create_responses_request_for_model 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.
  • goose_provider_types::formats::google::response_to_streaming_message (cyclomatic 24) crates/goose-provider-types/src/formats/google.rs:454 — goose_provider_types::formats::google::response_to_streaming_message 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.
  • goose_provider_types::formats::snowflake::format_messages (cyclomatic 23) crates/goose-provider-types/src/formats/snowflake.rs:14 — goose_provider_types::formats::snowflake::format_messages 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.
  • goose_provider_types::canonical::name_builder::map_to_canonical_model (cyclomatic 21) crates/goose-provider-types/src/canonical/name_builder.rs:68 — goose_provider_types::canonical::name_builder::map_to_canonical_model 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.
  • goose_provider_types::formats::openai_responses::add_message_items (cyclomatic 20) crates/goose-provider-types/src/formats/openai_responses.rs:411 — goose_provider_types::formats::openai_responses::add_message_items 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.
  • goose_provider_types::thinking::parse_think_tag (cyclomatic 20) crates/goose-provider-types/src/thinking.rs:188 — goose_provider_types::thinking::parse_think_tag 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.
  • goose_provider_types::conversation::fix_tool_calling (cyclomatic 19) crates/goose-provider-types/src/conversation.rs:426 — goose_provider_types::conversation::fix_tool_calling 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.
  • goose_provider_types::formats::databricks::response_to_message (cyclomatic 19) crates/goose-provider-types/src/formats/databricks.rs:375 — goose_provider_types::formats::databricks::response_to_message 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.
  • goose_provider_types::formats::openai::response_to_message (cyclomatic 19) crates/goose-provider-types/src/formats/openai.rs:742 — goose_provider_types::formats::openai::response_to_message 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.
  • goose_provider_types::formats::anthropic::apply_thinking_config (cyclomatic 18) crates/goose-provider-types/src/formats/anthropic.rs:828 — goose_provider_types::formats::anthropic::apply_thinking_config 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.
  • goose_provider_types::formats::openai::merge_split_tool_call_messages (cyclomatic 18) crates/goose-provider-types/src/formats/openai.rs:599 — goose_provider_types::formats::openai::merge_split_tool_call_messages 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.
  • goose_provider_types::formats::snowflake::parse_streaming_response (cyclomatic 18) crates/goose-provider-types/src/formats/snowflake.rs:141 — goose_provider_types::formats::snowflake::parse_streaming_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.
  • goose_provider_types::formats::openai::create_request_for_model_with_options (cyclomatic 17) crates/goose-provider-types/src/formats/openai.rs:1744 — goose_provider_types::formats::openai::create_request_for_model_with_options 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 · ×20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×20
  • Duplicated block (7 lines × 2) crates/goose-providers/src/anthropic.rs:386 — crates/goose-providers/src/anthropic.rs:386-392 | crates/goose-providers/src/ollama.rs:526-532 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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) crates/goose-providers/src/openai_compatible.rs:281 — crates/goose-providers/src/openai_compatible.rs:281-287 | crates/goose-providers/src/openai_compatible.rs:312-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/goose/src/acp/server/providers.rs:106 — crates/goose/src/acp/server/providers.rs:106-112 | crates/goose/src/providers/inventory/mod.rs:1042-1048 — 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) crates/goose/src/agents/mcp_client.rs:691 — crates/goose/src/agents/mcp_client.rs:691-697 | crates/goose/src/agents/mcp_client.rs:854-860 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/goose/src/agents/platform_extensions/analyze/parser.rs:280 — crates/goose/src/agents/platform_extensions/analyze/parser.rs:280-286 | crates/goose/src/agents/platform_extensions/analyze/parser.rs:289-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.
  • Duplicated block (7 lines × 2) crates/goose/src/gateway/telegram.rs:506 — crates/goose/src/gateway/telegram.rs:506-512 | crates/goose/src/skills/supporting_files.rs:661-667 — before extracting anything, compare `crates/goose/src/gateway/telegram.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (7 lines × 2) crates/goose/src/providers/chatgpt_codex.rs:683 — crates/goose/src/providers/chatgpt_codex.rs:683-689 | crates/goose/src/providers/gemini_oauth.rs:593-599 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. 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) crates/goose/src/providers/chatgpt_codex.rs:1047 — crates/goose/src/providers/chatgpt_codex.rs:1047-1053 | crates/goose/src/providers/xai_oauth.rs:761-767 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/goose/src/providers/claude_code.rs:307 — crates/goose/src/providers/claude_code.rs:307-313 | crates/goose/src/providers/codex.rs:504-510 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/goose/src/providers/huggingface.rs:152 — crates/goose/src/providers/huggingface.rs:152-158 | crates/goose/src/providers/ollama_cloud.rs:217-223 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/goose/src/providers/huggingface_auth.rs:462 — crates/goose/src/providers/huggingface_auth.rs:462-468 | crates/goose/src/providers/xai_oauth.rs:463-469 — before extracting anything, compare `crates/goose/src/providers/huggingface_auth.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 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) crates/goose/src/session/import_formats/claude_code.rs:19 — crates/goose/src/session/import_formats/claude_code.rs:19-25 | crates/goose/src/session/import_formats/codex.rs:32-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.
  • Duplicated block (7 lines × 2) crates/goose/src/session/import_formats/claude_code.rs:274 — crates/goose/src/session/import_formats/claude_code.rs:274-280 | crates/goose/src/session/import_formats/pi.rs:328-334 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 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) crates/goose/src/sources.rs:923 — crates/goose/src/sources.rs:923-929 | crates/goose/src/sources.rs:972-978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/goose/src/acp/server/onboarding.rs:202 — crates/goose/src/acp/server/onboarding.rs:202-208 | crates/goose/src/plugins/formats/open_plugins.rs:519-525 — 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) crates/goose/src/agents/platform_extensions/analyze/mod.rs:77 — crates/goose/src/agents/platform_extensions/analyze/mod.rs:77-83 | crates/goose/src/agents/platform_extensions/developer/mod.rs: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) crates/goose/src/providers/chatgpt_codex.rs:872 — crates/goose/src/providers/chatgpt_codex.rs:872-878 | crates/goose/src/providers/xai_oauth.rs:688-694 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/goose-download-manager/src/lib.rs:513 — crates/goose-download-manager/src/lib.rs:513-519 | crates/goose-download-manager/src/lib.rs:638-647 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/goose-cli/src/session/builder.rs:416 — crates/goose-cli/src/session/builder.rs:416-422 | crates/goose-cli/src/session/builder.rs:427-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/goose-mcp/src/computercontroller/pdf_tool.rs:194 — crates/goose-mcp/src/computercontroller/pdf_tool.rs:194-200 | crates/goose-mcp/src/computercontroller/pdf_tool.rs:229-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D30 · Dependency Vulnerabilities · Medium CVE · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×18
  • Duplicated block (11 lines × 2) crates/goose-agent/src/inference.rs:230 — crates/goose-agent/src/inference.rs:230-240 | crates/goose/src/agents/gen_ai_telemetry.rs:70-80 — 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) crates/goose-agent/src/skills/discovery.rs:42 — crates/goose-agent/src/skills/discovery.rs:42-52 | crates/goose/src/sources.rs:23-33 — 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) crates/goose-cli/src/commands/review/handler.rs:582 — crates/goose-cli/src/commands/review/handler.rs:582-592 | crates/goose/src/skills/supporting_files.rs:252-262 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (11 lines × 2) crates/goose-cli/src/commands/review/handler.rs:646 — crates/goose-cli/src/commands/review/handler.rs:646-656 | crates/goose/src/skills/supporting_files.rs:454-464 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (11 lines × 2) crates/goose-cli/src/session/output.rs:334 — crates/goose-cli/src/session/output.rs:334-344 | crates/goose-cli/src/session/output.rs:431-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/goose-provider-types/src/formats/openai_responses.rs:1023 — crates/goose-provider-types/src/formats/openai_responses.rs:1023-1033 | crates/goose-provider-types/src/formats/openai_responses.rs:1045-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.
  • Duplicated block (11 lines × 2) crates/goose-providers/src/databricks.rs:128 — crates/goose-providers/src/databricks.rs:128-138 | crates/goose-providers/src/databricks_v2.rs:127-137 — before extracting anything, compare `crates/goose-providers/src/databricks.rs` and `crates/goose-providers/src/databricks_v2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (11 lines × 2) crates/goose/src/acp/server/providers.rs:838 — crates/goose/src/acp/server/providers.rs:838-848 | crates/goose/src/providers/inventory/mod.rs:856-866 — 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) crates/goose/src/agents/mcp_client.rs:699 — crates/goose/src/agents/mcp_client.rs:699-709 | crates/goose/src/agents/mcp_client.rs:862-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.
  • Duplicated block (11 lines × 2) crates/goose/src/agents/platform_extensions/chatrecall.rs:325 — crates/goose/src/agents/platform_extensions/chatrecall.rs:325-335 | crates/goose/src/agents/platform_extensions/todo.rs:149-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/goose/src/agents/state_machine/ops_skills.rs:173 — crates/goose/src/agents/state_machine/ops_skills.rs:173-183 | crates/goose/src/skills/client.rs:188-198 — 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) crates/goose/src/session/import_formats/codex.rs:232 — crates/goose/src/session/import_formats/codex.rs:232-242 | crates/goose/src/session/import_formats/pi.rs:197-207 — before extracting anything, compare `crates/goose/src/session/import_formats/codex.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 (11 lines × 2) crates/goose/src/sources.rs:705 — crates/goose/src/sources.rs:705-715 | crates/goose/src/sources.rs:810-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/goose-provider-types/src/utils.rs:19 — crates/goose-provider-types/src/utils.rs:19-29 | crates/goose/src/providers/utils.rs:38-48 — 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) crates/goose/src/providers/chatgpt_codex.rs:899 — crates/goose/src/providers/chatgpt_codex.rs:899-909 | crates/goose/src/providers/gemini_oauth.rs:848-858 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. 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 (11 lines × 2) crates/goose-provider-types/src/formats/databricks.rs:245 — crates/goose-provider-types/src/formats/databricks.rs:245-255 | crates/goose-provider-types/src/formats/openai.rs:460-470 — before extracting anything, compare `crates/goose-provider-types/src/formats/databricks.rs` and `crates/goose-provider-types/src/formats/openai.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (11 lines × 2) crates/goose-providers/src/openrouter.rs:140 — crates/goose-providers/src/openrouter.rs:140-150 | crates/goose/src/providers/nanogpt.rs:135-145 — 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) crates/goose/src/skills/supporting_files.rs:114 — crates/goose/src/skills/supporting_files.rs:114-124 | crates/goose/src/skills/supporting_files.rs:137-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×17
  • Duplicated block (8 lines × 2) crates/goose-mcp/src/autovisualiser/mod.rs:774 — crates/goose-mcp/src/autovisualiser/mod.rs:774-781 | crates/goose-mcp/src/autovisualiser/mod.rs:784-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose-provider-types/src/thinking.rs:106 — crates/goose-provider-types/src/thinking.rs:106-113 | crates/goose-provider-types/src/thinking.rs:116-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose-providers/src/anthropic.rs:286 — crates/goose-providers/src/anthropic.rs:286-293 | crates/goose-providers/src/openai.rs:618-625 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/openai.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/goose-providers/src/google.rs:183 — crates/goose-providers/src/google.rs:183-190 | crates/goose/src/providers/gemini_oauth.rs:1015-1022 — 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) crates/goose-sdk/src/bindings.rs:813 — crates/goose-sdk/src/bindings.rs:813-820 | crates/goose-sdk/src/bindings.rs:856-863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose/src/plugins/mod.rs:101 — crates/goose/src/plugins/mod.rs:101-108 | crates/goose/src/skills/mod.rs:153-160 — 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) crates/goose-agent/src/inference.rs:207 — crates/goose-agent/src/inference.rs:207-214 | crates/goose/src/agents/gen_ai_telemetry.rs:82-89 — 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) crates/goose-mcp/src/subprocess.rs:22 — crates/goose-mcp/src/subprocess.rs:22-29 | crates/goose/src/subprocess.rs:58-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 (8 lines × 2) crates/goose-provider-types/src/formats/openai.rs:1258 — crates/goose-provider-types/src/formats/openai.rs:1258-1265 | crates/goose-provider-types/src/formats/openai_responses.rs:1060-1067 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/goose/src/acp/provider.rs:831 — crates/goose/src/acp/provider.rs:831-838 | crates/goose/src/providers/claude_code.rs:740-747 — 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) crates/goose-providers/src/databricks.rs:360 — crates/goose-providers/src/databricks.rs:360-370 | crates/goose-providers/src/databricks.rs:811-818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose/src/doctor.rs:115 — crates/goose/src/doctor.rs:115-123 | crates/goose/src/doctor.rs:133-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose-providers/src/snowflake.rs:205 — crates/goose-providers/src/snowflake.rs:205-212 | crates/goose-providers/src/snowflake.rs:223-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose-providers/src/databricks.rs:371 — crates/goose-providers/src/databricks.rs:371-378 | crates/goose-providers/src/databricks.rs:819-826 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose-mcp/src/autovisualiser/mod.rs:857 — crates/goose-mcp/src/autovisualiser/mod.rs:857-864 | crates/goose-mcp/src/autovisualiser/mod.rs:913-920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose/src/agents/platform_extensions/analyze/parser.rs:219 — crates/goose/src/agents/platform_extensions/analyze/parser.rs:219-226 | crates/goose/src/agents/platform_extensions/analyze/parser.rs:289-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/goose/src/providers/bedrock.rs:212 — crates/goose/src/providers/bedrock.rs:212-219 | crates/goose/src/providers/sagemaker_tgi.rs:53-60 — 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.
AC3 · Page structure · Page without a main landmark · ×15
  • Page without a main landmark REDACTED: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 REDACTED: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 REDACTED: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 REDACTED: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 REDACTED: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 REDACTED: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 REDACTED: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 REDACTED: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 crates/goose/src/config/signup_openrouter/templates/error.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 crates/goose/src/config/signup_openrouter/templates/invalid.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 crates/goose/src/config/signup_openrouter/templates/success.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 crates/goose/src/config/signup_tetrate/templates/error.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 crates/goose/src/config/signup_tetrate/templates/invalid.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 crates/goose/src/config/signup_tetrate/templates/success.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 crates/goose/src/oauth/oauth_callback.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 · goose_cli · ×14
  • goose_cli::session::input::handle_slash_command (cyclomatic 30) crates/goose-cli/src/session/input.rs:220 — goose_cli::session::input::handle_slash_command has cyclomatic complexity 30 (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.
  • goose_cli::session::elicitation::collect_elicitation_input_inner (cyclomatic 26) crates/goose-cli/src/session/elicitation.rs:61 — goose_cli::session::elicitation::collect_elicitation_input_inner 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.
  • goose_cli::commands::configure::configure_single_key (cyclomatic 25) crates/goose-cli/src/commands/configure.rs:709 — goose_cli::commands::configure::configure_single_key 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.
  • goose_cli::cli::handle_local_models_command (cyclomatic 24) crates/goose-cli/src/cli.rs:2573 — goose_cli::cli::handle_local_models_command 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.
  • goose_cli::commands::review::handler::handle_review (cyclomatic 23) crates/goose-cli/src/commands/review/handler.rs:74 — goose_cli::commands::review::handler::handle_review 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.
  • goose_cli::commands::configure::configure_provider_dialog (cyclomatic 21) crates/goose-cli/src/commands/configure.rs:832 — goose_cli::commands::configure::configure_provider_dialog 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.
  • goose_cli::session::builder::try_build_session (cyclomatic 21) crates/goose-cli/src/session/builder.rs:664 — goose_cli::session::builder::try_build_session 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.
  • goose_cli::session::output::render_message_streaming (cyclomatic 21) crates/goose-cli/src/session/output.rs:371 — goose_cli::session::output::render_message_streaming has cyclomatic complexity 21 (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.
  • goose_cli::cli::handle_mcp_probe (cyclomatic 18) crates/goose-cli/src/cli.rs:1463 — goose_cli::cli::handle_mcp_probe has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: goose_cli::cli::cli (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • goose_cli::commands::review::orchestrator::take_quoted (cyclomatic 18) crates/goose-cli/src/commands/review/orchestrator.rs:490 — goose_cli::commands::review::orchestrator::take_quoted has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • goose_cli::session::builder::resolve_provider_and_model (cyclomatic 18) crates/goose-cli/src/session/builder.rs:289 — goose_cli::session::builder::resolve_provider_and_model 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.
  • goose_cli::session::output::render_message (cyclomatic 18) crates/goose-cli/src/session/output.rs:303 — goose_cli::session::output::render_message has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • goose_cli::session::output::extract_markdown_table (cyclomatic 18) crates/goose-cli/src/session/output.rs:1181 — goose_cli::session::output::extract_markdown_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.
  • goose_cli::bin::generate_manpages::generate_see_also (cyclomatic 17) crates/goose-cli/src/bin/generate_manpages.rs:110 — goose_cli::bin::generate_manpages::generate_see_also 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.
D35 · Change Coupling · Change coupling · ×14
  • Change coupling: main.ts ↔ preload.ts ui/desktop/src/main.ts:1 — `ui/desktop/src/main.ts` and `ui/desktop/src/preload.ts` change together 93% of the time (63 of the 68 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 63 shared commits counted here, the most recent 3 are `0276d567` feat(allowlist): require HTTPS and validate redirects, block on polic…; `d7592d5d` Remove unused open-in-chrome IPC handler (#12455); `fd9f76d9` fix(desktop): gate external URL protocols centrally (#11311) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ init.rs crates/goose/src/providers/formats/mod.rs:1 — `crates/goose/src/providers/formats/mod.rs` and `crates/goose/src/providers/init.rs` change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `9d0c9859` migrate openrouter provider to goose-providers (#11757); `8e18f074` move google provider into goose-providers (#10216); `3eb9f50a` move snowflake (#10218) — run `git show` on any of them.
  • Change coupling: schedule_tool.rs ↔ full.rs crates/goose/src/agents/schedule_tool.rs:1 — `crates/goose/src/agents/schedule_tool.rs` and `crates/goose/src/scheduler/full.rs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b92c60c6` fix(schedule): validate recipes consistently (#11561) (at that commit the file was still `crates/goose/src/scheduler.rs`); `ae83c0a2` fix: bound scheduled recipe validation (#10509) (at that commit the file was still `crates/goose/src/scheduler.rs`); `ba60b597` feat(CLI): Add optional --parameters to scheduled recipe (#8741) (at that commit the file was still `crates/goose/src/scheduler.rs`) — run `git show` on any of them.
  • Change coupling: summon.rs ↔ client.rs crates/goose/src/agents/platform_extensions/summon.rs:1 — `crates/goose/src/agents/platform_extensions/summon.rs` and `crates/goose/src/skills/client.rs` change together 69% of the time (9 of the 13 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 9 shared commits counted here, the most recent 3 are `df899654` fix: contain and bound skill supporting file reads (#11342); `6251e563` feat(sdk): minimal uniffi setup for cross language sdk (#9593); `7dbdfa43` flag for login shell PATH (#9313) — run `git show` on any of them.
  • Change coupling: AppSettingsSection.tsx ↔ main.ts ui/desktop/src/components/settings/app/AppSettingsSection.tsx:1 — `ui/desktop/src/components/settings/app/AppSettingsSection.tsx` and `ui/desktop/src/main.ts` change together 63% of the time (17 of the 27 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 17 shared commits counted here, the most recent 3 are `9ff73763` feat(i18n): add fr, de, it, pt, id, ms, vi, zh-TW desktop locales (#1…; `f108282f` Add Korean localization to desktop app (#9856); `56812f46` i18n: add Spanish (es) locale support (#9833) — run `git show` on any of them.
  • Change coupling: cursor_agent.rs ↔ gemini_cli.rs crates/goose/src/providers/cursor_agent.rs:1 — `crates/goose/src/providers/cursor_agent.rs` and `crates/goose/src/providers/gemini_cli.rs` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `feecb14f` fix(security): bind CLI session naming to trusted path (#11787); `971d2178` fix: keep CLI provider prompts out of process arguments (#10547); `2631095f` feat(otel): propagate session.id to spans and log records (#7490) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ export_markdown.rs crates/goose-cli/src/session/mod.rs:1 — `crates/goose-cli/src/session/mod.rs` and `crates/goose/src/session/export_markdown.rs` 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 `06f218cd` feat(desktop): add markdown format option to session export (#10703); `8168cb83` fix(acp): preserve content audience boundaries (#10493) (at that commit the file was still `crates/goose-cli/src/session/export.rs`); `ee1a2e49` feat: propagate elicitation decline and cancel actions end-to-end (#9… (at that commit the file was still `crates/goose-cli/src/session/export.rs`) — run `git show` on any of them.
  • Change coupling: ExtensionsSection.tsx ↔ ExtensionItem.tsx ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:1 — `ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx` and `ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 9 shared commits counted here, the most recent 3 are `ec6faf92` Add pending extension indicator to extension panel (#5493); `031b8b72` fix redirect to extensions page after deeplink install and show toast…; `b18213cf` Add inline python extension (#3107) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ platform_tools.rs crates/goose/src/agents/extension_manager/mod.rs:1 — `crates/goose/src/agents/extension_manager/mod.rs` and `crates/goose/src/agents/platform_tools.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `09752aa7` Revert "Revert "Rewrite extension management tools"" (#5273) (at that commit the file was still `crates/goose/src/agents/extension_manager.rs`); `c6620396` Revert "Rewrite extension management tools" (#5243) (at that commit the file was still `crates/goose/src/agents/extension_manager.rs`); `bccfa015` Rewrite extension management tools (#5057) (at that commit the file was still `crates/goose/src/agents/extension_manager.rs`) — run `git show` on any of them.
  • Change coupling: openai.rs ↔ xai.rs crates/goose-providers/src/openai.rs:1 — `crates/goose-providers/src/openai.rs` and `crates/goose/src/providers/xai.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `8fd84be2` fix(providers): drive pre-key model lists from the canonical registry…; `1c820add` OpenRouter & Xai streaming (#5873) (at that commit the file was still `crates/goose/src/providers/openai.rs`); `9b4c8726` improve provider request logging a bit (#5236) (at that commit the file was still `crates/goose/src/providers/openai.rs`) — run `git show` on any of them.
  • Change coupling: App.tsx ↔ ModeSection.tsx ui/desktop/src/App.tsx:1 — `ui/desktop/src/App.tsx` and `ui/desktop/src/components/settings/mode/ModeSection.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `3952f64e` Redesign settings as a full-screen view (#12163); `d97d07fe` chore: clean up ui as we don't have session based permission setting …; `7027de62` Move token limits to backend (#2484) (at that commit the file was still `ui/desktop/src/components/settings_v2/mode/ModeSection.tsx`) — run `git show` on any of them.
  • Change coupling: chatSessionController.ts ↔ BaseChat.tsx ui/desktop/src/acp/chatSessionController.ts:1 — `ui/desktop/src/acp/chatSessionController.ts` and `ui/desktop/src/components/BaseChat.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d7ae5f84` fix(desktop): allow removing images when editing user messages (#9979); `da0cd425` feat (ui): reconnect desktop ACP sessions after sleep and connection …; `bb4a9a79` removed unnecessary call setRecipeParams for acp enabled path (#10003) — run `git show` on any of them.
  • Change coupling: azure.rs ↔ xai.rs crates/goose/src/providers/azure.rs:1 — `crates/goose/src/providers/azure.rs` and `crates/goose/src/providers/xai.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d039f3f6` fix(providers): Azure OpenAI model listing 404 during configure (#7034); `1c820add` OpenRouter & Xai streaming (#5873); `9b4c8726` improve provider request logging a bit (#5236) — run `git show` on any of them.
  • Change coupling: schedule.rs ↔ schedule_tool.rs crates/goose-cli/src/commands/schedule.rs:1 — `crates/goose-cli/src/commands/schedule.rs` and `crates/goose/src/agents/schedule_tool.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d2687643` fix(schedule): use session.message_count for schedule sessions listin…; `ba60b597` feat(CLI): Add optional --parameters to scheduled recipe (#8741); `17c12bfb` fix: unscheduling a recipe should not delete them (#8978) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×14
  • Duplicated block (12 lines × 2) crates/goose-cli/src/session/output.rs:1311 — crates/goose-cli/src/session/output.rs:1311-1322 | crates/goose-cli/src/session/output.rs:1327-1338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/goose-provider-types/src/conversation/message.rs:398 — crates/goose-provider-types/src/conversation/message.rs:398-409 | crates/goose-provider-types/src/conversation/message.rs:411-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.
  • Duplicated block (12 lines × 2) crates/goose-provider-types/src/model.rs:319 — crates/goose-provider-types/src/model.rs:319-330 | crates/goose-provider-types/src/model.rs:335-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/goose-providers/src/databricks.rs:672 — crates/goose-providers/src/databricks.rs:672-683 | crates/goose-providers/src/databricks_v2.rs:363-375 — before extracting anything, compare `crates/goose-providers/src/databricks.rs` and `crates/goose-providers/src/databricks_v2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (12 lines × 2) crates/goose/src/agents/reply_parts.rs:499 — crates/goose/src/agents/reply_parts.rs:499-510 | crates/goose/src/agents/reply_parts.rs: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.
  • Duplicated block (12 lines × 2) crates/goose/src/config/signup_openrouter/mod.rs:148 — crates/goose/src/config/signup_openrouter/mod.rs:148-159 | crates/goose/src/config/signup_tetrate/mod.rs:145-156 — `crates/goose/src/config/signup_openrouter/mod.rs` and `crates/goose/src/config/signup_tetrate/mod.rs` 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 4 separate duplicated blocks between them, totalling at least 58 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 (12 lines × 2) crates/goose/src/hooks/mod.rs:511 — crates/goose/src/hooks/mod.rs:511-522 | crates/goose/src/hooks/mod.rs:532-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/goose/src/providers/chatgpt_codex.rs:552 — crates/goose/src/providers/chatgpt_codex.rs:552-563 | crates/goose/src/providers/gemini_oauth.rs:259-270 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. 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 (12 lines × 2) crates/goose/src/providers/chatgpt_codex.rs:579 — crates/goose/src/providers/chatgpt_codex.rs:579-590 | crates/goose/src/providers/gemini_oauth.rs:287-298 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. 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 (12 lines × 2) crates/goose/src/providers/databricks_def.rs:82 — crates/goose/src/providers/databricks_def.rs:82-93 | crates/goose/src/providers/databricks_v2_def.rs:81-92 — 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) crates/goose/src/agents/state_machine/ops_recipe.rs:211 — crates/goose/src/agents/state_machine/ops_recipe.rs:211-222 | crates/goose/src/agents/state_machine/ops_skills.rs:286-297 — before extracting anything, compare `crates/goose/src/agents/state_machine/ops_recipe.rs` and `crates/goose/src/agents/state_machine/ops_skills.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/goose/src/agents/platform_extensions/analyze/parser.rs:228 — crates/goose/src/agents/platform_extensions/analyze/parser.rs:228-239 | crates/goose/src/agents/platform_extensions/analyze/parser.rs:265-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/goose/src/providers/gemini_oauth.rs:352 — crates/goose/src/providers/gemini_oauth.rs:352-363 | crates/goose/src/providers/gemini_oauth.rs:379-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 (12 lines × 2) crates/goose-provider-types/src/formats/anthropic.rs:971 — crates/goose-provider-types/src/formats/anthropic.rs:971-982 | crates/goose-provider-types/src/formats/databricks.rs:583-594 — 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 (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) crates/goose-cli/src/commands/review/handler.rs:388 — crates/goose-cli/src/commands/review/handler.rs:388-396 | crates/goose-cli/src/commands/review/handler.rs:466-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/goose-cli/src/commands/roam.rs:331 — crates/goose-cli/src/commands/roam.rs:331-339 | crates/goose-cli/src/commands/roam.rs:365-373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/goose-local-inference/src/management.rs:402 — crates/goose-local-inference/src/management.rs:402-410 | crates/goose-local-inference/src/management.rs:427-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/goose/src/acp/server.rs:1383 — crates/goose/src/acp/server.rs:1383-1391 | crates/goose/src/acp/server/load_session.rs:182-190 — 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) crates/goose/src/agents/platform_extensions/summon.rs:821 — crates/goose/src/agents/platform_extensions/summon.rs:821-829 | crates/goose/src/skills/client.rs:215-223 — 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) crates/goose/src/gateway/telegram.rs:152 — crates/goose/src/gateway/telegram.rs:152-160 | crates/goose/src/gateway/telegram.rs:243-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 (9 lines × 2) crates/goose/src/skills/supporting_files.rs:293 — crates/goose/src/skills/supporting_files.rs:293-301 | crates/goose/src/skills/supporting_files.rs:327-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/goose/src/skills/supporting_files.rs:505 — crates/goose/src/skills/supporting_files.rs:505-513 | crates/goose/src/skills/supporting_files.rs:543-551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/goose/src/session/import_formats/claude_code.rs:302 — crates/goose/src/session/import_formats/claude_code.rs:302-310 | crates/goose/src/session/import_formats/pi.rs:353-361 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 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 (9 lines × 2) crates/goose/src/providers/huggingface_auth.rs:506 — crates/goose/src/providers/huggingface_auth.rs:506-514 | crates/goose/src/providers/xai_oauth.rs:507-517 — before extracting anything, compare `crates/goose/src/providers/huggingface_auth.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 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 (9 lines × 2) crates/goose-cli/src/commands/review/orchestrator.rs:125 — crates/goose-cli/src/commands/review/orchestrator.rs:125-134 | crates/goose-cli/src/commands/review/orchestrator.rs:355-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.
  • Duplicated block (9 lines × 2) crates/goose-mcp/src/computercontroller/mod.rs:622 — crates/goose-mcp/src/computercontroller/mod.rs:622-630 | crates/goose-mcp/src/computercontroller/mod.rs:733-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.
  • Duplicated block (9 lines × 2) crates/goose/src/gateway/telegram.rs:192 — crates/goose/src/gateway/telegram.rs:192-200 | crates/goose/src/gateway/telegram.rs:207-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.
  • Duplicated block (9 lines × 2) crates/goose-provider-types/src/formats/openai.rs:933 — crates/goose-provider-types/src/formats/openai.rs:933-941 | crates/goose-provider-types/src/formats/openai.rs:944-952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) crates/goose-cli/src/commands/review/handler.rs:480 — crates/goose-cli/src/commands/review/handler.rs:480-485 | crates/goose/src/skills/supporting_files.rs:182-187 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (6 lines × 2) crates/goose-local-inference/src/paths.rs:33 — crates/goose-local-inference/src/paths.rs:33-38 | crates/goose/src/config/paths.rs:33-38 — 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) crates/goose-providers/src/anthropic.rs:295 — crates/goose-providers/src/anthropic.rs:295-300 | crates/goose-providers/src/openai.rs:627-632 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/openai.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/goose-providers/src/openai.rs:906 — crates/goose-providers/src/openai.rs:906-913 | crates/goose-providers/src/openai_compatible.rs:134-139 — before extracting anything, compare `crates/goose-providers/src/openai.rs` and `crates/goose-providers/src/openai_compatible.rs` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/goose-providers/src/openai_compatible.rs:262 — crates/goose-providers/src/openai_compatible.rs:262-267 | crates/goose-providers/src/openai_compatible.rs:293-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.
  • Duplicated block (6 lines × 2) crates/goose/src/providers/githubcopilot.rs:479 — crates/goose/src/providers/githubcopilot.rs:479-485 | crates/goose/src/providers/githubcopilot.rs:720-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/goose/src/session/import_formats/claude_code.rs:170 — crates/goose/src/session/import_formats/claude_code.rs:170-175 | crates/goose/src/session/import_formats/pi.rs:240-245 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/goose-cli/src/commands/review/handler.rs:959 — crates/goose-cli/src/commands/review/handler.rs:959-964 | crates/goose/src/skills/supporting_files.rs:711-716 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (6 lines × 2) crates/goose-cli/src/commands/roam.rs:564 — crates/goose-cli/src/commands/roam.rs:564-569 | crates/goose-roaming/src/node.rs:636-641 — 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) crates/goose/src/acp/server/elicitation.rs:177 — crates/goose/src/acp/server/elicitation.rs:177-183 | crates/goose/src/acp/server/recipe/mod.rs:500-505 — 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) crates/goose/src/agents/platform_extensions/analyze/mod.rs:87 — crates/goose/src/agents/platform_extensions/analyze/mod.rs:87-92 | crates/goose/src/agents/platform_extensions/developer/mod.rs:101-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.
  • Duplicated block (6 lines × 2) crates/goose/src/providers/huggingface_auth.rs:246 — crates/goose/src/providers/huggingface_auth.rs:246-251 | crates/goose/src/providers/xai_oauth.rs:156-161 — before extracting anything, compare `crates/goose/src/providers/huggingface_auth.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/goose/src/security/egress_inspector.rs:80 — crates/goose/src/security/egress_inspector.rs:80-85 | crates/goose/src/security/egress_inspector.rs:92-97 — both copies are in the same file, so extract the 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) · ×12
  • Duplicated block (13 lines × 2) crates/goose-context-management/src/templates.rs:35 — crates/goose-context-management/src/templates.rs:35-47 | crates/goose/src/prompt_template.rs:77-89 — 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 (13 lines × 2) crates/goose-providers/src/databricks_v2.rs:422 — crates/goose-providers/src/databricks_v2.rs:422-434 | crates/goose/src/providers/nanogpt.rs:200-212 — 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 (13 lines × 2) crates/goose/src/acp/provider.rs:1597 — crates/goose/src/acp/provider.rs:1597-1609 | crates/goose/src/acp/provider.rs:1645-1657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/goose/src/agents/platform_extensions/summon.rs:145 — crates/goose/src/agents/platform_extensions/summon.rs:145-157 | crates/goose/src/agents/platform_extensions/summon.rs:214-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/goose/src/agents/state_machine/ops_tool_approval.rs:183 — crates/goose/src/agents/state_machine/ops_tool_approval.rs:183-195 | crates/goose/src/agents/state_machine/ops_toolcalling.rs:674-686 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/goose/src/bin/generate_acp_schema.rs:185 — crates/goose/src/bin/generate_acp_schema.rs:185-197 | crates/goose/src/bin/generate_acp_schema.rs:266-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 (13 lines × 2) crates/goose/src/hooks/mod.rs:565 — crates/goose/src/hooks/mod.rs:565-577 | crates/goose/src/hooks/mod.rs:633-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/goose/src/providers/cursor_agent.rs:297 — crates/goose/src/providers/cursor_agent.rs:297-309 | crates/goose/src/providers/gemini_cli.rs:141-153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/goose/src/providers/inventory/mod.rs:1119 — crates/goose/src/providers/inventory/mod.rs:1119-1131 | crates/goose/src/providers/inventory/mod.rs:1146-1158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/goose/src/providers/databricks_def.rs:118 — crates/goose/src/providers/databricks_def.rs:118-130 | crates/goose/src/providers/databricks_v2_def.rs:106-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.
  • Duplicated block (13 lines × 2) crates/goose-cli/src/commands/configure.rs:1061 — crates/goose-cli/src/commands/configure.rs:1061-1073 | crates/goose-cli/src/commands/configure.rs:1730-1742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/goose-providers/src/ollama.rs:507 — crates/goose-providers/src/ollama.rs:507-519 | crates/goose/src/providers/nanogpt.rs:195-207 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×12
  • Outbound HTTP without resilience crates/goose-cli/src/commands/update.rs:135 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/goose-cli/src/commands/update.rs:330 — `reqwest::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 crates/goose/src/agents/extension_manager/streamable_http.rs:224 — `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/goose/src/bin/build_canonical_models.rs:327 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/goose/src/posthog.rs:80 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/goose/src/providers/gcpauth.rs:251 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/goose/src/providers/gcpauth.rs:359 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience documentation/scripts/community_stars.py:55 — `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 documentation/scripts/community_stars.py:70 — `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 documentation/scripts/community_stars.py:97 — `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 documentation/src/utils/github-stars.ts:81 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience documentation/src/utils/mcp-servers.ts:7 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D2 · Cognitive Complexity · goose_local_inference · ×11
  • goose_local_inference::llamacpp::inference_native_tools::generate_with_native_tools (cognitive 109) crates/goose-local-inference/src/llamacpp/inference_native_tools.rs:14 — goose_local_inference::llamacpp::inference_native_tools::generate_with_native_tools has cognitive complexity 109 (threshold 15). Drivers by points: if/else 29 (93 pts), loops 4 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 74). 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.
  • goose_local_inference::native_tool_parsing::json_candidates (cognitive 40) crates/goose-local-inference/src/native_tool_parsing.rs:91 — goose_local_inference::native_tool_parsing::json_candidates has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 3 (6 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.
  • goose_local_inference::llamacpp::inference_emulated_tools::generate_with_emulated_tools (cognitive 36) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs:43 — goose_local_inference::llamacpp::inference_emulated_tools::generate_with_emulated_tools has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 1 (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.
  • goose_local_inference::extract_text_content (cognitive 31) crates/goose-local-inference/src/lib.rs:615 — goose_local_inference::extract_text_content has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (5 pts), match/switch 2 (5 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.
  • goose_local_inference::hf_models::cached_local_models (cognitive 31) crates/goose-local-inference/src/hf_models.rs:2767 — goose_local_inference::hf_models::cached_local_models has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (6 pts), boolean chains 5 (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.
  • goose_local_inference::convert_text_media_markers (cognitive 27) crates/goose-local-inference/src/lib.rs:514 — goose_local_inference::convert_text_media_markers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • goose_local_inference::llamacpp::inference_native_tools::extract_oai_tool_call_contents (cognitive 26) crates/goose-local-inference/src/llamacpp/inference_native_tools.rs:233 — goose_local_inference::llamacpp::inference_native_tools::extract_oai_tool_call_contents has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 2 (3 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.
  • goose_local_inference::mlx::imp::generate_single_model (cognitive 25) crates/goose-local-inference/src/mlx.rs:520 — goose_local_inference::mlx::imp::generate_single_model has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 1 (2 pts), loops 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.
  • goose_local_inference::hf_models::delete_cached_local_model (cognitive 21) crates/goose-local-inference/src/hf_models.rs:2948 — goose_local_inference::hf_models::delete_cached_local_model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 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.
  • goose_local_inference::hf_models::parse_quantization (cognitive 17) crates/goose-local-inference/src/hf_models.rs:262 — goose_local_inference::hf_models::parse_quantization has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 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.
  • goose_local_inference::mlx::imp::build_prompt (cognitive 17) crates/goose-local-inference/src/mlx.rs:448 — goose_local_inference::mlx::imp::build_prompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D3 · God Classes · TooManyMethods · ×10
  • TooManyMethods: GooseAcpAgent crates/goose/src/acp/server.rs:313 — TooManyMethods — 307 methods, declared across 25 files: server/custom_dispatch.rs (111), acp/server.rs (50), server/providers.rs (23), recipe/mod.rs (17), +21 more file(s). The bar is 30 methods; this is 277 over it, 10.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Config crates/goose/src/config/base.rs:120 — 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: CliSession crates/goose-cli/src/session/mod.rs:239 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 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.
  • TooManyMethods: Message crates/goose-provider-types/src/conversation/message.rs:965 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Agent crates/goose/src/agents/agent.rs:209 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SessionManager REDACTED:358 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.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.
  • TooManyMethods: SessionStorage REDACTED:837 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.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.
  • TooManyMethods: ModelConfig crates/goose-provider-types/src/model.rs:41 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExtensionLease crates/goose/src/agents/extension_manager/lease.rs:195 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SummonClient crates/goose/src/agents/platform_extensions/summon.rs:390 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×9
  • Duplicated block (10 lines × 2) crates/goose-mcp/src/autovisualiser/mod.rs:910 — crates/goose-mcp/src/autovisualiser/mod.rs:910-919 | crates/goose-mcp/src/autovisualiser/mod.rs:1089-1098 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/goose-provider-types/src/formats/databricks.rs:185 — crates/goose-provider-types/src/formats/databricks.rs:185-194 | crates/goose-provider-types/src/formats/openai_responses.rs:447-456 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/goose/src/acp/fs.rs:169 — crates/goose/src/acp/fs.rs:169-178 | crates/goose/src/acp/fs.rs:205-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/goose/src/config/base.rs:326 — crates/goose/src/config/base.rs:326-335 | crates/goose/src/config/base.rs:337-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/goose/src/config/signup_openrouter/server.rs:32 — crates/goose/src/config/signup_openrouter/server.rs:32-41 | crates/goose/src/config/signup_tetrate/server.rs:29-38 — 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) crates/goose/src/session/import_formats/claude_code.rs:227 — crates/goose/src/session/import_formats/claude_code.rs:227-236 | crates/goose/src/session/import_formats/pi.rs:271-280 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/goose-providers/src/anthropic.rs:484 — crates/goose-providers/src/anthropic.rs:484-493 | crates/goose-providers/src/openai.rs:941-951 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/openai.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/goose-sdk-types/src/custom_requests.rs:453 — crates/goose-sdk-types/src/custom_requests.rs:453-462 | crates/goose-sdk-types/src/custom_requests/recipe.rs:244-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.
  • Duplicated block (10 lines × 2) crates/goose/src/agents/platform_extensions/developer/shell.rs:289 — crates/goose/src/agents/platform_extensions/developer/shell.rs:289-298 | crates/goose/src/agents/platform_extensions/developer/shell.rs:300-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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×9
  • Duplicated block (5 lines × 2) crates/goose/src/acp/server.rs:1430 — crates/goose/src/acp/server.rs:1430-1434 | crates/goose/src/acp/server/load_session.rs:143-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 (5 lines × 2) crates/goose/src/config/signup_openrouter/mod.rs:75 — crates/goose/src/config/signup_openrouter/mod.rs:75-82 | crates/goose/src/config/signup_tetrate/mod.rs:117-121 — `crates/goose/src/config/signup_openrouter/mod.rs` and `crates/goose/src/config/signup_tetrate/mod.rs` 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 4 separate duplicated blocks between them, totalling at least 58 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 (5 lines × 2) crates/goose-provider-types/src/images.rs:203 — crates/goose-provider-types/src/images.rs:203-207 | crates/goose/src/agents/platform_extensions/developer/image.rs:247-251 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/goose/src/agents/extension_manager/streamable_http.rs:548 — crates/goose/src/agents/extension_manager/streamable_http.rs:548-552 | crates/goose/src/agents/mcp_client.rs:884-888 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/goose/src/plugins/formats/gemini.rs:154 — crates/goose/src/plugins/formats/gemini.rs:154-158 | crates/goose/src/plugins/formats/open_plugins.rs:464-468 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/goose/src/session/import_formats/claude_code.rs:96 — crates/goose/src/session/import_formats/claude_code.rs:96-104 | crates/goose/src/session/import_formats/pi.rs:95-99 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 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 (5 lines × 2) crates/goose/src/agents/platform_extensions/chatrecall.rs:190 — crates/goose/src/agents/platform_extensions/chatrecall.rs:190-194 | crates/goose/src/agents/platform_extensions/chatrecall.rs:196-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/goose/src/dictation/whisper.rs:440 — crates/goose/src/dictation/whisper.rs:440-444 | crates/goose/src/dictation/whisper.rs:451-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/goose/src/posthog.rs:337 — crates/goose/src/posthog.rs:337-341 | crates/goose/src/posthog.rs:371-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×9
  • Low cohesion: GooseAcpAgent (LCOM4 48) crates/goose/src/acp/server.rs:313 — GooseAcpAgent's methods fall into 48 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 48 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: AutoVisualiserRouter (LCOM4 10) crates/goose-mcp/src/autovisualiser/mod.rs:613 — AutoVisualiserRouter's methods fall into 10 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 10 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: HookContext (LCOM4 6) crates/goose/src/hooks/mod.rs:224 — HookContext's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ModelConfig (LCOM4 6) crates/goose-provider-types/src/model.rs:41 — ModelConfig's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: McpFixtureServer (LCOM4 6) crates/goose-test-support/src/mcp.rs:60 — McpFixtureServer's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ObservationLayer (LCOM4 5) crates/goose/src/tracing/observation_layer.rs:98 — ObservationLayer'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: XlsxTool (LCOM4 5) crates/goose-mcp/src/computercontroller/xlsx_tool.rs:34 — XlsxTool'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: ProcessTree (LCOM4 4) crates/goose/src/agents/platform_extensions/developer/shell_process.rs:55 — ProcessTree'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: OpenAiLiveClient (LCOM4 4) crates/goose-providers/src/openai_live.rs:198 — OpenAiLiveClient'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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) crates/goose-local-inference/src/hf_models.rs:2435 — crates/goose-local-inference/src/hf_models.rs:2435-2449 | crates/goose-local-inference/src/hf_models.rs:2454-2468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/goose/src/agents/platform_extensions/apps.rs:328 — crates/goose/src/agents/platform_extensions/apps.rs:328-342 | crates/goose/src/agents/platform_extensions/apps.rs:377-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.
  • Duplicated block (15 lines × 2) crates/goose/src/providers/azureauth.rs:140 — crates/goose/src/providers/azureauth.rs:140-154 | crates/goose/src/providers/gcpauth.rs:386-400 — 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) REDACTED:128 — REDACTED:128-142 | REDACTED:154-168 — both copies are in the same file, so extract the 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) REDACTED:2172 — REDACTED:2172-2186 | REDACTED:2216-2230 — both copies are in the same file, so extract the 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) REDACTED:1685 — REDACTED:1685-1699 | REDACTED:1758-1772 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/goose/src/bin/generate_acp_schema.rs:200 — crates/goose/src/bin/generate_acp_schema.rs:200-214 | crates/goose/src/bin/generate_acp_schema.rs:281-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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×7
  • Sync-over-async blocking crates/goose/src/otel/otlp.rs:80 — `export` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking crates/goose/src/otel/otlp.rs:116 — `export` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking crates/goose/src/otel/otlp.rs:148 — `export` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking crates/goose/src/agents/platform_extensions/javascript.rs:361 — `execute_with_slots` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking documentation/plugins/markdown-export.cjs:33 — `fs.mkdirSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking documentation/plugins/markdown-export.cjs:35 — `fs.readFileSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking documentation/plugins/markdown-export.cjs:41 — `fs.writeFileSync` in `postBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
AC6 · Visual & motion safety · Focus outline removed inline · ×6
  • Focus outline removed inline ui/desktop/src/components/ChatInput.tsx:1571 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/desktop/src/components/GitBranchIndicator.tsx:137 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/desktop/src/components/LauncherView.tsx:42 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/desktop/src/components/conversation/SearchBar.tsx:190 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/desktop/src/components/settings/localInference/HuggingFaceModelSearch.tsx:248 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/desktop/src/components/ui/input.tsx:8 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D2 · Cognitive Complexity · goose_providers · ×6
  • goose_providers::live::run_actor (cognitive 45) crates/goose-providers/src/live.rs:190 — goose_providers::live::run_actor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (25 pts), match/switch 7 (18 pts), loops 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.
  • goose_providers::openrouter_format::add_reasoning_details_to_request (cognitive 22) crates/goose-providers/src/openrouter_format.rs:53 — goose_providers::openrouter_format::add_reasoning_details_to_request has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 1 (2 pts), match/switch 1 (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.
  • goose_providers::ollama::from_declarative_config (cognitive 21) crates/goose-providers/src/ollama.rs:350 — goose_providers::ollama::from_declarative_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 2 (3 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.
  • goose_providers::openai::from_declarative_config (cognitive 18) crates/goose-providers/src/openai.rs:953 — goose_providers::openai::from_declarative_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (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.
  • goose_providers::anthropic::from_declarative_config (cognitive 17) crates/goose-providers/src/anthropic.rs:507 — goose_providers::anthropic::from_declarative_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (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.
  • goose_providers::openrouter_format::apply_reasoning_config (cognitive 17) crates/goose-providers/src/openrouter_format.rs:104 — goose_providers::openrouter_format::apply_reasoning_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/goose-mcp/src/autovisualiser/mod.rs:853 — crates/goose-mcp/src/autovisualiser/mod.rs:853-879 | crates/goose-mcp/src/autovisualiser/mod.rs:909-935 | crates/goose-mcp/src/autovisualiser/mod.rs:1040-1062 | crates/goose-mcp/src/autovisualiser/mod.rs:1146-1168 — 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) crates/goose-providers/src/anthropic.rs:272 — crates/goose-providers/src/anthropic.rs:272-337 | crates/goose-providers/src/openai.rs:662-676 | crates/goose-providers/src/openai_compatible.rs:189-214 | crates/goose/src/providers/tetrate.rs:200-222 — 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) crates/goose-providers/src/anthropic.rs:511 — crates/goose-providers/src/anthropic.rs:511-595 | crates/goose-providers/src/ollama.rs:354-438 | crates/goose-providers/src/openai.rs:957-1038 | crates/goose/src/providers/ollama_cloud.rs:41-69 — 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) crates/goose-providers/src/databricks_v2.rs:442 — crates/goose-providers/src/databricks_v2.rs:442-485 | crates/goose-providers/src/google.rs:153-190 | crates/goose/src/providers/gemini_oauth.rs:989-1022 | crates/goose/src/providers/kimicode.rs:421-467 — 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) crates/goose/src/providers/chatgpt_codex.rs:539 — crates/goose/src/providers/chatgpt_codex.rs:539-563 | crates/goose/src/providers/chatgpt_codex.rs:568-590 | crates/goose/src/providers/gemini_oauth.rs:242-270 | crates/goose/src/providers/gemini_oauth.rs:272-298 — 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) crates/goose/src/providers/huggingface_auth.rs:298 — crates/goose/src/providers/huggingface_auth.rs:298-328 | crates/goose/src/providers/huggingface_auth.rs:334-361 | crates/goose/src/providers/xai_oauth.rs:196-222 | crates/goose/src/providers/xai_oauth.rs:293-314 — 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 · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) crates/goose-agent/src/inference.rs:157 — crates/goose-agent/src/inference.rs:157-170 | crates/goose-agent/src/inference.rs:323-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/goose-providers/src/openai.rs:181 — crates/goose-providers/src/openai.rs:181-194 | crates/goose-providers/src/openai.rs:409-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.
  • Duplicated block (14 lines × 2) crates/goose/src/bin/generate_acp_schema.rs:225 — crates/goose/src/bin/generate_acp_schema.rs:225-238 | crates/goose/src/bin/generate_acp_schema.rs:306-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/goose/src/gateway/telegram.rs:169 — crates/goose/src/gateway/telegram.rs:169-182 | crates/goose/src/gateway/telegram.rs:257-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/goose/src/dictation/whisper.rs:105 — crates/goose/src/dictation/whisper.rs:105-118 | crates/goose/src/dictation/whisper.rs:129-142 — both copies are in the same file, so extract the 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) scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:98 — scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:98-111 | scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:140-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×6
  • Off the main sequence: @aaif/goose-acp-client — @aaif/goose-acp-client: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: goose-download-manager — goose-download-manager: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: goose-sdk-types — goose-sdk-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: goose-mcp — goose-mcp: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: goose-roaming — goose-roaming: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: goose-provider-types — goose-provider-types: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
AC4 · Keyboard semantics · Link used as a button (placeholder href) · ×5
  • Link used as a button (placeholder href) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:66 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:128 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:43 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:412 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:503 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×5
  • Animation without a prefers-reduced-motion guard documentation/src/pages/index.module.css:257 — `.communityCard` moves (`transition: border-color 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard documentation/src/css/custom.css:321 — `.navbar__item` moves (`transition: opacity 0.3s ease, transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard documentation/src/css/custom.css:327 — `.navbar__toggle` moves (`transition: opacity 0.3s ease, transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard documentation/src/css/extensions.css:73 — `.card-glow` moves (`animation: rotate 6s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard documentation/src/components/SocialShare/styles.module.css:52 — `.dropdown` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D10 · Test Quality · No assertions · ×5
  • No assertions: ${label} — $provider / $model ui/desktop/tests/integration/test_providers_lib.ts:310 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: ${label} — $provider / $model (flaky) ui/desktop/tests/integration/test_providers_lib.ts:318 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: running quotes MCP server integration ui/desktop/tests/e2e/app.spec.ts:358 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: measure cold start vs warm cache performance ui/desktop/tests/e2e/performance.spec.ts:148 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: capture full performance profile with navigation timing ui/desktop/tests/e2e/performance.spec.ts:241 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · goose_mcp · ×5
  • goose_mcp::computercontroller::pdf_tool::pdf_tool (cognitive 245) crates/goose-mcp/src/computercontroller/pdf_tool.rs:5 — goose_mcp::computercontroller::pdf_tool::pdf_tool has cognitive complexity 245 (threshold 15). Drivers by points: if/else 28 (187 pts), match/switch 10 (52 pts), loops 6 (43 pts), boolean chains 1 (nesting depth added 238). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension) 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.
  • goose_mcp::computercontroller::docx_tool::do_replace (cognitive 34) crates/goose-mcp/src/computercontroller/docx_tool.rs:295 — goose_mcp::computercontroller::docx_tool::do_replace has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (11 pts) (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.
  • goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension (cognitive 30) crates/goose-mcp/src/computercontroller/pdf_tool.rs:133 — goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 3 (9 pts), boolean chains 1 (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. This shape REPEATS in the file: one other method here (goose_mcp::computercontroller::pdf_tool::pdf_tool) 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.
  • goose_mcp::computercontroller::docx_tool::extract_structure_from_docx (cognitive 18) crates/goose-mcp/src/computercontroller/docx_tool.rs:240 — goose_mcp::computercontroller::docx_tool::extract_structure_from_docx has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (16 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.
  • goose_mcp::peekaboo::auto_install_peekaboo (cognitive 18) crates/goose-mcp/src/peekaboo/mod.rs:36 — goose_mcp::peekaboo::auto_install_peekaboo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (18 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 · CliSession · ×5
  • CliSession::process_agent_response (cognitive 118) crates/goose-cli/src/session/mod.rs:1310 — CliSession::process_agent_response has cognitive complexity 118 (threshold 15). Drivers by points: if/else 34 (91 pts), match/switch 6 (20 pts), boolean chains 6, loops 1 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CliSession::handle_prompt_command (cognitive 35) crates/goose-cli/src/session/mod.rs:1974 — CliSession::handle_prompt_command has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (8 pts), match/switch 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.
  • CliSession::handle_model (cognitive 23) crates/goose-cli/src/session/mod.rs:886 — CliSession::handle_model has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, match/switch 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, 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.
  • CliSession::handle_interrupted_messages (cognitive 21) crates/goose-cli/src/session/mod.rs:1686 — CliSession::handle_interrupted_messages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), match/switch 1 (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.
  • CliSession::refresh_completion_cache (cognitive 18) crates/goose-cli/src/session/mod.rs:1796 — CliSession::refresh_completion_cache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (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.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×5
  • Duplicated block (19 lines × 2 locations) ui/desktop/src/components/GooseMessage.tsx:114 — ui/desktop/src/components/GooseMessage.tsx:114 · ui/desktop/src/components/GooseMessage.tsx:206 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (19 lines × 2 locations) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:63 — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:63 · ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:40 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (19 lines × 2 locations) ui/desktop/src/components/recipes/RecipesView.tsx:706 — ui/desktop/src/components/recipes/RecipesView.tsx:706 · ui/desktop/src/components/recipes/RecipesView.tsx:788 — both copies are in the same file, so extract the 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 locations) ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:137 — ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:137 · ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:156 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
  • Duplicated block (19 lines × 2 locations) ui/desktop/src/desktopFileAccess.ts:159 — ui/desktop/src/desktopFileAccess.ts:159 · ui/desktop/src/desktopFileAccess.ts:261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
X2 · Cancellation propagation · Async function without AbortSignal · ×5
  • Async function without AbortSignal: downloadUpdate ui/desktop/src/utils/githubUpdater.ts:632 — `downloadUpdate` 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: fetchJwks oidc-proxy/src/index.js:141 — `fetchJwks` 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: fetchGitHubStars documentation/src/utils/github-stars.ts:71 — `fetchGitHubStars` 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: fetchMCPServers documentation/src/utils/mcp-servers.ts:5 — `fetchMCPServers` 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: fetchLatestRelease documentation/src/components/LinuxDesktopInstallButtons.js:37 — `fetchLatestRelease` 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 })`.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×5
  • Untrusted text written into markup unescaped crates/goose/src/session/export_html/template.js:114 — `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped crates/goose/src/session/export_html/template.js:122 — `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped crates/goose/src/session/export_html/template.js:469 — `e.id` is text this program did not author, and it is written into a URL attribute through markup built here 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 crates/goose/src/session/export_html/template.js:531 — `parts.join('')` is text this program did not author, and it is written into the text of an element through `innerHTML` 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 ui/desktop/src/components/MessageCopyLink.tsx:32 — `contentRef.current.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` 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.
D2 · Cognitive Complexity · GooseAcpAgent · ×4
  • GooseAcpAgent::run_live_delegation (cognitive 44) crates/goose/src/acp/server/live_voice.rs:236 — GooseAcpAgent::run_live_delegation has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (31 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (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.
  • GooseAcpAgent::forward_agent_stream (cognitive 43) crates/goose/src/acp/server.rs:2111 — GooseAcpAgent::forward_agent_stream has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 2 (6 pts), loops 2 (4 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.
  • GooseAcpAgent::spawn_provider_inventory_refresh_jobs (cognitive 18) crates/goose/src/acp/server/providers.rs:859 — GooseAcpAgent::spawn_provider_inventory_refresh_jobs has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (17 pts), loops 1 (nesting depth added 11). 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.
  • GooseAcpAgent::on_authenticate_provider_config (cognitive 17) crates/goose/src/acp/server/providers.rs:1098 — GooseAcpAgent::on_authenticate_provider_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (17 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarkdownBuffer · ×4
  • MarkdownBuffer::find_safe_end (cognitive 34) crates/goose-cli/src/session/streaming_buffer.rs:353 — MarkdownBuffer::find_safe_end has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 3 (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.
  • MarkdownBuffer::process_inline_token (cognitive 23) crates/goose-cli/src/session/streaming_buffer.rs:520 — MarkdownBuffer::process_inline_token has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, match/switch 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.
  • MarkdownBuffer::process_line_start (cognitive 16) crates/goose-cli/src/session/streaming_buffer.rs:423 — MarkdownBuffer::process_line_start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 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.
  • MarkdownBuffer::check_code_fence (cognitive 16) crates/goose-cli/src/session/streaming_buffer.rs:472 — MarkdownBuffer::check_code_fence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 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.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) crates/goose-provider-types/src/formats/databricks.rs:426 — crates/goose-provider-types/src/formats/databricks.rs:426-445 | crates/goose-provider-types/src/formats/openai.rs:796-815 — before extracting anything, compare `crates/goose-provider-types/src/formats/databricks.rs` and `crates/goose-provider-types/src/formats/openai.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (20 lines × 2) crates/goose/src/config/signup_openrouter/mod.rs:112 — crates/goose/src/config/signup_openrouter/mod.rs:112-131 | crates/goose/src/config/signup_tetrate/mod.rs:91-110 — `crates/goose/src/config/signup_openrouter/mod.rs` and `crates/goose/src/config/signup_tetrate/mod.rs` 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 4 separate duplicated blocks between them, totalling at least 58 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 (20 lines × 2) crates/goose/src/providers/huggingface_auth.rs:299 — crates/goose/src/providers/huggingface_auth.rs:299-318 | crates/goose/src/providers/xai_oauth.rs:197-216 — before extracting anything, compare `crates/goose/src/providers/huggingface_auth.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 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 (20 lines × 2) scripts/diagnostics-viewer.py:97 — scripts/diagnostics-viewer.py:97-116 | scripts/diagnostics-viewer.py:123-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC2 · Forms & labels · <Select> field component without a label · ×3
  • <Select> field component without a label ui/desktop/src/components/onboarding/ProviderSelector.tsx:183 — 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 ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:191 — 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 ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:231 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · SessionStorage · ×3
  • SessionStorage::apply_update (cyclomatic 79) REDACTED:1911 — SessionStorage::apply_update 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.
  • SessionStorage::apply_migration (cyclomatic 27) REDACTED:1459 — SessionStorage::apply_migration 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.
  • SessionStorage::list_sessions_matching (cyclomatic 18) REDACTED:2306 — SessionStorage::list_sessions_matching 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 · CliSession · ×3
  • CliSession::process_agent_response (cyclomatic 51) crates/goose-cli/src/session/mod.rs:1310 — CliSession::process_agent_response 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.
  • CliSession::handle_input (cyclomatic 24) crates/goose-cli/src/session/mod.rs:668 — CliSession::handle_input has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • CliSession::handle_model (cyclomatic 18) crates/goose-cli/src/session/mod.rs:886 — CliSession::handle_model 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 · GooseAcpAgent · ×3
  • GooseAcpAgent::forward_agent_stream (cyclomatic 23) crates/goose/src/acp/server.rs:2111 — GooseAcpAgent::forward_agent_stream 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.
  • GooseAcpAgent::run_live_delegation (cyclomatic 21) crates/goose/src/acp/server/live_voice.rs:236 — GooseAcpAgent::run_live_delegation 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.
  • GooseAcpAgent::handle_message_content (cyclomatic 16) crates/goose/src/acp/server.rs:1347 — GooseAcpAgent::handle_message_content has cyclomatic complexity 16 (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.
D2 · Cognitive Complexity · SessionStorage · ×3
  • SessionStorage::apply_update (cognitive 106) REDACTED:1911 — SessionStorage::apply_update has cognitive complexity 106 (threshold 15). Drivers by points: if/else 78 (106 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.
  • SessionStorage::list_sessions_matching (cognitive 24) REDACTED:2306 — SessionStorage::list_sessions_matching has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 2 (3 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.
  • SessionStorage::apply_migration (cognitive 21) REDACTED:1459 — SessionStorage::apply_migration has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DownloadManager · ×3
  • DownloadManager::download_one_file (cognitive 105) crates/goose-download-manager/src/lib.rs:425 — DownloadManager::download_one_file has cognitive complexity 105 (threshold 15). Drivers by points: if/else 34 (89 pts), boolean chains 8, match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 59). 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.
  • DownloadManager::download_model_sharded_with_bearer_token (cognitive 28) crates/goose-download-manager/src/lib.rs:212 — DownloadManager::download_model_sharded_with_bearer_token has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (3 pts), boolean chains 1, match/switch 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.
  • DownloadManager::download_files_sequentially (cognitive 25) crates/goose-download-manager/src/lib.rs:345 — DownloadManager::download_files_sequentially has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3, 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 · GooseCompleter · ×3
  • GooseCompleter::complete_argument_keys (cognitive 55) crates/goose-cli/src/session/completion.rs:275 — GooseCompleter::complete_argument_keys has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (45 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 35). 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.
  • GooseCompleter::complete (cognitive 37) crates/goose-cli/src/session/completion.rs:412 — GooseCompleter::complete has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 3 (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.
  • GooseCompleter::complete_model_names (cognitive 21) crates/goose-cli/src/session/completion.rs:149 — GooseCompleter::complete_model_names has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 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 · ToolExecutionOperation · ×3
  • ToolExecutionOperation::run (cognitive 32) crates/goose/src/agents/state_machine/ops_toolcalling.rs:910 — ToolExecutionOperation::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 5 (10 pts), loops 5 (7 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.
  • ToolExecutionOperation::run_prompt (cognitive 22) crates/goose/src/agents/state_machine/ops_toolcalling.rs:545 — ToolExecutionOperation::run_prompt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ToolExecutionOperation::prompt_parts (cognitive 17) crates/goose/src/agents/state_machine/ops_toolcalling.rs:857 — ToolExecutionOperation::prompt_parts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 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 · ChatInput.ChatInput · ×3
  • ChatInput.ChatInput::handleHistoryNavigation (cognitive 23) ui/desktop/src/components/ChatInput.tsx:1034 — ChatInput.ChatInput::handleHistoryNavigation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, 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. This shape REPEATS in the file: 3 other methods here (ChatInput.ChatInput, ChatInput.ChatInput::handlePaste, ChatInput.ChatInput::handleKeyDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatInput.ChatInput::handleKeyDown (cognitive 20) ui/desktop/src/components/ChatInput.tsx:1215 — ChatInput.ChatInput::handleKeyDown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ChatInput.ChatInput, ChatInput.ChatInput::handlePaste, ChatInput.ChatInput::handleHistoryNavigation) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatInput.ChatInput::handlePaste (cognitive 19) ui/desktop/src/components/ChatInput.tsx:915 — ChatInput.ChatInput::handlePaste has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 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. This shape REPEATS in the file: 3 other methods here (ChatInput.ChatInput, ChatInput.ChatInput::handleHistoryNavigation, ChatInput.ChatInput::handleKeyDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×3
  • Duplicated block (23 lines × 2) crates/goose-local-inference/src/provider_utils.rs:2 — crates/goose-local-inference/src/provider_utils.rs:2-24 | crates/goose/src/providers/utils.rs:13-35 — 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 (23 lines × 2) crates/goose-providers/src/databricks.rs:165 — crates/goose-providers/src/databricks.rs:165-187 | crates/goose-providers/src/databricks_v2.rs:195-217 — before extracting anything, compare `crates/goose-providers/src/databricks.rs` and `crates/goose-providers/src/databricks_v2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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) crates/goose/src/providers/bedrock.rs:503 — crates/goose/src/providers/bedrock.rs:503-525 | crates/goose/src/providers/bedrock.rs:598-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) crates/goose-mcp/src/autovisualiser/mod.rs:732 — crates/goose-mcp/src/autovisualiser/mod.rs:732-739 | crates/goose-mcp/src/autovisualiser/mod.rs:754-761 | crates/goose-mcp/src/autovisualiser/mod.rs:764-771 — 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 (8 lines × 3) crates/goose/src/agents/platform_extensions/analyze/parser.rs:83 — crates/goose/src/agents/platform_extensions/analyze/parser.rs:83-90 | crates/goose/src/agents/platform_extensions/analyze/parser.rs:156-163 | crates/goose/src/agents/platform_extensions/analyze/parser.rs:678-685 — 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 (8 lines × 3) crates/goose-providers/src/anthropic.rs:425 — crates/goose-providers/src/anthropic.rs:425-432 | crates/goose-providers/src/ollama.rs:568-575 | crates/goose-providers/src/openai.rs:828-835 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) crates/goose-cli/src/session/elicitation.rs:93 — crates/goose-cli/src/session/elicitation.rs:93-99 | crates/goose-cli/src/session/elicitation.rs:297-304 — both copies are in the same file, so extract the 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–8 lines × 2) crates/goose-provider-types/src/canonical/name_builder.rs:76 — crates/goose-provider-types/src/canonical/name_builder.rs:76-82 | crates/goose-provider-types/src/canonical/name_builder.rs:90-97 — both copies are in the same file, so extract the 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–8 lines × 2) crates/goose-provider-types/src/formats/anthropic.rs:1212 — crates/goose-provider-types/src/formats/anthropic.rs:1212-1219 | crates/goose-provider-types/src/formats/anthropic.rs:1336-1342 — both copies are in the same file, so extract the 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) · ×3
  • Duplicated block (7 lines × 3) crates/goose/src/acp/fs.rs:146 — crates/goose/src/acp/fs.rs:146-152 | crates/goose/src/acp/fs.rs:169-175 | crates/goose/src/acp/fs.rs:205-211 — 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 (7 lines × 3) crates/goose/src/gateway/telegram.rs:343 — crates/goose/src/gateway/telegram.rs:343-349 | crates/goose/src/skills/supporting_files.rs:376-382 | crates/goose/src/skills/supporting_files.rs:402-408 — before extracting anything, compare `crates/goose/src/gateway/telegram.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (7 lines × 3) crates/goose/src/providers/chatgpt_codex.rs:333 — crates/goose/src/providers/chatgpt_codex.rs:333-339 | crates/goose/src/providers/gemini_oauth.rs:157-163 | crates/goose/src/providers/xai_oauth.rs:110-116 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) crates/goose-cli/src/commands/review/handler.rs:895 — crates/goose-cli/src/commands/review/handler.rs:895-900 | crates/goose/src/gateway/telegram.rs:505-510 | crates/goose/src/skills/supporting_files.rs:660-665 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (6 lines × 3) crates/goose-providers/src/databricks_v2.rs:480 — crates/goose-providers/src/databricks_v2.rs:480-485 | crates/goose-providers/src/ollama.rs:642-647 | crates/goose/src/providers/kimicode.rs:462-467 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) crates/goose/src/skills/supporting_files.rs:476 — crates/goose/src/skills/supporting_files.rs:476-481 | crates/goose/src/skills/supporting_files.rs:509-514 | crates/goose/src/skills/supporting_files.rs:547-552 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×3
  • Duplicated block (21 lines × 2 locations) ui/desktop/src/components/recipes/RecipesView.tsx:468 — ui/desktop/src/components/recipes/RecipesView.tsx:468 · ui/desktop/src/components/recipes/RecipesView.tsx: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 (21 lines × 2 locations) ui/desktop/src/components/sessions/SessionListView.tsx:885 — ui/desktop/src/components/sessions/SessionListView.tsx:885 · ui/desktop/src/components/sessions/SessionListView.tsx:936 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
  • Duplicated block (21 lines × 2 locations) ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:527 — ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:527 · ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:677 — both copies are in the same file, so extract the 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 · goose_mcp · ×2
  • goose_mcp::computercontroller::pdf_tool::pdf_tool (cyclomatic 40) crates/goose-mcp/src/computercontroller/pdf_tool.rs:5 — goose_mcp::computercontroller::pdf_tool::pdf_tool 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. This shape REPEATS in the file: one other method here (goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension) 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.
  • goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension (cyclomatic 16) crates/goose-mcp/src/computercontroller/pdf_tool.rs:133 — goose_mcp::computercontroller::pdf_tool::pdf_tool::get_image_extension 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 (goose_mcp::computercontroller::pdf_tool::pdf_tool) 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 · goose_local_inference · ×2
  • goose_local_inference::llamacpp::inference_native_tools::generate_with_native_tools (cyclomatic 34) crates/goose-local-inference/src/llamacpp/inference_native_tools.rs:14 — goose_local_inference::llamacpp::inference_native_tools::generate_with_native_tools 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.
  • goose_local_inference::llamacpp::inference_emulated_tools::generate_with_emulated_tools (cyclomatic 17) crates/goose-local-inference/src/llamacpp/inference_emulated_tools.rs:43 — goose_local_inference::llamacpp::inference_emulated_tools::generate_with_emulated_tools 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 · MarkdownBuffer · ×2
  • MarkdownBuffer::process_inline_token (cyclomatic 24) crates/goose-cli/src/session/streaming_buffer.rs:520 — MarkdownBuffer::process_inline_token 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.
  • MarkdownBuffer::find_safe_end (cyclomatic 17) crates/goose-cli/src/session/streaming_buffer.rs:353 — MarkdownBuffer::find_safe_end 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 · CodexProvider · ×2
  • CodexProvider::parse_response (cyclomatic 20) crates/goose/src/providers/codex.rs:360 — CodexProvider::parse_response 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.
  • CodexProvider::execute_command (cyclomatic 16) crates/goose/src/providers/codex.rs:112 — CodexProvider::execute_command 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 · GooseCompleter · ×2
  • GooseCompleter::complete_argument_keys (cyclomatic 20) crates/goose-cli/src/session/completion.rs:275 — GooseCompleter::complete_argument_keys 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.
  • GooseCompleter::complete (cyclomatic 19) crates/goose-cli/src/session/completion.rs:412 — GooseCompleter::complete has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · ClaudeCodeProvider · ×2
  • ClaudeCodeProvider::stream (cognitive 120) crates/goose/src/providers/claude_code.rs:749 — ClaudeCodeProvider::stream has cognitive complexity 120 (threshold 15). Drivers by points: if/else 19 (92 pts), match/switch 5 (24 pts), boolean chains 2, loops 2 (nesting depth added 92). 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.
  • ClaudeCodeProvider::last_user_content_blocks (cognitive 28) crates/goose/src/providers/claude_code.rs:280 — ClaudeCodeProvider::last_user_content_blocks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 4 (11 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 · GatewayHandler · ×2
  • GatewayHandler::relay_to_session (cognitive 89) crates/goose/src/gateway/handler.rs:451 — GatewayHandler::relay_to_session has cognitive complexity 89 (threshold 15). Drivers by points: if/else 16 (72 pts), match/switch 5 (11 pts), loops 3 (6 pts) (nesting depth added 65). 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.
  • GatewayHandler::handle_message (cognitive 16) crates/goose/src/gateway/handler.rs:127 — GatewayHandler::handle_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexProvider · ×2
  • CodexProvider::parse_response (cognitive 41) crates/goose/src/providers/codex.rs:360 — CodexProvider::parse_response has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), match/switch 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 25). 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.
  • CodexProvider::execute_command (cognitive 17) crates/goose/src/providers/codex.rs:112 — CodexProvider::execute_command has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3, match/switch 1 (2 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 · TokenCounter · ×2
  • TokenCounter::count_tokens_for_tools (cognitive 36) crates/goose/src/token_counter.rs:75 — TokenCounter::count_tokens_for_tools has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (22 pts), loops 3 (14 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.
  • TokenCounter::count_chat_tokens (cognitive 16) crates/goose/src/token_counter.rs:129 — TokenCounter::count_chat_tokens 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 · StreamingEmulatorParser · ×2
  • StreamingEmulatorParser::process_chunk (cognitive 36) crates/goose-local-inference/src/tool_emulation.rs:309 — StreamingEmulatorParser::process_chunk has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (33 pts), match/switch 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.
  • StreamingEmulatorParser::flush (cognitive 16) crates/goose-local-inference/src/tool_emulation.rs:385 — StreamingEmulatorParser::flush has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CursorAgentProvider · ×2
  • CursorAgentProvider::parse_cursor_agent_response (cognitive 31) crates/goose/src/providers/cursor_agent.rs:196 — CursorAgentProvider::parse_cursor_agent_response has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 1 (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.
  • CursorAgentProvider::messages_to_cursor_agent_format (cognitive 21) crates/goose/src/providers/cursor_agent.rs:137 — CursorAgentProvider::messages_to_cursor_agent_format has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 2 (8 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · McpAppCache · ×2
  • McpAppCache::list_apps (cognitive 25) crates/goose/src/goose_apps/cache.rs:99 — McpAppCache::list_apps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • McpAppCache::delete_extension_apps (cognitive 17) crates/goose/src/goose_apps/cache.rs:207 — McpAppCache::delete_extension_apps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 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 · HookManager · ×2
  • HookManager::emit_collecting_banners (cognitive 18) crates/goose/src/hooks/mod.rs:613 — HookManager::emit_collecting_banners has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HookManager::emit_serialized (cognitive 16) crates/goose/src/hooks/mod.rs:551 — HookManager::emit_serialized has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: agent.rs → ext_manager.rs, platform_tools.rs, prompt_manager.rs, reply_parts.rs, retry.rs, subagent_task_config.rs crates/goose/src/agents/agent.rs — `crates/goose/src/agents/agent.rs` changes together with 6 other files — `crates/goose/src/agents/platform_extensions/ext_manager.rs`, `crates/goose/src/agents/platform_tools.rs`, `crates/goose/src/agents/prompt_manager.rs`, `crates/goose/src/agents/reply_parts.rs`, `crates/goose/src/agents/retry.rs`, `crates/goose/src/agents/subagent_task_config.rs` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: claude_code.rs → codex.rs, cursor_agent.rs, gemini_cli.rs crates/goose/src/providers/claude_code.rs — `crates/goose/src/providers/claude_code.rs` changes together with 3 other files — `crates/goose/src/providers/codex.rs`, `crates/goose/src/providers/cursor_agent.rs`, `crates/goose/src/providers/gemini_cli.rs` — 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 · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) crates/goose-providers/src/anthropic.rs:513 — crates/goose-providers/src/anthropic.rs:513-533 | crates/goose-providers/src/openai.rs:959-979 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/openai.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 96 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 (21 lines × 2) crates/goose/src/providers/gcpauth.rs:481 — crates/goose/src/providers/gcpauth.rs:481-501 | crates/goose/src/providers/gcpauth.rs:559-579 — both copies are in the same file, so extract the 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–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) crates/goose-local-inference/src/mlx.rs:284 — crates/goose-local-inference/src/mlx.rs:284-303 | crates/goose-local-inference/src/mlx.rs:304-322 — both copies are in the same file, so extract the 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–20 lines × 2) scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:77 — scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:77-96 | scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:119-137 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (18 lines × 2) crates/goose/src/bin/generate_acp_schema.rs:128 — crates/goose/src/bin/generate_acp_schema.rs:128-145 | crates/goose/src/bin/generate_acp_schema.rs:160-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/goose/src/config/signup_openrouter/mod.rs:45 — crates/goose/src/config/signup_openrouter/mod.rs:45-62 | crates/goose/src/config/signup_tetrate/mod.rs:45-62 — `crates/goose/src/config/signup_openrouter/mod.rs` and `crates/goose/src/config/signup_tetrate/mod.rs` 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 4 separate duplicated blocks between them, totalling at least 58 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.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) crates/goose/src/providers/bedrock.rs:652 — crates/goose/src/providers/bedrock.rs:652-668 | crates/goose/src/providers/sagemaker_tgi.rs:353-369 — 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) crates/goose/src/providers/githubcopilot.rs:508 — crates/goose/src/providers/githubcopilot.rs:508-524 | crates/goose/src/providers/githubcopilot.rs:555-571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) crates/goose/src/bin/generate_acp_schema.rs:365 — crates/goose/src/bin/generate_acp_schema.rs:365-380 | crates/goose/src/bin/generate_acp_schema.rs:393-408 — both copies are in the same file, so extract the 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) crates/goose/src/providers/nanogpt.rs:184 — crates/goose/src/providers/nanogpt.rs:184-199 | crates/goose/src/providers/tetrate.rs:140-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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) crates/goose-local-inference/src/mlx.rs:849 — crates/goose-local-inference/src/mlx.rs:849-862 | crates/goose-local-inference/src/mlx.rs:889-903 — both copies are in the same file, so extract the 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–15 lines × 2) crates/goose-mcp/src/computercontroller/mod.rs:679 — crates/goose-mcp/src/computercontroller/mod.rs:679-692 | crates/goose-mcp/src/computercontroller/mod.rs:724-738 — both copies are in the same file, so extract the 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 (10–12 lines × 2) · ×2
  • Duplicated block (10–12 lines × 2) crates/goose-cli/src/commands/review/orchestrator.rs:113 — crates/goose-cli/src/commands/review/orchestrator.rs:113-124 | crates/goose-cli/src/commands/review/orchestrator.rs:345-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.
  • Duplicated block (10–12 lines × 2) crates/goose-providers/src/openai.rs:396 — crates/goose-providers/src/openai.rs:396-405 | crates/goose-providers/src/openai.rs:920-931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×2
  • Duplicated block (9–10 lines × 4) crates/goose-providers/src/databricks_v2.rs:464 — crates/goose-providers/src/databricks_v2.rs:464-473 | crates/goose-providers/src/google.rs:165-173 | crates/goose/src/providers/gemini_oauth.rs:995-1003 | crates/goose/src/providers/kimicode.rs:443-452 — 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.
  • Duplicated block (9–10 lines × 4) crates/goose/src/providers/huggingface_auth.rs:311 — crates/goose/src/providers/huggingface_auth.rs:311-320 | crates/goose/src/providers/huggingface_auth.rs:344-353 | crates/goose/src/providers/xai_oauth.rs:209-217 | crates/goose/src/providers/xai_oauth.rs:299-307 — before extracting anything, compare `crates/goose/src/providers/huggingface_auth.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) crates/goose-providers/src/openai.rs:916 — crates/goose-providers/src/openai.rs:916-925 | crates/goose-providers/src/openai_compatible.rs:141-149 — before extracting anything, compare `crates/goose-providers/src/openai.rs` and `crates/goose-providers/src/openai_compatible.rs` as WHOLE FILES: this scan already matched 4 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. 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 (9–10 lines × 2) crates/goose/src/sources.rs:733 — crates/goose/src/sources.rs:733-741 | crates/goose/src/sources.rs:845-854 — both copies are in the same file, so extract the 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 × 3) · ×2
  • Duplicated block (9 lines × 3) crates/goose-mcp/src/memory/mod.rs:205 — crates/goose-mcp/src/memory/mod.rs:205-213 | crates/goose-mcp/src/memory/mod.rs:222-230 | crates/goose-mcp/src/memory/mod.rs:374-382 — 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 (9 lines × 3) crates/goose/src/bin/generate_acp_schema.rs:126 — crates/goose/src/bin/generate_acp_schema.rs:126-134 | crates/goose/src/bin/generate_acp_schema.rs:147-155 | crates/goose/src/bin/generate_acp_schema.rs:158-166 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crates/goose/src/agents/state_machine/ops_skills.rs:71 — crates/goose/src/agents/state_machine/ops_skills.rs:71-78 | crates/goose/src/skills/client.rs:249-257 — 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–9 lines × 2) crates/goose/src/providers/claude_code.rs:415 — crates/goose/src/providers/claude_code.rs:415-423 | crates/goose/src/providers/cursor_agent.rs:306-313 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) crates/goose/src/providers/chatgpt_codex.rs:551 — crates/goose/src/providers/chatgpt_codex.rs:551-558 | crates/goose/src/providers/chatgpt_codex.rs:578-585 | crates/goose/src/providers/gemini_oauth.rs:258-265 | crates/goose/src/providers/gemini_oauth.rs:286-293 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/goose/src/agents/platform_extensions/chatrecall.rs:306 — crates/goose/src/agents/platform_extensions/chatrecall.rs:306-313 | crates/goose/src/agents/platform_extensions/developer/mod.rs:195-202 | crates/goose/src/agents/platform_extensions/summarize.rs:74-81 | crates/goose/src/agents/platform_extensions/todo.rs:130-137 — 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 (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) crates/goose/src/skills/supporting_files.rs:292 — crates/goose/src/skills/supporting_files.rs:292-297 | crates/goose/src/skills/supporting_files.rs:326-331 | crates/goose/src/skills/supporting_files.rs:504-509 | crates/goose/src/skills/supporting_files.rs:542-547 — 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.
  • Duplicated block (6 lines × 4) crates/goose-mcp/src/autovisualiser/mod.rs:867 — crates/goose-mcp/src/autovisualiser/mod.rs:867-875 | crates/goose-mcp/src/autovisualiser/mod.rs:923-931 | crates/goose-mcp/src/autovisualiser/mod.rs:1050-1058 | crates/goose-mcp/src/autovisualiser/mod.rs:1159-1164 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×2
  • Duplicated block (32 lines × 2 locations) ui/desktop/src/components/recipes/RecipesView.tsx:567 — ui/desktop/src/components/recipes/RecipesView.tsx:567 · ui/desktop/src/components/recipes/RecipesView.tsx:627 — 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 (32 lines × 2 locations) ui/desktop/src/utils/autoUpdater.ts:156 — ui/desktop/src/utils/autoUpdater.ts:156 · ui/desktop/src/utils/autoUpdater.ts:477 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×2
  • Duplicated block (27 lines × 2 locations) ui/desktop/scripts/generate-mac-update-manifest.js:14 — ui/desktop/scripts/generate-mac-update-manifest.js:14 · ui/desktop/scripts/generate-windows-update-manifest.js: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.
  • Duplicated block (27 lines × 2 locations) ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:244 — ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:244 · ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:273 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×2
  • Duplicated block (22 lines × 2 locations) ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:20 — ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:20 · ui/desktop/src/components/settings/permission/PermissionSetting.tsx:21 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (22 lines × 2 locations) ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:65 — ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx:65 · ui/desktop/src/components/settings/permission/PermissionSetting.tsx:62 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×2
  • Duplicated block (20 lines × 2 locations) ui/desktop/src/acp/capabilities.ts:18 — ui/desktop/src/acp/capabilities.ts:18 · ui/desktop/src/acp/capabilities.ts:39 — both copies are in the same file, so extract the 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 lines × 2 locations) ui/desktop/src/components/settings/extensions/agent-api.ts:16 — ui/desktop/src/components/settings/extensions/agent-api.ts:16 · ui/desktop/src/components/settings/extensions/agent-api.ts:55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×2
  • Duplicated block (18 lines × 2 locations) ui/desktop/src/components/ChatInput.tsx:1641 — ui/desktop/src/components/ChatInput.tsx:1641 · ui/desktop/src/components/ChatInput.tsx:1699 — 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 (18 lines × 2 locations) ui/desktop/src/components/schedule/CronPicker.tsx:249 — ui/desktop/src/components/schedule/CronPicker.tsx:249 · ui/desktop/src/components/schedule/CronPicker.tsx:288 — 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.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:third-party-deep-import] ui/desktop/src/components/MarkdownContent.tsx:9 — ui/desktop/src/components/MarkdownContent.tsx:9 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:relative-cross-package] ui/goose-acp-client/src/index.ts:3 — ui/goose-acp-client/src/index.ts:3 reaches into another package with a relative path (./generated/index.js) — import the package by name instead.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) ui/desktop/src/liveVoice/LiveVoiceMediaSession.ts:202 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) scripts/diagnostics-viewer.py:313 — `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.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative crates/goose/src/goose_apps/clock.html:89 — 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.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 ui/desktop/src/components/apps/AppsView.tsx:322 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.5 · ×1
  • Low contrast colour pair in CSS (2.5:1) ui/desktop/src/styles/main.css:556 — `.bg-inline-code` sets color: #ff7235 on background-color: #f4f6f7 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement documentation/src/components/HomepageFeatures/styles.module.css:29 — `.video` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 258 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · SwitchModelModal.SwitchModelModal (cyclomatic 107) · ×1
  • SwitchModelModal.SwitchModelModal (cyclomatic 107) ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:252 — SwitchModelModal.SwitchModelModal has cyclomatic complexity 107 (threshold 15). Of this number, 34 points are the body's own statements and 73 belong to 22 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 · McpAppRenderer.McpAppRenderer (cyclomatic 104) · ×1
  • McpAppRenderer.McpAppRenderer (cyclomatic 104) ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502 — McpAppRenderer.McpAppRenderer has cyclomatic complexity 104 (threshold 15). Of this number, 32 points are the body's own statements and 72 belong to 25 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 · main.appMain (cyclomatic 94) · ×1
  • main.appMain (cyclomatic 94) ui/desktop/src/main.ts:2414 — main.appMain has cyclomatic complexity 94 (threshold 15). Of this number, 48 points are the body's own statements and 46 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 · MentionPopover.MentionPopover (cyclomatic 80) · ×1
  • MentionPopover.MentionPopover (cyclomatic 80) ui/desktop/src/components/MentionPopover.tsx:166 — MentionPopover.MentionPopover has cyclomatic complexity 80 (threshold 15). Most of this is not in the body itself: 9 of the 80 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 189, a function literal at line 461, a function literal at line 528, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · CreateEditRecipeModal.CreateEditRecipeModal (cyclomatic 80) · ×1
  • CreateEditRecipeModal.CreateEditRecipeModal (cyclomatic 80) ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:118 — CreateEditRecipeModal.CreateEditRecipeModal has cyclomatic complexity 80 (threshold 15). Most of this is not in the body itself: 15 of the 80 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 211, a function literal at line 126, a function literal at line 346, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · BaseChat.BaseChat (cyclomatic 75) · ×1
  • BaseChat.BaseChat (cyclomatic 75) ui/desktop/src/components/BaseChat.tsx:74 — BaseChat.BaseChat has cyclomatic complexity 75 (threshold 15). Of this number, 30 points are the body's own statements and 45 belong to 17 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 · RecipesView.RecipesView (cyclomatic 69) · ×1
  • RecipesView.RecipesView (cyclomatic 69) ui/desktop/src/components/recipes/RecipesView.tsx:302 — RecipesView.RecipesView has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 14 of the 69 points are its own statements and the rest belongs to 20 function items inside it that branch (RecipeItem, handleSaveSlashCommand, renderContent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ChatInput.ChatInput (cyclomatic 66) · ×1
  • ChatInput.ChatInput (cyclomatic 66) ui/desktop/src/components/ChatInput.tsx:219 — ChatInput.ChatInput 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. This shape REPEATS in the file: one other method here (ChatInput.ChatInput::handleHistoryNavigation) 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 · main.createChat (cyclomatic 66) · ×1
  • main.createChat (cyclomatic 66) ui/desktop/src/main.ts:996 — main.createChat has cyclomatic complexity 66 (threshold 15). Of this number, 42 points are the body's own statements and 24 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 · ScheduleModal.ScheduleModal (cyclomatic 64) · ×1
  • ScheduleModal.ScheduleModal (cyclomatic 64) ui/desktop/src/components/schedule/ScheduleModal.tsx:118 — ScheduleModal.ScheduleModal has cyclomatic complexity 64 (threshold 15). Of this number, 23 points are the body's own statements and 41 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 · ProviderConfigurationModal.ProviderConfigurationModal (cyclomatic 62) · ×1
  • ProviderConfigurationModal.ProviderConfigurationModal (cyclomatic 62) ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:179 — ProviderConfigurationModal.ProviderConfigurationModal has cyclomatic complexity 62 (threshold 15). Of this number, 36 points are the body's own statements and 26 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 · UpdateSection.UpdateSection (cyclomatic 57) · ×1
  • UpdateSection.UpdateSection (cyclomatic 57) ui/desktop/src/components/settings/app/UpdateSection.tsx:110 — UpdateSection.UpdateSection has cyclomatic complexity 57 (threshold 15). Of this number, 20 points are the body's own statements and 37 belong to 10 function items 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 · MessageQueue.MessageQueue (cyclomatic 56) · ×1
  • MessageQueue.MessageQueue (cyclomatic 56) ui/desktop/src/components/MessageQueue.tsx:112 — MessageQueue.MessageQueue has cyclomatic complexity 56 (threshold 15). Of this number, 16 points are the body's own statements and 40 belong to 9 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 · DefaultProviderSetupForm.DefaultProviderSetupForm (cyclomatic 55) · ×1
  • DefaultProviderSetupForm.DefaultProviderSetupForm (cyclomatic 55) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/DefaultProviderSetupForm.tsx:85 — DefaultProviderSetupForm.DefaultProviderSetupForm has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 10 of the 55 points are its own statements and the rest belongs to 13 function items inside it that branch (getPlaceholder, a function literal at line 100, getFieldLabel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · JsonSchemaForm.JsonSchemaForm (cyclomatic 55) · ×1
  • JsonSchemaForm.JsonSchemaForm (cyclomatic 55) ui/desktop/src/components/ui/JsonSchemaForm.tsx:73 — JsonSchemaForm.JsonSchemaForm has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 4 of the 55 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 106, a function literal at line 82, renderField, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SearchView.SearchView (cyclomatic 53) · ×1
  • SearchView.SearchView (cyclomatic 53) ui/desktop/src/components/conversation/SearchView.tsx:41 — SearchView.SearchView has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 4 of the 53 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 314, 114, 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.
D1 · Cyclomatic Complexity · ToolCallWithResponse.ToolCallView · ×1
  • ToolCallWithResponse.ToolCallView::getToolDescription (cyclomatic 53) ui/desktop/src/components/ToolCallWithResponse.tsx:597 — ToolCallWithResponse.ToolCallView::getToolDescription 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. This shape REPEATS in the file: one other method here (ToolCallWithResponse.ToolCallView) 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 · SessionListView.SessionListView (cyclomatic 52) · ×1
  • SessionListView.SessionListView (cyclomatic 52) ui/desktop/src/components/sessions/SessionListView.tsx:281 — SessionListView.SessionListView has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 4 of the 52 points are its own statements and the rest belongs to 18 function items inside it that branch (renderActualContent, a function literal at line 378, a function literal at line 349, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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.CopyPageButton (cyclomatic 51) · ×1
  • index.CopyPageButton (cyclomatic 51) documentation/src/theme/DocItem/Layout/index.tsx:27 — index.CopyPageButton has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 7 of the 51 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 129, handleCopy, a function literal at line 85, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SecurityToggle.SecurityToggle (cyclomatic 50) · ×1
  • SecurityToggle.SecurityToggle (cyclomatic 50) ui/desktop/src/components/settings/security/SecurityToggle.tsx:184 — SecurityToggle.SecurityToggle has cyclomatic complexity 50 (threshold 15). Of this number, 39 points are the body's own statements and 11 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 · ScheduleDetailView.ScheduleDetailView (cyclomatic 50) · ×1
  • ScheduleDetailView.ScheduleDetailView (cyclomatic 50) ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 — ScheduleDetailView.ScheduleDetailView has cyclomatic complexity 50 (threshold 15). Of this number, 28 points are the body's own statements and 22 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 · CustomProviderForm.CustomProviderForm (cyclomatic 48) · ×1
  • CustomProviderForm.CustomProviderForm (cyclomatic 48) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257 — CustomProviderForm.CustomProviderForm 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: one other method here (CustomProviderForm.CustomProviderForm::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 · GooseMessage.GooseMessage (cyclomatic 48) · ×1
  • GooseMessage.GooseMessage (cyclomatic 48) ui/desktop/src/components/GooseMessage.tsx:47 — GooseMessage.GooseMessage has cyclomatic complexity 48 (threshold 15). Of this number, 47 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 · LocalInferenceSettings.LocalInferenceSettings (cyclomatic 47) · ×1
  • LocalInferenceSettings.LocalInferenceSettings (cyclomatic 47) ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:161 — LocalInferenceSettings.LocalInferenceSettings has cyclomatic complexity 47 (threshold 15). Of this number, 18 points are the body's own statements and 29 belong to 16 function items 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 · RecipeFormFields.RecipeFormFields (cyclomatic 46) · ×1
  • RecipeFormFields.RecipeFormFields (cyclomatic 46) ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:133 — RecipeFormFields.RecipeFormFields 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 19 function items inside it that branch (a function literal at line 227, a function literal at line 568, isParameterUsed, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · LocalModelPicker.LocalModelPicker (cyclomatic 44) · ×1
  • LocalModelPicker.LocalModelPicker (cyclomatic 44) ui/desktop/src/components/onboarding/LocalModelPicker.tsx:107 — LocalModelPicker.LocalModelPicker has cyclomatic complexity 44 (threshold 15). Of this number, 21 points are the body's own statements and 23 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 · deeplink-generator.DeeplinkGenerator (cyclomatic 43) · ×1
  • deeplink-generator.DeeplinkGenerator (cyclomatic 43) documentation/src/pages/deeplink-generator.tsx:33 — deeplink-generator.DeeplinkGenerator has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 68, generateDeeplink, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SessionActionsHeader.SessionActionsHeader (cyclomatic 43) · ×1
  • SessionActionsHeader.SessionActionsHeader (cyclomatic 43) ui/desktop/src/components/SessionActionsHeader.tsx:348 — SessionActionsHeader.SessionActionsHeader has cyclomatic complexity 43 (threshold 15). Of this number, 16 points are the body's own statements and 27 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DownloadManager · ×1
  • DownloadManager::download_one_file (cyclomatic 41) crates/goose-download-manager/src/lib.rs:425 — DownloadManager::download_one_file 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 · prepare_aggregate_metrics.extract_metrics_from_eval_file (cyclomatic 41) · ×1
  • prepare_aggregate_metrics.extract_metrics_from_eval_file (cyclomatic 41) scripts/bench-postprocess-scripts/prepare_aggregate_metrics.py:72 — prepare_aggregate_metrics.extract_metrics_from_eval_file 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 · BottomMenuAlertPopover.BottomMenuAlertPopover (cyclomatic 41) · ×1
  • BottomMenuAlertPopover.BottomMenuAlertPopover (cyclomatic 41) ui/desktop/src/components/bottom_menu/BottomMenuAlertPopover.tsx:14 — BottomMenuAlertPopover.BottomMenuAlertPopover 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 15 function literals inside it that branch (lines 26, 140, 131, …). 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 · SchedulesView.SchedulesView (cyclomatic 40) · ×1
  • SchedulesView.SchedulesView (cyclomatic 40) ui/desktop/src/components/schedule/SchedulesView.tsx:237 — SchedulesView.SchedulesView 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 10 function items inside it that branch (handleModalSubmit, a function literal at line 282, handleDeleteSchedule, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · McpAppRenderer.GooseAppFrame (cyclomatic 40) · ×1
  • McpAppRenderer.GooseAppFrame (cyclomatic 40) ui/desktop/src/components/McpApps/McpAppRenderer.tsx:214 — McpAppRenderer.GooseAppFrame has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 324, 381, 388, …). 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 · CronPicker.CronPicker (cyclomatic 37) · ×1
  • CronPicker.CronPicker (cyclomatic 37) ui/desktop/src/components/schedule/CronPicker.tsx:89 — CronPicker.CronPicker has cyclomatic complexity 37 (threshold 15). Of this number, 19 points are the body's own statements and 18 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 · GooseAcpHandler · ×1
  • GooseAcpHandler::handle_dispatch_from (cyclomatic 36) crates/goose/src/acp/server/dispatch.rs:9 — GooseAcpHandler::handle_dispatch_from has cyclomatic complexity 36 (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 · ClaudeCodeProvider · ×1
  • ClaudeCodeProvider::stream (cyclomatic 36) crates/goose/src/providers/claude_code.rs:749 — ClaudeCodeProvider::stream 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 · ParameterInputModal.ParameterInputModal (cyclomatic 36) · ×1
  • ParameterInputModal.ParameterInputModal (cyclomatic 36) ui/desktop/src/components/ParameterInputModal.tsx:87 — ParameterInputModal.ParameterInputModal 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 5 function items inside it that branch (a function literal at line 216, a function literal at line 141, 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.
D1 · Cyclomatic Complexity · HuggingFaceModelSearch.HuggingFaceModelSearch (cyclomatic 36) · ×1
  • HuggingFaceModelSearch.HuggingFaceModelSearch (cyclomatic 36) ui/desktop/src/components/settings/localInference/HuggingFaceModelSearch.tsx:105 — HuggingFaceModelSearch.HuggingFaceModelSearch has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 307, a function literal at line 122, toggleRepo, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ModelsBottomBar.ModelsBottomBar (cyclomatic 36) · ×1
  • ModelsBottomBar.ModelsBottomBar (cyclomatic 36) ui/desktop/src/components/settings/models/bottom_bar/ModelsBottomBar.tsx:73 — ModelsBottomBar.ModelsBottomBar has cyclomatic complexity 36 (threshold 15). Of this number, 21 points are the body's own statements and 15 belong to 9 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · autoUpdater.registerUpdateIpcHandlers (cyclomatic 35) · ×1
  • autoUpdater.registerUpdateIpcHandlers (cyclomatic 35) ui/desktop/src/utils/autoUpdater.ts:72 — autoUpdater.registerUpdateIpcHandlers has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 81, 222, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · generate-acp-docs.schemaType (cyclomatic 34) · ×1
  • generate-acp-docs.schemaType (cyclomatic 34) documentation/scripts/generate-acp-docs.js:80 — generate-acp-docs.schemaType has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MessageUsageStats.MessageUsageStats (cyclomatic 34) · ×1
  • MessageUsageStats.MessageUsageStats (cyclomatic 34) ui/desktop/src/components/MessageUsageStats.tsx:112 — MessageUsageStats.MessageUsageStats has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a 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 · community_stars.main (cyclomatic 33) · ×1
  • community_stars.main (cyclomatic 33) documentation/scripts/community_stars.py:184 — community_stars.main 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 · LocalModelManager.LocalModelManager (cyclomatic 33) · ×1
  • LocalModelManager.LocalModelManager (cyclomatic 33) ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:73 — LocalModelManager.LocalModelManager has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 197, a function literal at line 127, loadSelectedModel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · DictationSettings.DictationSettings (cyclomatic 33) · ×1
  • DictationSettings.DictationSettings (cyclomatic 33) ui/desktop/src/components/settings/dictation/DictationSettings.tsx:85 — DictationSettings.DictationSettings has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 105, handleSaveKey, handleRemoveKey, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · AcpProvider · ×1
  • AcpProvider::stream (cyclomatic 32) crates/goose/src/acp/provider.rs:840 — AcpProvider::stream 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 · GatewayHandler · ×1
  • GatewayHandler::relay_to_session (cyclomatic 32) crates/goose/src/gateway/handler.rs:451 — GatewayHandler::relay_to_session 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 · SnowflakeProvider · ×1
  • SnowflakeProvider::post (cyclomatic 32) crates/goose-providers/src/snowflake.rs:100 — SnowflakeProvider::post 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 · CLIExtensionInstructions.CLIExtensionInstructions (cyclomatic 32) · ×1
  • CLIExtensionInstructions.CLIExtensionInstructions (cyclomatic 32) documentation/src/components/CLIExtensionInstructions.tsx:22 — CLIExtensionInstructions.CLIExtensionInstructions has cyclomatic complexity 32 (threshold 15). Of this number, 28 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 · AcpReadinessPanel.AcpReadinessPanel (cyclomatic 32) · ×1
  • AcpReadinessPanel.AcpReadinessPanel (cyclomatic 32) ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:64 — AcpReadinessPanel.AcpReadinessPanel has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · scroll-area.ScrollArea (cyclomatic 32) · ×1
  • scroll-area.ScrollArea (cyclomatic 32) ui/desktop/src/components/ui/scroll-area.tsx:26 — scroll-area.ScrollArea has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 107, 154, 188, …). 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 · ImportRecipeForm.ImportRecipeForm (cyclomatic 32) · ×1
  • ImportRecipeForm.ImportRecipeForm (cyclomatic 32) ui/desktop/src/components/recipes/ImportRecipeForm.tsx:104 — ImportRecipeForm.ImportRecipeForm has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 234, a function literal at line 290, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ModelSettingsPanel.ModelSettingsPanel (cyclomatic 31) · ×1
  • ModelSettingsPanel.ModelSettingsPanel (cyclomatic 31) ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:387 — ModelSettingsPanel.ModelSettingsPanel has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 396, setChatTemplateMode, a function literal at line 423, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · LiveVoiceButton.LiveVoiceButton (cyclomatic 31) · ×1
  • LiveVoiceButton.LiveVoiceButton (cyclomatic 31) ui/desktop/src/components/LiveVoiceButton.tsx:55 — LiveVoiceButton.LiveVoiceButton 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 · AppsView.AppsView (cyclomatic 31) · ×1
  • AppsView.AppsView (cyclomatic 31) ui/desktop/src/components/apps/AppsView.tsx:92 — AppsView.AppsView has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 330, a function literal at line 118, a function literal at line 156, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · AcpClientLoop · ×1
  • AcpClientLoop::run (cyclomatic 30) crates/goose/src/acp/provider.rs:1207 — AcpClientLoop::run has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExtensionInstallModal.ExtensionInstallModal (cyclomatic 30) · ×1
  • ExtensionInstallModal.ExtensionInstallModal (cyclomatic 30) ui/desktop/src/components/ExtensionInstallModal.tsx:157 — ExtensionInstallModal.ExtensionInstallModal has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 8 function items inside it that branch (generateModalConfig, a function literal at line 273, determineModalType, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ItemIcon.getItemIcon (cyclomatic 30) · ×1
  • ItemIcon.getItemIcon (cyclomatic 30) ui/desktop/src/components/ItemIcon.tsx:31 — ItemIcon.getItemIcon 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 · AlertBox.AlertBox (cyclomatic 29) · ×1
  • AlertBox.AlertBox (cyclomatic 29) ui/desktop/src/components/alerts/AlertBox.tsx:50 — AlertBox.AlertBox has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 61, handleSaveThreshold, a function literal at line 152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · PromptsSettingsSection.PromptsSettingsSection (cyclomatic 28) · ×1
  • PromptsSettingsSection.PromptsSettingsSection (cyclomatic 28) ui/desktop/src/components/settings/PromptsSettingsSection.tsx:127 — PromptsSettingsSection.PromptsSettingsSection has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 11 function items inside it that branch (handleReset, handleResetAll, handleRestoreDefault, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · UserMessage.UserMessage (cyclomatic 28) · ×1
  • UserMessage.UserMessage (cyclomatic 28) ui/desktop/src/components/UserMessage.tsx:100 — UserMessage.UserMessage 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 8 function literals inside it that branch (lines 168, 209, 226, …). 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 · template.renderContentBlock (cyclomatic 27) · ×1
  • template.renderContentBlock (cyclomatic 27) crates/goose/src/session/export_html/template.js:359 — template.renderContentBlock has cyclomatic complexity 27 (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 · AppSettingsSection.AppSettingsSection (cyclomatic 27) · ×1
  • AppSettingsSection.AppSettingsSection (cyclomatic 27) ui/desktop/src/components/settings/app/AppSettingsSection.tsx:181 — AppSettingsSection.AppSettingsSection has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (handleMenuBarIconToggle, handleDockIconToggle, handleLanguageChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · App.AppInner (cyclomatic 27) · ×1
  • App.AppInner (cyclomatic 27) ui/desktop/src/App.tsx:331 — App.AppInner has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 457, 340, 548, …). 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.parseCommandLine (cyclomatic 26) · ×1
  • utils.parseCommandLine (cyclomatic 26) ui/desktop/src/components/settings/extensions/utils.ts:223 — utils.parseCommandLine 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 · ExtensionsSection.ExtensionsSection (cyclomatic 26) · ×1
  • ExtensionsSection.ExtensionsSection (cyclomatic 26) ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:53 — ExtensionsSection.ExtensionsSection has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 84, handleUpdateExtension, a function literal at line 80, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · RecipeModelSelector.RecipeModelSelector (cyclomatic 26) · ×1
  • RecipeModelSelector.RecipeModelSelector (cyclomatic 26) ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:66 — RecipeModelSelector.RecipeModelSelector 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 7 function literals inside it that branch (lines 136, 103, 153, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · REDACTED.renderRadar (cyclomatic 25) · ×1
  • REDACTED.renderRadar (cyclomatic 25) REDACTED:65 — REDACTED.renderRadar has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 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 · DirSwitcher.DirSwitcher (cyclomatic 25) · ×1
  • DirSwitcher.DirSwitcher (cyclomatic 25) ui/desktop/src/components/bottom_menu/DirSwitcher.tsx:87 — DirSwitcher.DirSwitcher has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (handleDirectoryChange, handleDirectoryClick, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SearchBar.SearchBar (cyclomatic 25) · ×1
  • SearchBar.SearchBar (cyclomatic 25) ui/desktop/src/components/conversation/SearchBar.tsx:62 — SearchBar.SearchBar 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 · ToolCallWithResponse.ToolCallView (cyclomatic 25) · ×1
  • ToolCallWithResponse.ToolCallView (cyclomatic 25) ui/desktop/src/components/ToolCallWithResponse.tsx:501 — ToolCallWithResponse.ToolCallView 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: one other method here (ToolCallWithResponse.ToolCallView::getToolDescription) 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 · autoUpdater.setupAutoUpdater (cyclomatic 25) · ×1
  • autoUpdater.setupAutoUpdater (cyclomatic 25) ui/desktop/src/utils/autoUpdater.ts:343 — autoUpdater.setupAutoUpdater has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 572, 470, 414, …). 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 · ToolExecutionOperation · ×1
  • ToolExecutionOperation::run (cyclomatic 24) crates/goose/src/agents/state_machine/ops_toolcalling.rs:910 — ToolExecutionOperation::run 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 · PermissionInspector · ×1
  • PermissionInspector::inspect (cyclomatic 24) crates/goose/src/permission/permission_inspector.rs:144 — PermissionInspector::inspect 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 · ContentCard.ContentCard (cyclomatic 24) · ×1
  • ContentCard.ContentCard (cyclomatic 24) documentation/src/components/ContentCard.tsx:126 — ContentCard.ContentCard has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 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 · ConfigSettings.ConfigSettings (cyclomatic 24) · ×1
  • ConfigSettings.ConfigSettings (cyclomatic 24) ui/desktop/src/components/settings/config/ConfigSettings.tsx:90 — ConfigSettings.ConfigSettings has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 189, a function literal at line 253, a function literal at line 106, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · DiagnosticsSession._json_virtual_files (cyclomatic 23) · ×1
  • DiagnosticsSession._json_virtual_files (cyclomatic 23) scripts/diagnostics-viewer.py:233 — DiagnosticsSession._json_virtual_files 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 · detail.RecipeDetailPage (cyclomatic 23) · ×1
  • detail.RecipeDetailPage (cyclomatic 23) documentation/src/pages/recipes/detail.tsx:20 — detail.RecipeDetailPage has cyclomatic complexity 23 (threshold 15). Of this number, 17 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.
D1 · Cyclomatic Complexity · OnboardingGuard.OnboardingGuard (cyclomatic 23) · ×1
  • OnboardingGuard.OnboardingGuard (cyclomatic 23) ui/desktop/src/components/onboarding/OnboardingGuard.tsx:48 — OnboardingGuard.OnboardingGuard 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 (checkProvider, a function literal at line 108, finishOnboarding, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ChatInput.ChatInput · ×1
  • ChatInput.ChatInput::handleHistoryNavigation (cyclomatic 23) ui/desktop/src/components/ChatInput.tsx:1034 — ChatInput.ChatInput::handleHistoryNavigation 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 (ChatInput.ChatInput) 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 · Hub.Hub (cyclomatic 23) · ×1
  • Hub.Hub (cyclomatic 23) ui/desktop/src/components/Hub.tsx:53 — Hub.Hub has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (createHubSession, handleSubmit, a function literal at line 91, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · useDisplayMode.useDisplayMode (cyclomatic 23) · ×1
  • useDisplayMode.useDisplayMode (cyclomatic 23) ui/desktop/src/components/McpApps/useDisplayMode.ts:47 — useDisplayMode.useDisplayMode has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 158, 134, 141, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · InlineEditText.InlineEditText (cyclomatic 23) · ×1
  • InlineEditText.InlineEditText (cyclomatic 23) ui/desktop/src/components/common/InlineEditText.tsx:39 — InlineEditText.InlineEditText has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 87, 122, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EnvVarsSection.EnvVarsSection (cyclomatic 23) · ×1
  • EnvVarsSection.EnvVarsSection (cyclomatic 23) ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:51 — EnvVarsSection.EnvVarsSection 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 6 function items inside it that branch (a function literal at line 144, a function literal at line 69, handleAdd, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · StandaloneAppView.StandaloneAppView (cyclomatic 23) · ×1
  • StandaloneAppView.StandaloneAppView (cyclomatic 23) ui/desktop/src/components/apps/StandaloneAppView.tsx:25 — StandaloneAppView.StandaloneAppView has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 39, 70, 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 · InferenceRunner · ×1
  • InferenceRunner::infer (cyclomatic 22) crates/goose-agent/src/inference.rs:430 — InferenceRunner::infer 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 · ComputerControllerServer · ×1
  • ComputerControllerServer::peekaboo_impl (cyclomatic 22) crates/goose-mcp/src/computercontroller/mod.rs:451 — ComputerControllerServer::peekaboo_impl 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 · generate.parse_bindings (cyclomatic 22) · ×1
  • generate.parse_bindings (cyclomatic 22) documentation/automation/gdk-api/generate.py:224 — generate.parse_bindings 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 · JsonTreeView._build_tree (cyclomatic 22) · ×1
  • JsonTreeView._build_tree (cyclomatic 22) scripts/diagnostics-viewer.py:86 — JsonTreeView._build_tree 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 · release_risk_report.assess_risk (cyclomatic 22) · ×1
  • release_risk_report.assess_risk (cyclomatic 22) workflow_recipes/release_risk_check/release_risk_report.py:117 — release_risk_report.assess_risk 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 · CostTracker.CostTracker (cyclomatic 22) · ×1
  • CostTracker.CostTracker (cyclomatic 22) ui/desktop/src/components/bottom_menu/CostTracker.tsx:33 — CostTracker.CostTracker has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardShortcutsSection.KeyboardShortcutsSection (cyclomatic 22) · ×1
  • KeyboardShortcutsSection.KeyboardShortcutsSection (cyclomatic 22) ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:336 — KeyboardShortcutsSection.KeyboardShortcutsSection has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (handleSave, handleToggle, a function literal at line 527, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ProviderGrid.ProviderCards (cyclomatic 22) · ×1
  • ProviderGrid.ProviderCards (cyclomatic 22) ui/desktop/src/components/settings/providers/ProviderGrid.tsx:95 — ProviderGrid.ProviderCards has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · goose_acp_macros · ×1
  • goose_acp_macros::custom_methods (cyclomatic 21) crates/goose-acp-macros/src/lib.rs:51 — goose_acp_macros::custom_methods 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 · LocalInferenceProvider · ×1
  • LocalInferenceProvider::stream (cyclomatic 21) crates/goose-local-inference/src/lib.rs:775 — LocalInferenceProvider::stream has cyclomatic complexity 21 (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 · reporter.trial_turns (cyclomatic 21) · ×1
  • reporter.trial_turns (cyclomatic 21) evals/harbor/reporter.py:102 — reporter.trial_turns 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 · index.verifyOidcToken (cyclomatic 21) · ×1
  • index.verifyOidcToken (cyclomatic 21) oidc-proxy/src/index.js:182 — index.verifyOidcToken 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 · MicrophoneSelector.MicrophoneSelector (cyclomatic 21) · ×1
  • MicrophoneSelector.MicrophoneSelector (cyclomatic 21) ui/desktop/src/components/settings/dictation/MicrophoneSelector.tsx:63 — MicrophoneSelector.MicrophoneSelector 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 9 function items inside it that branch (startTest, selectedLabel, a function literal at line 106, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · person (cyclomatic 21) · ×1
  • person (cyclomatic 21) REDACTED:152 — person has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 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 · goose_context_management · ×1
  • goose_context_management::format::format_message_for_compacting (cyclomatic 20) crates/goose-context-management/src/format.rs:4 — goose_context_management::format::format_message_for_compacting has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · goose_providers · ×1
  • goose_providers::live::run_actor (cyclomatic 20) crates/goose-providers/src/live.rs:190 — goose_providers::live::run_actor 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 · reporter.cmd_task (cyclomatic 20) · ×1
  • reporter.cmd_task (cyclomatic 20) evals/harbor/reporter.py:379 — reporter.cmd_task 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 · template.tocLabel (cyclomatic 20) · ×1
  • template.tocLabel (cyclomatic 20) crates/goose/src/session/export_html/template.js:436 — template.tocLabel has cyclomatic complexity 20 (threshold 15). 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, name the conditions: bind each compound test to a 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 · detail.ExtensionDetail (cyclomatic 20) · ×1
  • detail.ExtensionDetail (cyclomatic 20) documentation/src/pages/extensions/detail.tsx:13 — detail.ExtensionDetail has cyclomatic complexity 20 (threshold 15). Of this number, 18 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 · index.RecipePage (cyclomatic 20) · ×1
  • index.RecipePage (cyclomatic 20) documentation/src/pages/recipes/index.tsx:12 — index.RecipePage has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 7 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 · ProviderCatalogPicker.ProviderCatalogPicker (cyclomatic 20) · ×1
  • ProviderCatalogPicker.ProviderCatalogPicker (cyclomatic 20) ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderCatalogPicker.tsx:67 — ProviderCatalogPicker.ProviderCatalogPicker has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (fetchProviders, handleProviderSelect, a function literal at line 149, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · AuthSettingsSection.AuthSettingsSection (cyclomatic 20) · ×1
  • AuthSettingsSection.AuthSettingsSection (cyclomatic 20) ui/desktop/src/components/settings/auth/AuthSettingsSection.tsx:126 — AuthSettingsSection.AuthSettingsSection 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 4 function items inside it that branch (a function literal at line 217, confirmDelete, configureSecret, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · cronSchedule.parseCron (cyclomatic 20) · ×1
  • cronSchedule.parseCron (cyclomatic 20) ui/desktop/src/utils/cronSchedule.ts:93 — cronSchedule.parseCron 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 · SessionActionsHeader.JsonTreeNode (cyclomatic 20) · ×1
  • SessionActionsHeader.JsonTreeNode (cyclomatic 20) ui/desktop/src/components/SessionActionsHeader.tsx:245 — SessionActionsHeader.JsonTreeNode has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.openDirectoryDialog (cyclomatic 20) · ×1
  • main.openDirectoryDialog (cyclomatic 20) ui/desktop/src/main.ts:1690 — main.openDirectoryDialog 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 · BedrockProvider · ×1
  • BedrockProvider::stream (cyclomatic 19) crates/goose/src/providers/bedrock.rs:965 — BedrockProvider::stream 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 · Conversation · ×1
  • Conversation::push (cyclomatic 19) crates/goose-provider-types/src/conversation.rs:50 — Conversation::push 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 · reporter.cmd_compare (cyclomatic 19) · ×1
  • reporter.cmd_compare (cyclomatic 19) evals/harbor/reporter.py:494 — reporter.cmd_compare 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 · REDACTED.getChartOptions (cyclomatic 19) · ×1
  • REDACTED.getChartOptions (cyclomatic 19) REDACTED:98 — REDACTED.getChartOptions 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · template.renderToolHeader (cyclomatic 19) · ×1
  • template.renderToolHeader (cyclomatic 19) crates/goose/src/session/export_html/template.js:201 — template.renderToolHeader 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 · GooseDesktopInstaller.GooseDesktopInstaller (cyclomatic 19) · ×1
  • GooseDesktopInstaller.GooseDesktopInstaller (cyclomatic 19) documentation/src/components/GooseDesktopInstaller.tsx:27 — GooseDesktopInstaller.GooseDesktopInstaller has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (getStep3Content, buildGooseUrl). 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 · recipes.normalizeRecipe (cyclomatic 19) · ×1
  • recipes.normalizeRecipe (cyclomatic 19) documentation/src/utils/recipes.ts:36 — recipes.normalizeRecipe 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 · DocsIndex.addDocument (cyclomatic 19) · ×1
  • DocsIndex.addDocument (cyclomatic 19) services/ask-ai-bot/utils/ai/tools/docs.ts:54 — DocsIndex.addDocument 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 · MessageList.MessageList (cyclomatic 19) · ×1
  • MessageList.MessageList (cyclomatic 19) ui/desktop/src/components/MessageList.tsx:177 — MessageList.MessageList 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 6 function items inside it that branch (a function literal at line 243, a function literal at line 217, a function literal at line 192, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · useChatSession.useChatSession.handleSubmit (cyclomatic 19) · ×1
  • useChatSession.useChatSession.handleSubmit (cyclomatic 19) ui/desktop/src/hooks/useChatSession.ts:168 — useChatSession.useChatSession.handleSubmit 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 · allowlistFetcher.fetchAllowlistContent (cyclomatic 19) · ×1
  • allowlistFetcher.fetchAllowlistContent (cyclomatic 19) ui/desktop/src/allowlistFetcher.ts:31 — allowlistFetcher.fetchAllowlistContent 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 5 function literals inside it that branch (lines 78, 56, 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 · main.app.on("open-url") (cyclomatic 19) · ×1
  • main.app.on("open-url") (cyclomatic 19) ui/desktop/src/main.ts:652 — main.app.on("open-url") 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 · ShellTool · ×1
  • ShellTool::shell_with_cwd_and_emitter (cyclomatic 18) crates/goose/src/agents/platform_extensions/developer/shell.rs:247 — ShellTool::shell_with_cwd_and_emitter 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 · GcpVertexAIProvider · ×1
  • GcpVertexAIProvider::send_request_with_retry (cyclomatic 18) crates/goose/src/providers/gcpvertexai.rs:288 — GcpVertexAIProvider::send_request_with_retry 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 · SessionManager · ×1
  • SessionManager::apply_effects (cyclomatic 18) crates/goose/src/agents/state_machine/session.rs:53 — SessionManager::apply_effects has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · deeplink.addExtensionFromDeepLink (cyclomatic 18) · ×1
  • deeplink.addExtensionFromDeepLink (cyclomatic 18) ui/desktop/src/components/settings/extensions/deeplink.ts:93 — deeplink.addExtensionFromDeepLink has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into 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.extensionToFormData (cyclomatic 18) · ×1
  • utils.extensionToFormData (cyclomatic 18) ui/desktop/src/components/settings/extensions/utils.ts:63 — utils.extensionToFormData 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 · ShortcutRecorder.ShortcutRecorder · ×1
  • ShortcutRecorder.ShortcutRecorder::handleKeyDown (cyclomatic 18) ui/desktop/src/components/settings/keyboard/ShortcutRecorder.tsx:65 — ShortcutRecorder.ShortcutRecorder::handleKeyDown 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 · SubRecipeModal.SubRecipeModal (cyclomatic 18) · ×1
  • SubRecipeModal.SubRecipeModal (cyclomatic 18) ui/desktop/src/components/recipes/shared/SubRecipeModal.tsx:104 — SubRecipeModal.SubRecipeModal 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 items inside it that branch (handleSave, a function literal at line 119, handleBrowseFile). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · GitHubUpdater.checkForUpdates (cyclomatic 18) · ×1
  • GitHubUpdater.checkForUpdates (cyclomatic 18) ui/desktop/src/utils/githubUpdater.ts:478 — GitHubUpdater.checkForUpdates 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 · main.handleProtocolUrl (cyclomatic 18) · ×1
  • main.handleProtocolUrl (cyclomatic 18) ui/desktop/src/main.ts:583 — main.handleProtocolUrl 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 · GeminiCliProvider · ×1
  • GeminiCliProvider::stream (cyclomatic 17) crates/goose/src/providers/gemini_cli.rs:214 — GeminiCliProvider::stream 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 · ThinkFilter · ×1
  • ThinkFilter::process_buffer (cyclomatic 17) crates/goose-provider-types/src/thinking.rs:76 — ThinkFilter::process_buffer 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 · REDACTED.processDatasets (cyclomatic 17) · ×1
  • REDACTED.processDatasets (cyclomatic 17) REDACTED:219 — REDACTED.processDatasets has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 220). 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 · REDACTED.renderMarkers (cyclomatic 17) · ×1
  • REDACTED.renderMarkers (cyclomatic 17) REDACTED:143 — REDACTED.renderMarkers 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 2 function literals inside it that branch (lines 147, 145). 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 · gooseServe.startGooseServe (cyclomatic 17) · ×1
  • gooseServe.startGooseServe (cyclomatic 17) ui/desktop/src/gooseServe.ts:326 — gooseServe.startGooseServe has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GroupedExtensionLoadingToast.GroupedExtensionLoadingToast (cyclomatic 17) · ×1
  • GroupedExtensionLoadingToast.GroupedExtensionLoadingToast (cyclomatic 17) ui/desktop/src/components/GroupedExtensionLoadingToast.tsx:76 — GroupedExtensionLoadingToast.GroupedExtensionLoadingToast 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 149, getStatusIcon, getSummaryText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ProviderConfigForm.ApiKeyForm (cyclomatic 17) · ×1
  • ProviderConfigForm.ApiKeyForm (cyclomatic 17) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:164 — ProviderConfigForm.ApiKeyForm 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 4 function items inside it that branch (handleSubmit, a function literal at line 186, 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 · useAudioRecorder.useAudioRecorder.startRecording (cyclomatic 17) · ×1
  • useAudioRecorder.useAudioRecorder.startRecording (cyclomatic 17) ui/desktop/src/hooks/useAudioRecorder.ts:278 — useAudioRecorder.useAudioRecorder.startRecording 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 · ExternalBackendSection.ExternalBackendSection (cyclomatic 17) · ×1
  • ExternalBackendSection.ExternalBackendSection (cyclomatic 17) ui/desktop/src/components/settings/app/ExternalBackendSection.tsx:98 — ExternalBackendSection.ExternalBackendSection has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (validateUrl, saveConfig, handleUrlBlur, …). 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 · SearchHighlighter.constructor (cyclomatic 17) · ×1
  • SearchHighlighter.constructor (cyclomatic 17) ui/desktop/src/utils/searchHighlighter.ts:19 — SearchHighlighter.constructor has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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 · ElicitationRequest.ElicitationRequest (cyclomatic 17) · ×1
  • ElicitationRequest.ElicitationRequest (cyclomatic 17) ui/desktop/src/components/ElicitationRequest.tsx:58 — ElicitationRequest.ElicitationRequest has cyclomatic complexity 17 (threshold 15). Of this number, 10 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 · messageRowContext.deriveMessageRowContexts (cyclomatic 17) · ×1
  • messageRowContext.deriveMessageRowContexts (cyclomatic 17) ui/desktop/src/components/messageRowContext.ts:65 — messageRowContext.deriveMessageRowContexts has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, 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 · DesktopFileAccess.writeGoosehints (cyclomatic 17) · ×1
  • DesktopFileAccess.writeGoosehints (cyclomatic 17) ui/desktop/src/desktopFileAccess.ts:179 — DesktopFileAccess.writeGoosehints 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 · SkillsClient · ×1
  • SkillsClient::call_tool (cyclomatic 16) crates/goose/src/skills/client.rs:105 — SkillsClient::call_tool 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 · GooseBinaryAgent._compute_cost_from_pricing (cyclomatic 16) · ×1
  • GooseBinaryAgent._compute_cost_from_pricing (cyclomatic 16) evals/harbor/agent.py:261 — GooseBinaryAgent._compute_cost_from_pricing 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 · SessionViewer.action_copy_file (cyclomatic 16) · ×1
  • SessionViewer.action_copy_file (cyclomatic 16) scripts/diagnostics-viewer.py:604 — SessionViewer.action_copy_file has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.signature (cyclomatic 16) · ×1
  • index.signature (cyclomatic 16) documentation/src/components/GdkApiReference/index.tsx:131 — index.signature has cyclomatic complexity 16 (threshold 15). Of this number, 13 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 · LinuxDesktopInstallButtons.LinuxDesktopInstallButtons (cyclomatic 16) · ×1
  • LinuxDesktopInstallButtons.LinuxDesktopInstallButtons (cyclomatic 16) documentation/src/components/LinuxDesktopInstallButtons.js:29 — LinuxDesktopInstallButtons.LinuxDesktopInstallButtons 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 37, 63, 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 · prepare-platform-binaries.cleanBinDirectory (cyclomatic 16) · ×1
  • prepare-platform-binaries.cleanBinDirectory (cyclomatic 16) ui/desktop/scripts/prepare-platform-binaries.js:154 — prepare-platform-binaries.cleanBinDirectory 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 one function literal inside it that branches (line 164). 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 · messages.applyContentChunk (cyclomatic 16) · ×1
  • messages.applyContentChunk (cyclomatic 16) ui/desktop/src/acp/adapter/messages.ts:17 — messages.applyContentChunk 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 · ModelAndProviderContext.ModelAndProviderProvider (cyclomatic 16) · ×1
  • ModelAndProviderContext.ModelAndProviderProvider (cyclomatic 16) ui/desktop/src/components/ModelAndProviderContext.tsx:87 — ModelAndProviderContext.ModelAndProviderProvider 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 7 function literals inside it that branch (lines 93, 145, 158, …). 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 · CustomProviderForm.CustomProviderForm · ×1
  • CustomProviderForm.CustomProviderForm::handleSubmit (cyclomatic 16) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:447 — CustomProviderForm.CustomProviderForm::handleSubmit 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. This shape REPEATS in the file: one other method here (CustomProviderForm.CustomProviderForm) 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 · ProviderSelector.ProviderSelector (cyclomatic 16) · ×1
  • ProviderSelector.ProviderSelector (cyclomatic 16) ui/desktop/src/components/onboarding/ProviderSelector.tsx:63 — ProviderSelector.ProviderSelector has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MentionPopover.fuzzyMatch (cyclomatic 16) · ×1
  • MentionPopover.fuzzyMatch (cyclomatic 16) ui/desktop/src/components/MentionPopover.tsx:99 — MentionPopover.fuzzyMatch 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 · PermissionModal.PermissionModal (cyclomatic 16) · ×1
  • PermissionModal.PermissionModal (cyclomatic 16) ui/desktop/src/components/settings/permission/PermissionModal.tsx:75 — PermissionModal.PermissionModal has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionListView.EditSessionModal (cyclomatic 16) · ×1
  • SessionListView.EditSessionModal (cyclomatic 16) ui/desktop/src/components/sessions/SessionListView.tsx:152 — SessionListView.EditSessionModal 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 4 function literals inside it that branch (lines 200, 157, 166, …). 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 · CreateSubRecipeInline.CreateSubRecipeInline (cyclomatic 16) · ×1
  • CreateSubRecipeInline.CreateSubRecipeInline (cyclomatic 16) ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:135 — CreateSubRecipeInline.CreateSubRecipeInline has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 163). 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 · remoteBackends.connectRemoteBackend (cyclomatic 16) · ×1
  • remoteBackends.connectRemoteBackend (cyclomatic 16) ui/desktop/src/remoteBackends.ts:290 — remoteBackends.connectRemoteBackend 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 2 function items inside it that branch (resolve, run). 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 · GitHubUpdater.downloadUpdate (cyclomatic 16) · ×1
  • GitHubUpdater.downloadUpdate (cyclomatic 16) ui/desktop/src/utils/githubUpdater.ts:632 — GitHubUpdater.downloadUpdate 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 · (anonymous).init (cyclomatic 16) · ×1
  • (anonymous).init (cyclomatic 16) REDACTED:149 — (anonymous).init has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 161, 200, 205). 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.
D10 · Test Quality · Skipped test · ×1
  • Skipped test: ${label} — $provider / $model — $skippedReason ui/desktop/tests/integration/test_providers_lib.ts:332 — Skipped — switched off by test.skip.each
D2 · Cognitive Complexity · main.appMain (cognitive 138) · ×1
  • main.appMain (cognitive 138) ui/desktop/src/main.ts:2414 — main.appMain has cognitive complexity 138 (threshold 15). Drivers by points: if/else 65 (106 pts), boolean chains 17, error handling 7 (8 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 45). Of this number, 89 points are the body's own statements and 49 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 · McpAppRenderer.McpAppRenderer (cognitive 115) · ×1
  • McpAppRenderer.McpAppRenderer (cognitive 115) ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502 — McpAppRenderer.McpAppRenderer has cognitive complexity 115 (threshold 15). Drivers by points: if/else 42 (56 pts), boolean chains 35, ternaries 14 (20 pts), error handling 1 (2 pts), loops 2 (nesting depth added 21). Of this number, 25 points are the body's own statements and 90 belong to 25 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.createChat (cognitive 99) · ×1
  • main.createChat (cognitive 99) ui/desktop/src/main.ts:996 — main.createChat has cognitive complexity 99 (threshold 15). Drivers by points: if/else 38 (63 pts), ternaries 6 (15 pts), error handling 6 (10 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 39). Of this number, 62 points are the body's own statements and 37 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 · MentionPopover.MentionPopover (cognitive 95) · ×1
  • MentionPopover.MentionPopover (cognitive 95) ui/desktop/src/components/MentionPopover.tsx:166 — MentionPopover.MentionPopover has cognitive complexity 95 (threshold 15). Drivers by points: if/else 40 (58 pts), boolean chains 18, ternaries 9 (14 pts), error handling 3 (4 pts), loops 1 (nesting depth added 24). Most of this is not in the body itself: 6 of the 95 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 189, a function literal at line 528, 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 · prepare_aggregate_metrics.extract_metrics_from_eval_file (cognitive 93) · ×1
  • prepare_aggregate_metrics.extract_metrics_from_eval_file (cognitive 93) scripts/bench-postprocess-scripts/prepare_aggregate_metrics.py:72 — prepare_aggregate_metrics.extract_metrics_from_eval_file has cognitive complexity 93 (threshold 15). Drivers by points: if/else 17 (47 pts), ternaries 4 (20 pts), loops 7 (17 pts), boolean chains 8, error handling 1 (nesting depth added 56). 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 · AcpClientLoop · ×1
  • AcpClientLoop::run (cognitive 78) crates/goose/src/acp/provider.rs:1207 — AcpClientLoop::run has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (73 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 48). 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 · CreateEditRecipeModal.CreateEditRecipeModal (cognitive 76) · ×1
  • CreateEditRecipeModal.CreateEditRecipeModal (cognitive 76) ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:118 — CreateEditRecipeModal.CreateEditRecipeModal has cognitive complexity 76 (threshold 15). Drivers by points: boolean chains 39, if/else 19 (20 pts), ternaries 8 (10 pts), error handling 5 (7 pts) (nesting depth added 5). Most of this is not in the body itself: 10 of the 76 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 211, a function literal at line 126, a function literal at line 346, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SnowflakeProvider · ×1
  • SnowflakeProvider::post (cognitive 75) crates/goose-providers/src/snowflake.rs:100 — SnowflakeProvider::post has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (52 pts), match/switch 5 (16 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AcpProvider · ×1
  • AcpProvider::stream (cognitive 71) crates/goose/src/acp/provider.rs:840 — AcpProvider::stream has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (62 pts), match/switch 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community_stars.main (cognitive 70) · ×1
  • community_stars.main (cognitive 70) documentation/scripts/community_stars.py:184 — community_stars.main has cognitive complexity 70 (threshold 15). Drivers by points: if/else 26 (48 pts), loops 6 (11 pts), error handling 3 (5 pts), boolean chains 3, ternaries 1 (3 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 · BaseChat.BaseChat (cognitive 68) · ×1
  • BaseChat.BaseChat (cognitive 68) ui/desktop/src/components/BaseChat.tsx:74 — BaseChat.BaseChat has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 26, ternaries 8 (12 pts), loops 1 (nesting depth added 8). Of this number, 28 points are the body's own statements and 40 belong to 17 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 · JsonSchemaForm.JsonSchemaForm (cognitive 67) · ×1
  • JsonSchemaForm.JsonSchemaForm (cognitive 67) ui/desktop/src/components/ui/JsonSchemaForm.tsx:73 — JsonSchemaForm.JsonSchemaForm has cognitive complexity 67 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 21, ternaries 5 (9 pts), loops 2 (4 pts) (nesting depth added 15). Most of this is not in the body itself: 3 of the 67 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 106, a function literal at line 82, renderField, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ToolCallWithResponse.ToolCallView · ×1
  • ToolCallWithResponse.ToolCallView::getToolDescription (cognitive 64) ui/desktop/src/components/ToolCallWithResponse.tsx:597 — ToolCallWithResponse.ToolCallView::getToolDescription has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (52 pts), boolean chains 8, ternaries 1 (3 pts), match/switch 1 (nesting depth added 29). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (ToolCallWithResponse.ToolCallView) 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 · RecipesView.RecipesView (cognitive 64) · ×1
  • RecipesView.RecipesView (cognitive 64) ui/desktop/src/components/recipes/RecipesView.tsx:302 — RecipesView.RecipesView has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 24, if/else 16 (17 pts), error handling 12, ternaries 10 (11 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 64 points are its own statements and the rest belongs to 20 function items inside it that branch (RecipeItem, handleSaveSlashCommand, renderContent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ProviderConfigurationModal.ProviderConfigurationModal (cognitive 62) · ×1
  • ProviderConfigurationModal.ProviderConfigurationModal (cognitive 62) ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:179 — ProviderConfigurationModal.ProviderConfigurationModal has cognitive complexity 62 (threshold 15). Drivers by points: boolean chains 22, if/else 15 (18 pts), ternaries 9 (17 pts), error handling 3, loops 1 (2 pts) (nesting depth added 12). Of this number, 32 points are the body's own statements and 30 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 · MessageQueue.MessageQueue (cognitive 61) · ×1
  • MessageQueue.MessageQueue (cognitive 61) ui/desktop/src/components/MessageQueue.tsx:112 — MessageQueue.MessageQueue has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (24 pts), ternaries 14 (22 pts), boolean chains 15 (nesting depth added 16). Of this number, 17 points are the body's own statements and 44 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 · ExtensionModal.ExtensionModal (cognitive 61) · ×1
  • ExtensionModal.ExtensionModal (cognitive 61) ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx:72 — ExtensionModal.ExtensionModal has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 31, if/else 15 (19 pts), ternaries 6 (8 pts), error handling 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 13 of the 61 points are its own statements and the rest belongs to 16 function items inside it that branch (handleSubmit, handleHeaderChange, hasFormChanges, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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.CopyPageButton (cognitive 56) · ×1
  • index.CopyPageButton (cognitive 56) documentation/src/theme/DocItem/Layout/index.tsx:27 — index.CopyPageButton has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 22, ternaries 4 (5 pts), error handling 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 56 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 129, a function literal at line 186, a function literal at line 96, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · DefaultProviderSetupForm.DefaultProviderSetupForm (cognitive 56) · ×1
  • DefaultProviderSetupForm.DefaultProviderSetupForm (cognitive 56) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/DefaultProviderSetupForm.tsx:85 — DefaultProviderSetupForm.DefaultProviderSetupForm has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 22, ternaries 5 (8 pts), error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 56 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 100, getPlaceholder, getFieldLabel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · autoUpdater.registerUpdateIpcHandlers (cognitive 56) · ×1
  • autoUpdater.registerUpdateIpcHandlers (cognitive 56) ui/desktop/src/utils/autoUpdater.ts:72 — autoUpdater.registerUpdateIpcHandlers has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 11, error handling 5 (8 pts), ternaries 4 (8 pts) (nesting depth added 19). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 81, 222, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · deeplink-generator.DeeplinkGenerator (cognitive 55) · ×1
  • deeplink-generator.DeeplinkGenerator (cognitive 55) documentation/src/pages/deeplink-generator.tsx:33 — deeplink-generator.DeeplinkGenerator has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 13, ternaries 8, error handling 3 (4 pts) (nesting depth added 16). Most of this is not in the body itself: 7 of the 55 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 68, generateDeeplink, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SecurityToggle.SecurityToggle (cognitive 55) · ×1
  • SecurityToggle.SecurityToggle (cognitive 55) ui/desktop/src/components/settings/security/SecurityToggle.tsx:184 — SecurityToggle.SecurityToggle has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 19 (23 pts), boolean chains 19, if/else 9 (12 pts), error handling 1 (nesting depth added 7). Of this number, 40 points are the body's own statements and 15 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, 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 · SessionListView.SessionListView (cognitive 55) · ×1
  • SessionListView.SessionListView (cognitive 55) ui/desktop/src/components/sessions/SessionListView.tsx:281 — SessionListView.SessionListView has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 8, error handling 7 (8 pts), ternaries 5, loops 2 (nesting depth added 7). Most of this is not in the body itself: 3 of the 55 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 378, a function literal at line 608, renderActualContent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · GooseAcpHandler · ×1
  • GooseAcpHandler::handle_dispatch_from (cognitive 54) crates/goose/src/acp/server/dispatch.rs:9 — GooseAcpHandler::handle_dispatch_from has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 24 (43 pts), if/else 7 (11 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TelegramGateway · ×1
  • TelegramGateway::start (cognitive 52) crates/goose/src/gateway/telegram.rs:969 — TelegramGateway::start has cognitive complexity 52 (threshold 15). Drivers by points: if/else 7 (26 pts), match/switch 5 (20 pts), loops 3 (6 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 · ParameterInputModal.ParameterInputModal (cognitive 51) · ×1
  • ParameterInputModal.ParameterInputModal (cognitive 51) ui/desktop/src/components/ParameterInputModal.tsx:87 — ParameterInputModal.ParameterInputModal has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 16, if/else 11 (13 pts) (nesting depth added 16). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 216, a function literal at line 141, 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 · PermissionInspector · ×1
  • PermissionInspector::inspect (cognitive 50) crates/goose/src/permission/permission_inspector.rs:144 — PermissionInspector::inspect has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (30 pts), match/switch 5 (15 pts), loops 2 (3 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 · goose_acp_macros · ×1
  • goose_acp_macros::custom_methods (cognitive 49) crates/goose-acp-macros/src/lib.rs:51 — goose_acp_macros::custom_methods has cognitive complexity 49 (threshold 15). Drivers by points: if/else 26 (43 pts), match/switch 2 (5 pts), 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 · ChatInput.ChatInput (cognitive 49) · ×1
  • ChatInput.ChatInput (cognitive 49) ui/desktop/src/components/ChatInput.tsx:219 — ChatInput.ChatInput has cognitive complexity 49 (threshold 15). Drivers by points: if/else 116 (162 pts), boolean chains 99, ternaries 16 (22 pts), error handling 4, loops 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ChatInput.ChatInput::handlePaste, ChatInput.ChatInput::handleHistoryNavigation, ChatInput.ChatInput::handleKeyDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SearchView.SearchView (cognitive 47) · ×1
  • SearchView.SearchView (cognitive 47) ui/desktop/src/components/conversation/SearchView.tsx:41 — SearchView.SearchView has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (33 pts), boolean chains 14 (nesting depth added 4). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 314, 114, 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 · ScheduleDetailView.ScheduleDetailView (cognitive 47) · ×1
  • ScheduleDetailView.ScheduleDetailView (cognitive 47) ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 — ScheduleDetailView.ScheduleDetailView has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 21, if/else 14, error handling 8 (9 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 21 points are the body's own statements and 26 belong to 10 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 · reporter.trial_turns (cognitive 46) · ×1
  • reporter.trial_turns (cognitive 46) evals/harbor/reporter.py:102 — reporter.trial_turns has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (27 pts), error handling 3 (8 pts), ternaries 3 (6 pts), loops 2 (4 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 · reporter.cmd_task (cognitive 46) · ×1
  • reporter.cmd_task (cognitive 46) evals/harbor/reporter.py:379 — reporter.cmd_task has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (14 pts), ternaries 2 (4 pts), boolean chains 3 (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 · LocalInferenceSettings.LocalInferenceSettings (cognitive 46) · ×1
  • LocalInferenceSettings.LocalInferenceSettings (cognitive 46) ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:161 — LocalInferenceSettings.LocalInferenceSettings has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 20, if/else 14 (18 pts), error handling 7, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 29 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 · ThinkFilter · ×1
  • ThinkFilter::process_buffer (cognitive 43) crates/goose-provider-types/src/thinking.rs:76 — ThinkFilter::process_buffer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 2 (5 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 · InferenceRunner · ×1
  • InferenceRunner::infer (cognitive 42) crates/goose-agent/src/inference.rs:430 — InferenceRunner::infer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 3 (9 pts), boolean chains 4, loops 3 (4 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 · ItemIcon.getItemIcon (cognitive 42) · ×1
  • ItemIcon.getItemIcon (cognitive 42) ui/desktop/src/components/ItemIcon.tsx:31 — ItemIcon.getItemIcon has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 7, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SessionActionsHeader.SessionActionsHeader (cognitive 42) · ×1
  • SessionActionsHeader.SessionActionsHeader (cognitive 42) ui/desktop/src/components/SessionActionsHeader.tsx:348 — SessionActionsHeader.SessionActionsHeader has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 9, ternaries 9, error handling 4 (nesting depth added 2). Most of this is not in the body itself: 13 of the 42 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 428, 459, 375, …). 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 · generate-acp-docs.schemaType (cognitive 41) · ×1
  • generate-acp-docs.schemaType (cognitive 41) documentation/scripts/generate-acp-docs.js:80 — generate-acp-docs.schemaType has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 9, ternaries 3 (8 pts), loops 1 (nesting depth added 11). Of this number, 37 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateSection.UpdateSection (cognitive 41) · ×1
  • UpdateSection.UpdateSection (cognitive 41) ui/desktop/src/components/settings/app/UpdateSection.tsx:110 — UpdateSection.UpdateSection has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (13 pts), ternaries 4 (7 pts), error handling 3, match/switch 3 (nesting depth added 7). Most of this is not in the body itself: 12 of the 41 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 145, getStatusMessage, checkForUpdates, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · utils.parseCommandLine (cognitive 40) · ×1
  • utils.parseCommandLine (cognitive 40) ui/desktop/src/components/settings/extensions/utils.ts:223 — utils.parseCommandLine has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 6, 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 · GcpVertexAIProvider · ×1
  • GcpVertexAIProvider::send_request_with_retry (cognitive 39) crates/goose/src/providers/gcpvertexai.rs:288 — GcpVertexAIProvider::send_request_with_retry has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 2 (4 pts), boolean chains 2, match/switch 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 · autoUpdater.setupAutoUpdater (cognitive 39) · ×1
  • autoUpdater.setupAutoUpdater (cognitive 39) ui/desktop/src/utils/autoUpdater.ts:343 — autoUpdater.setupAutoUpdater has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (26 pts), error handling 3 (5 pts), boolean chains 4, ternaries 4 (nesting depth added 8). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 572, 470, 449, …). 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 · BottomMenuAlertPopover.BottomMenuAlertPopover (cognitive 37) · ×1
  • BottomMenuAlertPopover.BottomMenuAlertPopover (cognitive 37) ui/desktop/src/components/bottom_menu/BottomMenuAlertPopover.tsx:14 — BottomMenuAlertPopover.BottomMenuAlertPopover has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 12, ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 9 of the 37 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 26, 140, 171, …). 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 · RecipeFormFields.RecipeFormFields (cognitive 37) · ×1
  • RecipeFormFields.RecipeFormFields (cognitive 37) ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:133 — RecipeFormFields.RecipeFormFields has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 20, ternaries 12, if/else 5. Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 19 function items inside it that branch (a function literal at line 227, a function literal at line 568, isParameterUsed, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · generate.parse_bindings (cognitive 36) · ×1
  • generate.parse_bindings (cognitive 36) documentation/automation/gdk-api/generate.py:224 — generate.parse_bindings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 8, ternaries 1 (3 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 · CustomProviderForm.CustomProviderForm (cognitive 36) · ×1
  • CustomProviderForm.CustomProviderForm (cognitive 36) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257 — CustomProviderForm.CustomProviderForm has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 37, if/else 24 (29 pts), ternaries 4 (6 pts), error handling 1 (nesting depth added 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. This shape REPEATS in the file: one other method here (CustomProviderForm.CustomProviderForm::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 · AlertBox.AlertBox (cognitive 36) · ×1
  • AlertBox.AlertBox (cognitive 36) ui/desktop/src/components/alerts/AlertBox.tsx:50 — AlertBox.AlertBox has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 6 (11 pts), boolean chains 5, error handling 2 (nesting depth added 11). Most of this is not in the body itself: 11 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 61, handleSaveThreshold, a function literal at line 152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · GeminiCliProvider · ×1
  • GeminiCliProvider::stream (cognitive 35) crates/goose/src/providers/gemini_cli.rs:214 — GeminiCliProvider::stream has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 2 (6 pts), boolean chains 1, 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 · main.openDirectoryDialog (cognitive 35) · ×1
  • main.openDirectoryDialog (cognitive 35) ui/desktop/src/main.ts:1690 — main.openDirectoryDialog has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 3 (7 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 · SkillsClient · ×1
  • SkillsClient::call_tool (cognitive 34) crates/goose/src/skills/client.rs:105 — SkillsClient::call_tool has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (9 pts), loops 1 (3 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 · JsonTreeView._build_tree (cognitive 34) · ×1
  • JsonTreeView._build_tree (cognitive 34) scripts/diagnostics-viewer.py:86 — JsonTreeView._build_tree has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (8 pts), loops 2 (4 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 · LocalModelPicker.LocalModelPicker (cognitive 34) · ×1
  • LocalModelPicker.LocalModelPicker (cognitive 34) ui/desktop/src/components/onboarding/LocalModelPicker.tsx:107 — LocalModelPicker.LocalModelPicker has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 12, error handling 4 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 179, handleCancelDownload, handlePrimaryAction, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ImportRecipeForm.ImportRecipeForm (cognitive 34) · ×1
  • ImportRecipeForm.ImportRecipeForm (cognitive 34) ui/desktop/src/components/recipes/ImportRecipeForm.tsx:104 — ImportRecipeForm.ImportRecipeForm has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, ternaries 9, error handling 3 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 119, handleRecipeUploadChange, 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 · CallGraph · ×1
  • CallGraph::bfs_chains (cognitive 33) crates/goose/src/agents/platform_extensions/analyze/graph.rs:147 — CallGraph::bfs_chains has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (8 pts), match/switch 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 · LocalModelManager.LocalModelManager (cognitive 33) · ×1
  • LocalModelManager.LocalModelManager (cognitive 33) ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:73 — LocalModelManager.LocalModelManager has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (9 pts), error handling 6, ternaries 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 197, a function literal at line 127, loadSelectedModel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · main.app.on("open-url") (cognitive 33) · ×1
  • main.app.on("open-url") (cognitive 33) ui/desktop/src/main.ts:652 — main.app.on("open-url") has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComputerControllerServer · ×1
  • ComputerControllerServer::peekaboo_impl (cognitive 32) crates/goose-mcp/src/computercontroller/mod.rs:451 — ComputerControllerServer::peekaboo_impl has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 7 (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 · CLIExtensionInstructions.CLIExtensionInstructions (cognitive 32) · ×1
  • CLIExtensionInstructions.CLIExtensionInstructions (cognitive 32) documentation/src/components/CLIExtensionInstructions.tsx:22 — CLIExtensionInstructions.CLIExtensionInstructions has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 18 (27 pts), boolean chains 5 (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 · ModelSettingsPanel.ModelSettingsPanel (cognitive 32) · ×1
  • ModelSettingsPanel.ModelSettingsPanel (cognitive 32) ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:387 — ModelSettingsPanel.ModelSettingsPanel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14, boolean chains 8, ternaries 6 (8 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 396, setChatTemplateMode, a function literal at line 423, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ScheduleModal.ScheduleModal · ×1
  • ScheduleModal.ScheduleModal::handleBrowseFile (cognitive 32) ui/desktop/src/components/schedule/ScheduleModal.tsx:290 — ScheduleModal.ScheduleModal::handleBrowseFile has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ScheduleModal.ScheduleModal) 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 · McpAppRenderer.GooseAppFrame (cognitive 32) · ×1
  • McpAppRenderer.GooseAppFrame (cognitive 32) ui/desktop/src/components/McpApps/McpAppRenderer.tsx:214 — McpAppRenderer.GooseAppFrame has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 9, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). None of this is in the body itself: all 32 points belong to 16 function literals inside it that branch (lines 324, 259, 298, …). 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 · GooseMessage.GooseMessage (cognitive 32) · ×1
  • GooseMessage.GooseMessage (cognitive 32) ui/desktop/src/components/GooseMessage.tsx:47 — GooseMessage.GooseMessage has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 26, ternaries 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 · WhisperTranscriber · ×1
  • WhisperTranscriber::apply_timestamp_pairing_rule (cognitive 31) crates/goose/src/dictation/whisper.rs:579 — WhisperTranscriber::apply_timestamp_pairing_rule has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (8 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 · OpenAiProvider · ×1
  • OpenAiProvider::sanitize_request_for_compat (cognitive 31) crates/goose-providers/src/openai.rs:523 — OpenAiProvider::sanitize_request_for_compat has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (4 pts), match/switch 1 (3 pts), boolean chains 1 (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 · llm_judge.evaluate_with_openai (cognitive 31) · ×1
  • llm_judge.evaluate_with_openai (cognitive 31) scripts/bench-postprocess-scripts/llm-judges/llm_judge.py:34 — llm_judge.evaluate_with_openai has cognitive complexity 31 (threshold 15). Drivers by points: error handling 5 (13 pts), if/else 5 (12 pts), loops 3 (5 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 · PromptsSettingsSection.PromptsSettingsSection (cognitive 31) · ×1
  • PromptsSettingsSection.PromptsSettingsSection (cognitive 31) ui/desktop/src/components/settings/PromptsSettingsSection.tsx:127 — PromptsSettingsSection.PromptsSettingsSection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, error handling 5 (6 pts), loops 1, ternaries 1 (nesting depth added 5). 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 (handleRestoreDefault, handleReset, handleResetAll, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · CronPicker.CronPicker (cognitive 31) · ×1
  • CronPicker.CronPicker (cognitive 31) ui/desktop/src/components/schedule/CronPicker.tsx:89 — CronPicker.CronPicker has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, ternaries 9, if/else 4, error handling 1. Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 117, 143, 136, …). 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 · DatabricksProvider · ×1
  • DatabricksProvider::stream (cognitive 30) crates/goose-providers/src/databricks.rs:596 — DatabricksProvider::stream has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelsBottomBar.ModelsBottomBar (cognitive 30) · ×1
  • ModelsBottomBar.ModelsBottomBar (cognitive 30) ui/desktop/src/components/settings/models/bottom_bar/ModelsBottomBar.tsx:73 — ModelsBottomBar.ModelsBottomBar has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 6, error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (handleRecentModelClick, a function literal at line 142, handleModelMenuCloseAutoFocus, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · RecipeModelSelector.RecipeModelSelector (cognitive 30) · ×1
  • RecipeModelSelector.RecipeModelSelector (cognitive 30) ui/desktop/src/components/recipes/shared/RecipeModelSelector.tsx:66 — RecipeModelSelector.RecipeModelSelector has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (11 pts), if/else 6 (7 pts), error handling 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 15 belong to 7 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 · ChatRecallClient · ×1
  • ChatRecallClient::handle_chatrecall (cognitive 29) crates/goose/src/agents/platform_extensions/chatrecall.rs:127 — ChatRecallClient::handle_chatrecall has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (9 pts), match/switch 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 · prepare-platform-binaries.cleanBinDirectory (cognitive 29) · ×1
  • prepare-platform-binaries.cleanBinDirectory (cognitive 29) ui/desktop/scripts/prepare-platform-binaries.js:154 — prepare-platform-binaries.cleanBinDirectory has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, error handling 1 (4 pts), ternaries 1 (3 pts) (nesting depth added 14). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to one function literal inside it that branches (line 164). 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 · scroll-area.ScrollArea (cognitive 29) · ×1
  • scroll-area.ScrollArea (cognitive 29) ui/desktop/src/components/ui/scroll-area.tsx:26 — scroll-area.ScrollArea has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 8, ternaries 2 (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 10 function literals inside it that branch (lines 107, 154, 188, …). 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 · AppsView.AppsView (cognitive 29) · ×1
  • AppsView.AppsView (cognitive 29) ui/desktop/src/components/apps/AppsView.tsx:92 — AppsView.AppsView has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), error handling 6, ternaries 2 (3 pts), loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 118, a function literal at line 330, a function literal at line 156, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · detail.ExtensionDetail (cognitive 28) · ×1
  • detail.ExtensionDetail (cognitive 28) documentation/src/pages/extensions/detail.tsx:13 — detail.ExtensionDetail has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 8, if/else 2 (nesting depth added 11). Of this number, 26 points are the body's own statements and 2 belong to 2 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 · LiveVoiceButton.LiveVoiceButton (cognitive 28) · ×1
  • LiveVoiceButton.LiveVoiceButton (cognitive 28) ui/desktop/src/components/LiveVoiceButton.tsx:55 — LiveVoiceButton.LiveVoiceButton has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (9 pts), if/else 7 (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 · MessageUsageStats.MessageUsageStats (cognitive 28) · ×1
  • MessageUsageStats.MessageUsageStats (cognitive 28) ui/desktop/src/components/MessageUsageStats.tsx:112 — MessageUsageStats.MessageUsageStats has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 21, if/else 5, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · toolCallChaining.identifyConsecutiveToolCalls (cognitive 28) · ×1
  • toolCallChaining.identifyConsecutiveToolCalls (cognitive 28) ui/desktop/src/utils/toolCallChaining.ts:8 — toolCallChaining.identifyConsecutiveToolCalls has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 1, loops 1 (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 · GitHubUpdater.checkForUpdates (cognitive 28) · ×1
  • GitHubUpdater.checkForUpdates (cognitive 28) ui/desktop/src/utils/githubUpdater.ts:478 — GitHubUpdater.checkForUpdates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 3 (6 pts), boolean chains 1, 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 · goose_agent · ×1
  • goose_agent::skills::discovery::scan_skills_from_dir (cognitive 27) crates/goose-agent/src/skills/discovery.rs:140 — goose_agent::skills::discovery::scan_skills_from_dir has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (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 · release_risk_report.generate_report (cognitive 27) · ×1
  • release_risk_report.generate_report (cognitive 27) workflow_recipes/release_risk_check/release_risk_report.py:265 — release_risk_report.generate_report has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts), ternaries 1 (3 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 · OnboardingGuard.OnboardingGuard (cognitive 27) · ×1
  • OnboardingGuard.OnboardingGuard (cognitive 27) ui/desktop/src/components/onboarding/OnboardingGuard.tsx:48 — OnboardingGuard.OnboardingGuard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (checkProvider, finishOnboarding, a function literal at line 108, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · KeyboardShortcutsSection.KeyboardShortcutsSection (cognitive 27) · ×1
  • KeyboardShortcutsSection.KeyboardShortcutsSection (cognitive 27) ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:336 — KeyboardShortcutsSection.KeyboardShortcutsSection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 7 function items inside it that branch (handleToggle, handleSave, a function literal at line 527, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · main.handleProtocolUrl (cognitive 27) · ×1
  • main.handleProtocolUrl (cognitive 27) ui/desktop/src/main.ts:583 — main.handleProtocolUrl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, 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 · SageMakerTgiProvider · ×1
  • SageMakerTgiProvider::create_tgi_request (cognitive 26) crates/goose/src/providers/sagemaker_tgi.rs:96 — SageMakerTgiProvider::create_tgi_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), boolean chains 2, match/switch 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 · ObservationLayer · ×1
  • ObservationLayer::handle_record (cognitive 26) crates/goose/src/tracing/observation_layer.rs:196 — ObservationLayer::handle_record has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 1 (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 · goose_download_manager · ×1
  • goose_download_manager::cleanup_partial_downloads (cognitive 26) crates/goose-download-manager/src/lib.rs:21 — goose_download_manager::cleanup_partial_downloads has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (7 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 · LocalInferenceProvider · ×1
  • LocalInferenceProvider::stream (cognitive 26) crates/goose-local-inference/src/lib.rs:775 — LocalInferenceProvider::stream has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 4 (9 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Conversation · ×1
  • Conversation::push (cognitive 26) crates/goose-provider-types/src/conversation.rs:50 — Conversation::push has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 9, match/switch 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 · ProviderStream · ×1
  • ProviderStream::next_chunk (cognitive 26) crates/goose-sdk/src/bindings.rs:1548 — ProviderStream::next_chunk has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (9 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 · reporter.cmd_compare (cognitive 26) · ×1
  • reporter.cmd_compare (cognitive 26) evals/harbor/reporter.py:494 — reporter.cmd_compare has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (7 pts), boolean chains 5 (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 · DiagnosticsSession._json_virtual_files (cognitive 26) · ×1
  • DiagnosticsSession._json_virtual_files (cognitive 26) scripts/diagnostics-viewer.py:233 — DiagnosticsSession._json_virtual_files has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (10 pts), loops 4 (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 · index.verifyOidcToken (cognitive 26) · ×1
  • index.verifyOidcToken (cognitive 26) oidc-proxy/src/index.js:182 — index.verifyOidcToken has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, ternaries 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 · DirSwitcher.DirSwitcher (cognitive 26) · ×1
  • DirSwitcher.DirSwitcher (cognitive 26) ui/desktop/src/components/bottom_menu/DirSwitcher.tsx:87 — DirSwitcher.DirSwitcher has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 9, error handling 1 (2 pts), ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 10 function items inside it that branch (applyDirectoryChange, a function literal at line 240, handleDirectoryChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · useDisplayMode.useDisplayMode (cognitive 26) · ×1
  • useDisplayMode.useDisplayMode (cognitive 26) ui/desktop/src/components/McpApps/useDisplayMode.ts:47 — useDisplayMode.useDisplayMode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 158, 134, 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 · App.AppInner (cognitive 26) · ×1
  • App.AppInner (cognitive 26) ui/desktop/src/App.tsx:331 — App.AppInner has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13, boolean chains 7, error handling 2 (3 pts), ternaries 2, loops 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 457, 340, 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 · RemainingToolCallsOperation · ×1
  • RemainingToolCallsOperation::run (cognitive 25) crates/goose/src/agents/state_machine/ops_remaining_tool_calls.rs:81 — RemainingToolCallsOperation::run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (9 pts), boolean chains 2, 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 · BedrockProvider · ×1
  • BedrockProvider::stream (cognitive 25) crates/goose/src/providers/bedrock.rs:965 — BedrockProvider::stream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), match/switch 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 · DocsIndex.addDocument (cognitive 25) · ×1
  • DocsIndex.addDocument (cognitive 25) services/ask-ai-bot/utils/ai/tools/docs.ts:54 — DocsIndex.addDocument has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 4 (6 pts), boolean chains 3, 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 · HuggingFaceModelSearch.HuggingFaceModelSearch (cognitive 25) · ×1
  • HuggingFaceModelSearch.HuggingFaceModelSearch (cognitive 25) ui/desktop/src/components/settings/localInference/HuggingFaceModelSearch.tsx:105 — HuggingFaceModelSearch.HuggingFaceModelSearch has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 6, error handling 4 (5 pts), loops 1 (nesting depth added 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 · interruptionDetector.detectInterruption (cognitive 25) · ×1
  • interruptionDetector.detectInterruption (cognitive 25) ui/desktop/src/utils/interruptionDetector.ts:56 — interruptionDetector.detectInterruption has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (11 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppSettingsSection.AppSettingsSection (cognitive 25) · ×1
  • AppSettingsSection.AppSettingsSection (cognitive 25) ui/desktop/src/components/settings/app/AppSettingsSection.tsx:181 — AppSettingsSection.AppSettingsSection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10, error handling 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (handleMenuBarIconToggle, handleDockIconToggle, handleLanguageChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · DictationSettings.DictationSettings (cognitive 25) · ×1
  • DictationSettings.DictationSettings (cognitive 25) ui/desktop/src/components/settings/dictation/DictationSettings.tsx:85 — DictationSettings.DictationSettings has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 10, ternaries 1. Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 105, handleSaveKey, handleRemoveKey, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · UserMessage.UserMessage (cognitive 25) · ×1
  • UserMessage.UserMessage (cognitive 25) ui/desktop/src/components/UserMessage.tsx:100 — UserMessage.UserMessage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 168, 209, 226, …). 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 · GitHubUpdater.downloadUpdate (cognitive 25) · ×1
  • GitHubUpdater.downloadUpdate (cognitive 25) ui/desktop/src/utils/githubUpdater.ts:632 — GitHubUpdater.downloadUpdate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (5 pts), boolean chains 2, error handling 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 · renderContentBlock (cognitive 25) · ×1
  • renderContentBlock (cognitive 25) crates/goose/src/session/export_html/template.js:359 — renderContentBlock has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (10 pts), ternaries 1 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ShellTool · ×1
  • ShellTool::shell_with_cwd_and_emitter (cognitive 24) crates/goose/src/agents/platform_extensions/developer/shell.rs:247 — ShellTool::shell_with_cwd_and_emitter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 4 (6 pts), boolean chains 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 · ToolApprovalOperation · ×1
  • ToolApprovalOperation::run (cognitive 24) crates/goose/src/agents/state_machine/ops_tool_approval.rs:43 — ToolApprovalOperation::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (5 pts), match/switch 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 · MappingReport · ×1
  • MappingReport::compare_with_previous (cognitive 24) crates/goose/src/bin/build_canonical_models.rs:204 — MappingReport::compare_with_previous has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (10 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). 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 · ProviderInventoryService · ×1
  • ProviderInventoryService::refresh_with_provider (cognitive 24) crates/goose/src/providers/inventory/mod.rs:603 — ProviderInventoryService::refresh_with_provider has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (11 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 · OllamaInterpreter · ×1
  • OllamaInterpreter::process_interpreter_response (cognitive 24) crates/goose/src/providers/toolshim.rs:1059 — OllamaInterpreter::process_interpreter_response has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (5 pts), boolean chains 3 (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 · ErrorProxy.detect_provider (cognitive 24) · ×1
  • ErrorProxy.detect_provider (cognitive 24) scripts/provider-error-proxy/proxy.py:367 — ErrorProxy.detect_provider has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 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 · index.RecipePage (cognitive 24) · ×1
  • index.RecipePage (cognitive 24) documentation/src/pages/recipes/index.tsx:12 — index.RecipePage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (18 pts), if/else 3, boolean chains 2, error handling 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 9 belong to 7 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 · AcpReadinessPanel.AcpReadinessPanel (cognitive 24) · ×1
  • AcpReadinessPanel.AcpReadinessPanel (cognitive 24) ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:64 — AcpReadinessPanel.AcpReadinessPanel has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (6 pts), ternaries 4 (6 pts), error handling 2 (nesting depth added 4). Of this number, 16 points are the body's own statements and 8 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 · CostTracker.CostTracker (cognitive 24) · ×1
  • CostTracker.CostTracker (cognitive 24) ui/desktop/src/components/bottom_menu/CostTracker.tsx:33 — CostTracker.CostTracker has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (getTooltipContent, a function literal at line 64, getUnavailableTooltip). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ConfigSettings.ConfigSettings (cognitive 24) · ×1
  • ConfigSettings.ConfigSettings (cognitive 24) ui/desktop/src/components/settings/config/ConfigSettings.tsx:90 — ConfigSettings.ConfigSettings has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 4 (5 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 189, a function literal at line 253, 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.
D2 · Cognitive Complexity · cronSchedule.parseCron (cognitive 24) · ×1
  • cronSchedule.parseCron (cognitive 24) ui/desktop/src/utils/cronSchedule.ts:93 — cronSchedule.parseCron has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (21 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 · ProviderGrid.ProviderCards (cognitive 24) · ×1
  • ProviderGrid.ProviderCards (cognitive 24) ui/desktop/src/components/settings/providers/ProviderGrid.tsx:95 — ProviderGrid.ProviderCards has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 7, if/else 5 (6 pts), error handling 1 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 132, 233, 162, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · KimiCodeProvider · ×1
  • KimiCodeProvider::use_or_refresh (cognitive 23) crates/goose/src/providers/kimicode.rs:253 — KimiCodeProvider::use_or_refresh has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 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 · SecurityManager · ×1
  • SecurityManager::analyze_tool_requests (cognitive 23) crates/goose/src/security/mod.rs:95 — SecurityManager::analyze_tool_requests has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 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 · StateMachine · ×1
  • StateMachine::step (cognitive 23) crates/goose-agent/src/machine.rs:125 — StateMachine::step has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 4 (8 pts), loops 3 (7 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 · SessionViewer.action_copy_file (cognitive 23) · ×1
  • SessionViewer.action_copy_file (cognitive 23) scripts/diagnostics-viewer.py:604 — SessionViewer.action_copy_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 3 (8 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 · gooseServe.startGooseServe (cognitive 23) · ×1
  • gooseServe.startGooseServe (cognitive 23) ui/desktop/src/gooseServe.ts:326 — gooseServe.startGooseServe has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7 (8 pts), boolean chains 2, error handling 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · messages.applyContentChunk (cognitive 23) · ×1
  • messages.applyContentChunk (cognitive 23) ui/desktop/src/acp/adapter/messages.ts:17 — messages.applyContentChunk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (6 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 · ExtensionInstallModal.ExtensionInstallModal (cognitive 23) · ×1
  • ExtensionInstallModal.ExtensionInstallModal (cognitive 23) ui/desktop/src/components/ExtensionInstallModal.tsx:157 — ExtensionInstallModal.ExtensionInstallModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7, ternaries 5 (7 pts), boolean chains 3, error handling 3, match/switch 3 (nesting depth added 2). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 273, determineModalType, generateModalConfig, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · Hub.Hub (cognitive 23) · ×1
  • Hub.Hub (cognitive 23) ui/desktop/src/components/Hub.tsx:53 — Hub.Hub has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 5, boolean chains 3, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 91, createHubSession, 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 · InlineEditText.InlineEditText (cognitive 23) · ×1
  • InlineEditText.InlineEditText (cognitive 23) ui/desktop/src/components/common/InlineEditText.tsx:39 — InlineEditText.InlineEditText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 87, 122, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ExtensionsSection.ExtensionsSection (cognitive 23) · ×1
  • ExtensionsSection.ExtensionsSection (cognitive 23) ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:53 — ExtensionsSection.ExtensionsSection has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 8, error handling 3, ternaries 2. Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 84, handleUpdateExtension, a function literal at line 80, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · LiveVoiceInteraction · ×1
  • LiveVoiceInteraction::run (cognitive 22) crates/goose/src/live_voice/interaction.rs:84 — LiveVoiceInteraction::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (5 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 · REDACTED.processDatasets (cognitive 22) · ×1
  • REDACTED.processDatasets (cognitive 22) REDACTED:219 — REDACTED.processDatasets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (22 pts) (nesting depth added 8). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 220). 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 · detail.RecipeDetailPage (cognitive 22) · ×1
  • detail.RecipeDetailPage (cognitive 22) documentation/src/pages/recipes/detail.tsx:20 — detail.RecipeDetailPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 6, ternaries 2, error handling 1. Of this number, 16 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · SearchBar.SearchBar (cognitive 22) · ×1
  • SearchBar.SearchBar (cognitive 22) ui/desktop/src/components/conversation/SearchBar.tsx:62 — SearchBar.SearchBar has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (handleKeyDown, a function literal at line 100, handleSearch, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ToolCallWithResponse.ToolCallView (cognitive 22) · ×1
  • ToolCallWithResponse.ToolCallView (cognitive 22) ui/desktop/src/components/ToolCallWithResponse.tsx:501 — ToolCallWithResponse.ToolCallView has cognitive complexity 22 (threshold 15). Drivers by points: if/else 32 (59 pts), boolean chains 25, ternaries 8 (12 pts), match/switch 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. This shape REPEATS in the file: one other method here (ToolCallWithResponse.ToolCallView::getToolDescription) 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 · messageRowContext.deriveMessageRowContexts (cognitive 22) · ×1
  • messageRowContext.deriveMessageRowContexts (cognitive 22) ui/desktop/src/components/messageRowContext.ts:65 — messageRowContext.deriveMessageRowContexts has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. 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 · ToolPairCompactionOperation · ×1
  • ToolPairCompactionOperation::run (cognitive 21) crates/goose/src/agents/state_machine/ops_tool_pair_compaction.rs:65 — ToolPairCompactionOperation::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 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 · reporter.cmd_show (cognitive 21) · ×1
  • reporter.cmd_show (cognitive 21) evals/harbor/reporter.py:316 — reporter.cmd_show has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (8 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 · prepare_aggregate_metrics.check_for_errors_in_session (cognitive 21) · ×1
  • prepare_aggregate_metrics.check_for_errors_in_session (cognitive 21) scripts/bench-postprocess-scripts/prepare_aggregate_metrics.py:46 — prepare_aggregate_metrics.check_for_errors_in_session has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), boolean chains 3, error handling 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 · REDACTED.renderRadar (cognitive 21) · ×1
  • REDACTED.renderRadar (cognitive 21) REDACTED:65 — REDACTED.renderRadar has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 18, ternaries 2, if/else 1. Of this number, 12 points are the body's own statements and 9 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 · ContentCard.ContentCard (cognitive 21) · ×1
  • ContentCard.ContentCard (cognitive 21) documentation/src/components/ContentCard.tsx:126 — ContentCard.ContentCard has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 9 (10 pts), if/else 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 5 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 · recipes.normalizeRecipe (cognitive 21) · ×1
  • recipes.normalizeRecipe (cognitive 21) documentation/src/utils/recipes.ts:36 — recipes.normalizeRecipe has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (5 pts), if/else 2 (4 pts), loops 1 (2 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a 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 · PermissionModal.PermissionModal (cognitive 21) · ×1
  • PermissionModal.PermissionModal (cognitive 21) ui/desktop/src/components/settings/permission/PermissionModal.tsx:75 — PermissionModal.PermissionModal has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 5, if/else 3, error handling 2 (nesting depth added 6). Of this number, 13 points are the body's own statements and 8 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 · SessionActionsHeader.JsonTreeNode (cognitive 21) · ×1
  • SessionActionsHeader.JsonTreeNode (cognitive 21) ui/desktop/src/components/SessionActionsHeader.tsx:245 — SessionActionsHeader.JsonTreeNode has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 6, if/else 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnvVarsSection.EnvVarsSection (cognitive 21) · ×1
  • EnvVarsSection.EnvVarsSection (cognitive 21) ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:51 — EnvVarsSection.EnvVarsSection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, ternaries 4, if/else 3. Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 144, a function literal at line 69, handleAdd, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · allowlistFetcher.fetchAllowlistContent (cognitive 21) · ×1
  • allowlistFetcher.fetchAllowlistContent (cognitive 21) ui/desktop/src/allowlistFetcher.ts:31 — allowlistFetcher.fetchAllowlistContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 21 points belong to 5 function literals inside it that branch (lines 78, 56, 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.
D2 · Cognitive Complexity · GooseDesktopInstaller.GooseDesktopInstaller (cognitive 20) · ×1
  • GooseDesktopInstaller.GooseDesktopInstaller (cognitive 20) documentation/src/components/GooseDesktopInstaller.tsx:27 — GooseDesktopInstaller.GooseDesktopInstaller has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 6, boolean chains 4 (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 2 function items inside it that branch (getStep3Content, buildGooseUrl). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useAudioRecorder.useAudioRecorder.startRecording (cognitive 20) · ×1
  • useAudioRecorder.useAudioRecorder.startRecording (cognitive 20) ui/desktop/src/hooks/useAudioRecorder.ts:278 — useAudioRecorder.useAudioRecorder.startRecording has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, 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 · MentionPopover.fuzzyMatch (cognitive 20) · ×1
  • MentionPopover.fuzzyMatch (cognitive 20) ui/desktop/src/components/MentionPopover.tsx:99 — MentionPopover.fuzzyMatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 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 · MicrophoneSelector.MicrophoneSelector (cognitive 20) · ×1
  • MicrophoneSelector.MicrophoneSelector (cognitive 20) ui/desktop/src/components/settings/dictation/MicrophoneSelector.tsx:63 — MicrophoneSelector.MicrophoneSelector has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 3, ternaries 3, loops 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (startTest, selectedLabel, a function literal at line 106, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · SubRecipeModal.SubRecipeModal (cognitive 20) · ×1
  • SubRecipeModal.SubRecipeModal (cognitive 20) ui/desktop/src/components/recipes/shared/SubRecipeModal.tsx:104 — SubRecipeModal.SubRecipeModal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 119, handleSave, handleBrowseFile). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · StandaloneAppView.StandaloneAppView (cognitive 20) · ×1
  • StandaloneAppView.StandaloneAppView (cognitive 20) ui/desktop/src/components/apps/StandaloneAppView.tsx:25 — StandaloneAppView.StandaloneAppView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 70, 39, 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 · main.parseRecipeDeeplink (cognitive 20) · ×1
  • main.parseRecipeDeeplink (cognitive 20) ui/desktop/src/main.ts:1787 — main.parseRecipeDeeplink has cognitive complexity 20 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 4 (6 pts), boolean chains 4, 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 · RecipeOperation · ×1
  • RecipeOperation::run (cognitive 19) crates/goose/src/agents/state_machine/ops_recipe.rs:248 — RecipeOperation::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (5 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 · XaiOAuthAuthProvider · ×1
  • XaiOAuthAuthProvider::get_valid_token (cognitive 19) crates/goose/src/providers/xai_oauth.rs:632 — XaiOAuthAuthProvider::get_valid_token has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 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 · LlamaCppBackend · ×1
  • LlamaCppBackend::generate (cognitive 19) crates/goose-local-inference/src/llamacpp/mod.rs:463 — LlamaCppBackend::generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 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 · proxy.parse_command (cognitive 19) · ×1
  • proxy.parse_command (cognitive 19) scripts/provider-error-proxy/proxy.py:624 — proxy.parse_command has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, 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 · release_risk_report.assess_risk (cognitive 19) · ×1
  • release_risk_report.assess_risk (cognitive 19) workflow_recipes/release_risk_check/release_risk_report.py:117 — release_risk_report.assess_risk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 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 · release_risk_report.extract_testing_section (cognitive 19) · ×1
  • release_risk_report.extract_testing_section (cognitive 19) workflow_recipes/release_risk_check/release_risk_report.py:202 — release_risk_report.extract_testing_section has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 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 · template.tocLabel (cognitive 19) · ×1
  • template.tocLabel (cognitive 19) crates/goose/src/session/export_html/template.js:436 — template.tocLabel has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.signature (cognitive 19) · ×1
  • index.signature (cognitive 19) documentation/src/components/GdkApiReference/index.tsx:131 — index.signature has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 2, match/switch 1 (nesting depth added 5). 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.getLocale (cognitive 19) · ×1
  • index.getLocale (cognitive 19) ui/desktop/src/i18n/index.ts:45 — index.getLocale has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, error handling 1 (3 pts), 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 · ProviderCatalogPicker.ProviderCatalogPicker (cognitive 19) · ×1
  • ProviderCatalogPicker.ProviderCatalogPicker (cognitive 19) ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderCatalogPicker.tsx:67 — ProviderCatalogPicker.ProviderCatalogPicker has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function items inside it that branch (fetchProviders, handleProviderSelect, a function literal at line 87, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ShortcutRecorder.ShortcutRecorder · ×1
  • ShortcutRecorder.ShortcutRecorder::handleKeyDown (cognitive 19) ui/desktop/src/components/settings/keyboard/ShortcutRecorder.tsx:65 — ShortcutRecorder.ShortcutRecorder::handleKeyDown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ShortcutRecorder.ShortcutRecorder) 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 · DesktopFileAccess.writeGoosehints (cognitive 19) · ×1
  • DesktopFileAccess.writeGoosehints (cognitive 19) ui/desktop/src/desktopFileAccess.ts:179 — DesktopFileAccess.writeGoosehints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 2, 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 · RetryOperation · ×1
  • RetryOperation::run_command (cognitive 18) crates/goose/src/agents/state_machine/ops_retry.rs:81 — RetryOperation::run_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 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 · SubdirectoryHintTracker · ×1
  • SubdirectoryHintTracker::record_tool_arguments (cognitive 18) crates/goose/src/hints/load_hints.rs:42 — SubdirectoryHintTracker::record_tool_arguments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler · ×1
  • Scheduler::load_jobs_from_storage (cognitive 18) crates/goose/src/scheduler/full.rs:408 — Scheduler::load_jobs_from_storage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 5 (8 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 · goose_context_management · ×1
  • goose_context_management::format::format_message_for_compacting (cognitive 18) crates/goose-context-management/src/format.rs:4 — goose_context_management::format::format_message_for_compacting has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (6 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 · gdk-release.check_config (cognitive 18) · ×1
  • gdk-release.check_config (cognitive 18) crates/goose-sdk/scripts/gdk-release.py:64 — gdk-release.check_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 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 · community_stars.parse_date_range (cognitive 18) · ×1
  • community_stars.parse_date_range (cognitive 18) documentation/scripts/community_stars.py:141 — community_stars.parse_date_range has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 1 (4 pts), loops 1 (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 · release_risk_report.main (cognitive 18) · ×1
  • release_risk_report.main (cognitive 18) workflow_recipes/release_risk_check/release_risk_report.py:347 — release_risk_report.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 1 (2 pts), 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, 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 · codebase-search.walkAndSearch (cognitive 18) · ×1
  • codebase-search.walkAndSearch (cognitive 18) REDACTED:107 — codebase-search.walkAndSearch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 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 · tools.apiContentBlockFromAcpContentBlock (cognitive 18) · ×1
  • tools.apiContentBlockFromAcpContentBlock (cognitive 18) ui/desktop/src/acp/adapter/tools.ts:272 — tools.apiContentBlockFromAcpContentBlock has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · chatSessionController.submitMessage (cognitive 18) · ×1
  • chatSessionController.submitMessage (cognitive 18) ui/desktop/src/acp/chatSessionController.ts:175 — chatSessionController.submitMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 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 · SwitchModelModal.SwitchModelModal (cognitive 18) · ×1
  • SwitchModelModal.SwitchModelModal (cognitive 18) ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:252 — SwitchModelModal.SwitchModelModal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 50 (63 pts), boolean chains 37, ternaries 4 (5 pts), error handling 3 (nesting depth added 14). 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 (SwitchModelModal.SwitchModelModal::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 · ExternalBackendSection.ExternalBackendSection (cognitive 18) · ×1
  • ExternalBackendSection.ExternalBackendSection (cognitive 18) ui/desktop/src/components/settings/app/ExternalBackendSection.tsx:98 — ExternalBackendSection.ExternalBackendSection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts) (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 (validateUrl, saveConfig, handleUrlBlur, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ScheduleModal.ScheduleModal (cognitive 18) · ×1
  • ScheduleModal.ScheduleModal (cognitive 18) ui/desktop/src/components/schedule/ScheduleModal.tsx:118 — ScheduleModal.ScheduleModal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 35 (59 pts), boolean chains 16, ternaries 7 (12 pts), error handling 2 (5 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. This shape REPEATS in the file: one other method here (ScheduleModal.ScheduleModal::handleBrowseFile) 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 · MuseCodeAuth · ×1
  • MuseCodeAuth::use_or_refresh (cognitive 17) crates/goose/src/providers/muse_code_def.rs:428 — MuseCodeAuth::use_or_refresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XlsxTool · ×1
  • XlsxTool::find_in_worksheet (cognitive 17) crates/goose-mcp/src/computercontroller/xlsx_tool.rs:164 — XlsxTool::find_in_worksheet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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 · template.renderResultContent (cognitive 17) · ×1
  • template.renderResultContent (cognitive 17) crates/goose/src/session/export_html/template.js:234 — template.renderResultContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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 · index.HomePage (cognitive 17) · ×1
  • index.HomePage (cognitive 17) documentation/src/pages/extensions/index.tsx:10 — index.HomePage has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 3, error handling 1 (nesting depth added 5). 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 · index.html.initializeTheme (cognitive 17) · ×1
  • index.html.initializeTheme (cognitive 17) ui/desktop/index.html:13 — index.html.initializeTheme has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 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 · deeplink.addExtensionFromDeepLink (cognitive 17) · ×1
  • deeplink.addExtensionFromDeepLink (cognitive 17) ui/desktop/src/components/settings/extensions/deeplink.ts:93 — deeplink.addExtensionFromDeepLink has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 5, if/else 3 (4 pts), loops 1 (nesting depth added 1). 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: 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 · utils.createExtensionConfig (cognitive 17) · ×1
  • utils.createExtensionConfig (cognitive 17) ui/desktop/src/components/settings/extensions/utils.ts:145 — utils.createExtensionConfig has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 3, if/else 2 (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShortcutRecorder.ShortcutRecorder (cognitive 17) · ×1
  • ShortcutRecorder.ShortcutRecorder (cognitive 17) ui/desktop/src/components/settings/keyboard/ShortcutRecorder.tsx:39 — ShortcutRecorder.ShortcutRecorder has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 13 (14 pts), boolean chains 9 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ShortcutRecorder.ShortcutRecorder::handleKeyDown) 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 · ToolCallWithResponse.getSubagentSessionId (cognitive 17) · ×1
  • ToolCallWithResponse.getSubagentSessionId (cognitive 17) ui/desktop/src/components/ToolCallWithResponse.tsx:116 — ToolCallWithResponse.getSubagentSessionId has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, loops 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 · RecipeExtensionSelector.RecipeExtensionSelector (cognitive 17) · ×1
  • RecipeExtensionSelector.RecipeExtensionSelector (cognitive 17) ui/desktop/src/components/recipes/shared/RecipeExtensionSelector.tsx:158 — RecipeExtensionSelector.RecipeExtensionSelector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 203, handleToggle, a function literal at line 195, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · renderToolHeader (cognitive 17) · ×1
  • renderToolHeader (cognitive 17) crates/goose/src/session/export_html/template.js:201 — renderToolHeader has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 3 (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.
D2 · Cognitive Complexity · Extension · ×1
  • Extension::fetch_public_tools (cognitive 16) crates/goose/src/agents/extension_manager/mod.rs:300 — Extension::fetch_public_tools has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompactionOperation · ×1
  • CompactionOperation::run (cognitive 16) crates/goose/src/agents/state_machine/ops_compaction.rs:193 — CompactionOperation::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GooseApp · ×1
  • GooseApp::to_html (cognitive 16) crates/goose/src/goose_apps/app.rs:128 — GooseApp::to_html has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 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 · CliProcess · ×1
  • CliProcess::drain_pending_response (cognitive 16) crates/goose/src/providers/claude_code.rs:200 — CliProcess::drain_pending_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (6 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 · SessionManager · ×1
  • SessionManager::apply_effects (cognitive 16) crates/goose/src/agents/state_machine/session.rs:53 — SessionManager::apply_effects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (4 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 · MemoryServer · ×1
  • MemoryServer::retrieve_all (cognitive 16) crates/goose-mcp/src/memory/mod.rs:217 — MemoryServer::retrieve_all has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ErrorProxy.handle_request (cognitive 16) · ×1
  • ErrorProxy.handle_request (cognitive 16) scripts/provider-error-proxy/proxy.py:510 — ErrorProxy.handle_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (3 pts), 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, 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 · GooseBinaryAgent._compute_cost_from_pricing (cognitive 16) · ×1
  • GooseBinaryAgent._compute_cost_from_pricing (cognitive 16) evals/harbor/agent.py:261 — GooseBinaryAgent._compute_cost_from_pricing has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (4 pts), error handling 1, 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 · languages.mapType (cognitive 16) · ×1
  • languages.mapType (cognitive 16) REDACTED:70 — languages.mapType has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6, 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 · message-content.messageContent (cognitive 16) · ×1
  • message-content.messageContent (cognitive 16) services/ask-ai-bot/utils/discord/message-content.ts:6 — message-content.messageContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 1 (3 pts), ternaries 1 (3 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 · utils.extensionToFormData (cognitive 16) · ×1
  • utils.extensionToFormData (cognitive 16) ui/desktop/src/components/settings/extensions/utils.ts:63 — utils.extensionToFormData has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 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 · ModelAndProviderContext.ModelAndProviderProvider (cognitive 16) · ×1
  • ModelAndProviderContext.ModelAndProviderProvider (cognitive 16) ui/desktop/src/components/ModelAndProviderContext.tsx:87 — ModelAndProviderContext.ModelAndProviderProvider has cognitive complexity 16 (threshold 15). Drivers by points: error handling 7 (8 pts), if/else 6, boolean chains 2 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 7 function literals inside it that branch (lines 93, 145, 158, …). 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 · CustomProviderForm.CustomProviderForm · ×1
  • CustomProviderForm.CustomProviderForm::handleSubmit (cognitive 16) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:447 — CustomProviderForm.CustomProviderForm::handleSubmit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, 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. This shape REPEATS in the file: one other method here (CustomProviderForm.CustomProviderForm) 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 · SwitchModelModal.SwitchModelModal · ×1
  • SwitchModelModal.SwitchModelModal::handleSubmit (cognitive 16) ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:395 — SwitchModelModal.SwitchModelModal::handleSubmit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5 (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 (SwitchModelModal.SwitchModelModal) 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 · ExtensionMenu.ExtensionMenu (cognitive 16) · ×1
  • ExtensionMenu.ExtensionMenu (cognitive 16) ui/desktop/src/components/bottom_menu/ExtensionMenu.tsx:24 — ExtensionMenu.ExtensionMenu has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 5, if/else 2 (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 5 function literals inside it that branch (lines 52, 42, 111, …). 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 · SchedulesView.SchedulesView · ×1
  • SchedulesView.SchedulesView::handleModalSubmit (cognitive 16) ui/desktop/src/components/schedule/SchedulesView.tsx:300 — SchedulesView.SchedulesView::handleModalSubmit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (7 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 · (anonymous).init (cognitive 16) · ×1
  • (anonymous).init (cognitive 16) REDACTED:149 — (anonymous).init has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 161, 200, 205). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: goose::providers::huggingface_auth crates/goose/src/providers/huggingface_auth.rs:51 — TooManyFunctions — 38 free functions. The bar is 30 free functions; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: claude_acp.rs, codex_acp.rs, pi_acp.rs crates/goose/src/providers/claude_acp.rs — 3 files — `crates/goose/src/providers/claude_acp.rs`, `crates/goose/src/providers/codex_acp.rs`, `crates/goose/src/providers/pi_acp.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 11 shared lines) · ×1
  • Near-duplicate member family (4 members, 11 shared lines) crates/goose/src/providers/chatgpt_codex.rs:682 — crates/goose/src/providers/chatgpt_codex.rs:682-723 | crates/goose/src/providers/gemini_oauth.rs:592-633 | crates/goose/src/providers/huggingface_auth.rs:461-502 | crates/goose/src/providers/xai_oauth.rs:462-503 — These 4 members are variants of one another: a block of 11 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 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 · Near-duplicate member pair (27 shared lines) · ×1
  • Near-duplicate member pair (27 shared lines) crates/goose-providers/src/openai.rs:843 — crates/goose-providers/src/openai.rs:843-932 | crates/goose-providers/src/openai_compatible.rs:109-154 — These two members are variants of one another: 27 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 (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/goose-providers/src/anthropic.rs:511 — crates/goose-providers/src/anthropic.rs:511-595 | crates/goose-providers/src/ollama.rs:354-438 | crates/goose-providers/src/openai.rs:957-1038 | crates/goose/src/providers/huggingface.rs:81-138 | crates/goose/src/providers/ollama_cloud.rs:113-160 | crates/goose/src/providers/openai_def.rs:55-160 — 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 · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) crates/goose/src/config/signup_openrouter/server.rs:49 — crates/goose/src/config/signup_openrouter/server.rs:49-86 | crates/goose/src/config/signup_tetrate/server.rs:46-83 — 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 (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) crates/goose-agent/src/skills/discovery.rs:61 — crates/goose-agent/src/skills/discovery.rs:61-96 | crates/goose/src/skills/mod.rs:398-433 — 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) crates/goose-cli/src/session/output.rs:904 — crates/goose-cli/src/session/output.rs:904-937 | crates/goose-cli/src/session/output.rs:1074-1107 — both copies are in the same file, so extract the 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 (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) crates/goose-agent/src/skills/arguments.rs:6 — crates/goose-agent/src/skills/arguments.rs:6-35 | crates/goose/src/utils.rs:70-99 — 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 (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) crates/goose-providers/src/anthropic.rs:398 — crates/goose-providers/src/anthropic.rs:398-423 | crates/goose-providers/src/ollama.rs:540-566 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–26 lines × 2) · ×1
  • Duplicated block (22–26 lines × 2) crates/goose-cli/src/commands/configure.rs:2024 — crates/goose-cli/src/commands/configure.rs:2024-2049 | crates/goose-cli/src/commands/configure.rs:2097-2118 — both copies are in the same file, so extract the 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 (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) crates/goose/src/providers/codex.rs:228 — crates/goose/src/providers/codex.rs:228-253 | crates/goose/src/providers/cursor_agent.rs:319-344 — 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) crates/goose-local-inference/src/paths.rs:9 — crates/goose-local-inference/src/paths.rs:9-32 | crates/goose/src/config/paths.rs:9-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) crates/goose/src/providers/gemini_oauth.rs:243 — crates/goose/src/providers/gemini_oauth.rs:243-265 | crates/goose/src/providers/gemini_oauth.rs:273-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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) crates/goose-providers/src/openai.rs:1001 — crates/goose-providers/src/openai.rs:1001-1021 | crates/goose/src/providers/ollama_cloud.rs:127-148 — before extracting anything, compare `crates/goose-providers/src/openai.rs` and `crates/goose/src/providers/ollama_cloud.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) crates/goose/src/plugins/formats/gemini.rs:131 — crates/goose/src/plugins/formats/gemini.rs:131-152 | crates/goose/src/plugins/formats/open_plugins.rs:441-462 — 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 (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) crates/goose/src/agents/state_machine/ops_compaction.rs:89 — crates/goose/src/agents/state_machine/ops_compaction.rs:89-108 | crates/goose/src/agents/state_machine/ops_recipe.rs:119-138 | crates/goose/src/agents/state_machine/ops_skills.rs:231-250 | crates/goose/src/agents/state_machine/ops_toolcalling.rs:481-500 — before extracting anything, compare `crates/goose/src/agents/state_machine/ops_recipe.rs` and `crates/goose/src/agents/state_machine/ops_skills.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) crates/goose-provider-types/src/formats/openai_responses.rs:1150 — crates/goose-provider-types/src/formats/openai_responses.rs:1150-1169 | crates/goose-provider-types/src/formats/openai_responses.rs:1244-1261 — both copies are in the same file, so extract the 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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) crates/goose/src/providers/chatgpt_codex.rs:540 — crates/goose/src/providers/chatgpt_codex.rs:540-558 | crates/goose/src/providers/chatgpt_codex.rs:569-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) crates/goose/src/session/export_markdown.rs:51 — crates/goose/src/session/export_markdown.rs:51-69 | crates/goose/src/session/export_markdown.rs:85-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.
D4 · Code Duplication · Duplicated block (17–18 lines × 3) · ×1
  • Duplicated block (17–18 lines × 3) crates/goose-cli/src/commands/review/handler.rs:904 — crates/goose-cli/src/commands/review/handler.rs:904-921 | crates/goose/src/gateway/telegram.rs:514-530 | crates/goose/src/skills/supporting_files.rs:669-686 — before extracting anything, compare `crates/goose-cli/src/commands/review/handler.rs` and `crates/goose/src/skills/supporting_files.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) crates/goose-provider-types/src/formats/databricks.rs:348 — crates/goose-provider-types/src/formats/databricks.rs:348-365 | crates/goose-provider-types/src/formats/openai.rs:700-713 — before extracting anything, compare `crates/goose-provider-types/src/formats/databricks.rs` and `crates/goose-provider-types/src/formats/openai.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) crates/goose/src/agents/extension_manager/streamable_http.rs:87 — crates/goose/src/agents/extension_manager/streamable_http.rs:87-104 | crates/goose/src/agents/extension_manager/streamable_http.rs:119-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) crates/goose-cli/src/cli.rs:1950 — crates/goose-cli/src/cli.rs:1950-1966 | crates/goose-cli/src/cli.rs:1974-1989 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) crates/goose-roaming/src/peerbook.rs:119 — crates/goose-roaming/src/peerbook.rs:119-134 | crates/goose-roaming/src/trust.rs:102-116 — 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 (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) crates/goose-providers/src/anthropic.rs:526 — crates/goose-providers/src/anthropic.rs:526-540 | crates/goose-providers/src/ollama.rs:390-404 | crates/goose-providers/src/openai.rs:972-986 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–15 lines × 2) · ×1
  • Duplicated block (10–15 lines × 2) crates/goose/src/config/base.rs:623 — crates/goose/src/config/base.rs:623-632 | crates/goose/src/providers/private_file.rs:213-227 — 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 (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) crates/goose-cli/src/commands/review/handler.rs:370 — crates/goose-cli/src/commands/review/handler.rs:370-383 | crates/goose-cli/src/commands/review/handler.rs:401-414 | crates/goose-cli/src/commands/review/handler.rs:425-438 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) crates/goose-cli/src/session/output.rs:313 — crates/goose-cli/src/session/output.rs:313-324 | crates/goose-cli/src/session/output.rs:407-420 — both copies are in the same file, so extract the 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) crates/goose-providers/src/anthropic.rs:512 — crates/goose-providers/src/anthropic.rs:512-524 | crates/goose-providers/src/ollama.rs:355-367 | crates/goose-providers/src/openai.rs:958-970 | crates/goose/src/providers/ollama_cloud.rs:45-57 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) crates/goose-providers/src/databricks_v2.rs:462 — crates/goose-providers/src/databricks_v2.rs:462-473 | crates/goose/src/providers/kimicode.rs:442-454 — 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 (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) REDACTED:2002 — REDACTED:2002-2014 | REDACTED:2015-2023 — both copies are in the same file, so extract the 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–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) crates/goose-cli/src/commands/session.rs:63 — crates/goose-cli/src/commands/session.rs:63-74 | crates/goose-cli/src/commands/session.rs:455-463 — both copies are in the same file, so extract the 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–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) crates/goose-providers/src/openai.rs:894 — crates/goose-providers/src/openai.rs:894-904 | crates/goose-providers/src/openai_compatible.rs:121-132 — before extracting anything, compare `crates/goose-providers/src/openai.rs` and `crates/goose-providers/src/openai_compatible.rs` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) crates/goose/src/providers/chatgpt_codex.rs:713 — crates/goose/src/providers/chatgpt_codex.rs:713-723 | crates/goose/src/providers/gemini_oauth.rs:623-633 | crates/goose/src/providers/huggingface_auth.rs:492-502 | crates/goose/src/providers/xai_oauth.rs:493-503 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) crates/goose-local-inference/src/hf_models.rs:2438 — crates/goose-local-inference/src/hf_models.rs:2438-2448 | crates/goose-local-inference/src/hf_models.rs:2457-2467 | crates/goose-local-inference/src/hf_models.rs:2555-2565 — 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 × 3) · ×1
  • Duplicated block (10–11 lines × 3) crates/goose/src/session/import_formats/claude_code.rs:128 — crates/goose/src/session/import_formats/claude_code.rs:128-138 | crates/goose/src/session/import_formats/codex.rs:245-255 | crates/goose/src/session/import_formats/pi.rs:210-219 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) crates/goose/src/providers/oauth.rs:306 — crates/goose/src/providers/oauth.rs:306-316 | crates/goose/src/providers/oauth.rs:335-344 — both copies are in the same file, so extract the 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 (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) crates/goose-mcp/src/computercontroller/mod.rs:603 — crates/goose-mcp/src/computercontroller/mod.rs:603-612 | crates/goose-mcp/src/computercontroller/mod.rs:631-640 | crates/goose-mcp/src/computercontroller/mod.rs:661-670 | crates/goose-mcp/src/computercontroller/mod.rs:742-751 — 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 (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) crates/goose/src/session/import_formats/claude_code.rs:62 — crates/goose/src/session/import_formats/claude_code.rs:62-71 | crates/goose/src/session/import_formats/codex.rs:69-77 | crates/goose/src/session/import_formats/pi.rs:69-77 — before extracting anything, compare `crates/goose/src/session/import_formats/claude_code.rs` and `crates/goose/src/session/import_formats/pi.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) crates/goose/src/agents/extension_manager/streamable_http.rs:453 — crates/goose/src/agents/extension_manager/streamable_http.rs:453-458 | crates/goose/src/agents/extension_manager/streamable_http.rs:533-540 — both copies are in the same file, so extract the 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 × 6) · ×1
  • Duplicated block (7 lines × 6) crates/goose-providers/src/anthropic.rs:568 — crates/goose-providers/src/anthropic.rs:568-574 | crates/goose-providers/src/ollama.rs:416-422 | crates/goose-providers/src/openai.rs:1021-1027 | crates/goose/src/providers/huggingface.rs:120-126 | crates/goose/src/providers/ollama_cloud.rs:148-154 | crates/goose/src/providers/openai_def.rs:138-144 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/ollama.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) crates/goose-providers/src/anthropic.rs:331 — crates/goose-providers/src/anthropic.rs:331-337 | crates/goose-providers/src/openai.rs:670-676 | crates/goose-providers/src/openai_compatible.rs:208-214 | crates/goose/src/providers/tetrate.rs:216-222 — before extracting anything, compare `crates/goose-providers/src/anthropic.rs` and `crates/goose-providers/src/openai.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/goose-provider-types/src/formats/openai_responses.rs:1180 — crates/goose-provider-types/src/formats/openai_responses.rs:1180-1185 | crates/goose-provider-types/src/formats/openai_responses.rs:1199-1205 — both copies are in the same file, so extract the 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 (5–6 lines × 3) · ×1
  • Duplicated block (5–6 lines × 3) crates/goose/src/providers/chatgpt_codex.rs:785 — crates/goose/src/providers/chatgpt_codex.rs:785-789 | crates/goose/src/providers/huggingface_auth.rs:566-571 | crates/goose/src/providers/xai_oauth.rs:570-575 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/xai_oauth.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) crates/goose-providers/src/ollama.rs:630 — crates/goose-providers/src/ollama.rs:630-634 | crates/goose-providers/src/openai_compatible.rs:263-267 | crates/goose-providers/src/openai_compatible.rs:294-298 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) crates/goose/src/providers/chatgpt_codex.rs:352 — crates/goose/src/providers/chatgpt_codex.rs:352-356 | crates/goose/src/providers/gemini_oauth.rs:175-179 | crates/goose/src/providers/oauth.rs:144-148 | crates/goose/src/providers/xai_oauth.rs:126-130 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) crates/goose/src/providers/chatgpt_codex.rs:494 — crates/goose/src/providers/chatgpt_codex.rs:494-502 | crates/goose/src/providers/gemini_oauth.rs:195-203 | crates/goose/src/providers/huggingface_auth.rs:232-240 | crates/goose/src/providers/xai_oauth.rs:142-150 — before extracting anything, compare `crates/goose/src/providers/chatgpt_codex.rs` and `crates/goose/src/providers/gemini_oauth.rs` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) crates/goose/src/providers/inventory/mod.rs:551 — crates/goose/src/providers/inventory/mod.rs:551-575 | crates/goose/src/providers/inventory/mod.rs:758-782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) crates/goose/src/agents/state_machine/ops_compaction.rs:86 — crates/goose/src/agents/state_machine/ops_compaction.rs:86-93 | crates/goose/src/agents/state_machine/ops_recipe.rs:116-123 | crates/goose/src/agents/state_machine/ops_retry.rs:133-140 | crates/goose/src/agents/state_machine/ops_skills.rs:228-235 | crates/goose/src/agents/state_machine/ops_toolcalling.rs:478-485 — before extracting anything, compare `crates/goose/src/agents/state_machine/ops_recipe.rs` and `crates/goose/src/agents/state_machine/ops_skills.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×1
  • Duplicated block (7–10 lines × 3) documentation/scripts/community_stars.py:374 — documentation/scripts/community_stars.py:374-380 | documentation/scripts/community_stars.py:381-390 | documentation/scripts/community_stars.py:392-401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D5 · Coupling · Unstable project goose (Cargo) · ×1
  • Unstable project goose (Cargo) — goose (Cargo) has instability 0.86 with 1 dependents.
R10 · Code Duplication · Duplication concentrated across 13 sibling directories (46 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (46 clone groups) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111 — 46 duplicated blocks under ui/desktop/src/components/ have copies in at least two of the sibling directories Layout, apps, bottom_menu, common, extensions, onboarding (+7 more sibling(s) not listed) — 16 of them are reported below, and 30 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 46 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 46 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 46 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 (24 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (24 clone groups) ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60 — 24 duplicated blocks under ui/desktop/src/components/settings/ have copies in at least two of the sibling directories app, auth, chat, dictation, extensions, keyboard (+7 more sibling(s) not listed) — 12 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 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 24 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 (128 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (128 matched lines × 2 locations) ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:34 — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:34 · ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx:38 — the two spans are one implementation copied and then locally edited — 826 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 (123 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (123 matched lines × 2 locations) ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:155 — ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:155 · ui/desktop/src/components/recipes/shared/SubRecipeModal.tsx:111 — the two spans are one implementation copied and then locally edited — 723 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 (97 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (97 matched lines × 2 locations) ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:33 — ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx:33 · ui/desktop/src/components/recipes/shared/JsonSchemaEditor.tsx:33 — the two spans are one implementation copied and then locally edited — 478 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 (87 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (87 matched lines × 2 locations) ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 — ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 · ui/desktop/src/components/schedule/SchedulesView.tsx:237 — the two spans are one implementation copied and then locally edited — 579 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 (71 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (71 matched lines × 2 locations) ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60 — ui/desktop/src/components/settings/dictation/LocalModelManager.tsx:60 · ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:152 — the two spans are one implementation copied and then locally edited — 477 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 (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) ui/desktop/src/acp/recipe.ts:9 — ui/desktop/src/acp/recipe.ts:9 · ui/desktop/src/acp/schedules.ts:12 — the two spans are one implementation copied and then locally edited — 349 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 (51 lines × 2 locations) · ×1
  • Duplicated block (51 lines × 2 locations) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111 — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:111 · ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:393 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (42 matched lines × 2 locations) ui/desktop/src/components/settings/security/SecurityToggle.tsx:390 — ui/desktop/src/components/settings/security/SecurityToggle.tsx:390 · ui/desktop/src/components/settings/security/SecurityToggle.tsx:467 — the two spans are one implementation copied and then locally edited — 216 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 (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) ui/desktop/src/components/recipes/RecipesView.tsx:853 — ui/desktop/src/components/recipes/RecipesView.tsx:853 · ui/desktop/src/components/skills/SkillsView.tsx:155 — 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 (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) ui/desktop/src/components/extensions/ExtensionsView.tsx:146 — ui/desktop/src/components/extensions/ExtensionsView.tsx:146 · ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:213 — the two spans are one implementation copied and then locally edited — 186 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 (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) ui/desktop/scripts/generate-mac-update-manifest.js:53 — ui/desktop/scripts/generate-mac-update-manifest.js:53 · ui/desktop/scripts/generate-windows-update-manifest.js:44 — the two spans are one implementation copied and then locally edited — 200 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 (30 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (30 matched lines × 2 locations) ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:178 — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:178 · ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:258 — the two spans are one implementation copied and then locally edited — 202 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 (26 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (26 matched lines × 2 locations) ui/desktop/src/components/conversation/SearchView.tsx:214 — ui/desktop/src/components/conversation/SearchView.tsx:214 · ui/desktop/src/components/conversation/SearchView.tsx:242 — the two spans are one implementation copied and then locally edited — 114 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 (26 lines × 4 locations) · ×1
  • Duplicated block (26 lines × 4 locations) ui/desktop/src/components/icons/CodeXml.tsx:1 — ui/desktop/src/components/icons/CodeXml.tsx:1 · ui/desktop/src/components/icons/Cog.tsx:1 · ui/desktop/src/components/icons/GalleryHorizontalEnd.tsx:1 · ui/desktop/src/components/icons/Grape.tsx:1 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×1
  • Duplicated block (26 lines × 2 locations) ui/desktop/src/components/icons/Fuel.tsx:1 — ui/desktop/src/components/icons/Fuel.tsx:1 · ui/desktop/src/components/icons/Gavel.tsx:1 — 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 (24 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (24 matched lines × 2 locations) ui/desktop/src/components/TelemetryConsentPrompt.tsx:91 — ui/desktop/src/components/TelemetryConsentPrompt.tsx:91 · ui/desktop/src/components/onboarding/OnboardingSuccess.tsx:83 — the two spans are one implementation copied and then locally edited — 148 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:358 — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:358 · ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (21 lines × 3 locations) · ×1
  • Duplicated block (21 lines × 3 locations) ui/desktop/src/components/schedule/SchedulesView.tsx:378 — ui/desktop/src/components/schedule/SchedulesView.tsx:378 · ui/desktop/src/components/schedule/SchedulesView.tsx:406 · ui/desktop/src/components/schedule/SchedulesView.tsx:434 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (21 matched lines × 2 locations) ui/desktop/src/main.ts:584 — ui/desktop/src/main.ts:584 · ui/desktop/src/main.ts:661 — the two spans are one implementation copied and then locally edited — 163 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 (20 lines × 3 locations) · ×1
  • Duplicated block (20 lines × 3 locations) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:669 — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:669 · ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:696 · ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:798 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function ChatInput (cyclomatic 59, cognitive 42) · ×1
  • Complex function ChatInput (cyclomatic 59, cognitive 42) ui/desktop/src/components/ChatInput.tsx:219 — ChatInput has cyclomatic complexity 59 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 (anonymous) (cyclomatic 54, cognitive 65) · ×1
  • Complex function (anonymous) (cyclomatic 54, cognitive 65) ui/desktop/src/components/ToolCallWithResponse.tsx:597 — (anonymous) has cyclomatic complexity 54 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 48, cognitive 74) · ×1
  • Complex function (anonymous) (cyclomatic 48, cognitive 74) ui/desktop/src/main.ts:999 — (anonymous) has cyclomatic complexity 48 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 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 CustomProviderForm (cyclomatic 48, cognitive 44) · ×1
  • Complex function CustomProviderForm (cyclomatic 48, cognitive 44) ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:257 — CustomProviderForm has cyclomatic complexity 48 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 GooseMessage (cyclomatic 47, cognitive 32) · ×1
  • Complex function GooseMessage (cyclomatic 47, cognitive 32) ui/desktop/src/components/GooseMessage.tsx:47 — GooseMessage has cyclomatic complexity 47 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SecurityToggle (cyclomatic 41, cognitive 38) · ×1
  • Complex function SecurityToggle (cyclomatic 41, cognitive 38) ui/desktop/src/components/settings/security/SecurityToggle.tsx:184 — SecurityToggle has cyclomatic complexity 41 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 BaseChat (cyclomatic 41, cognitive 33) · ×1
  • Complex function BaseChat (cyclomatic 41, cognitive 33) ui/desktop/src/components/BaseChat.tsx:74 — BaseChat has cyclomatic complexity 41 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 appMain (cyclomatic 39, cognitive 62) · ×1
  • Complex function appMain (cyclomatic 39, cognitive 62) ui/desktop/src/main.ts:2414 — appMain has cyclomatic complexity 39 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 ProviderConfigurationModal (cyclomatic 36, cognitive 29) · ×1
  • Complex function ProviderConfigurationModal (cyclomatic 36, cognitive 29) ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:179 — ProviderConfigurationModal has cyclomatic complexity 36 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SwitchModelModal (cyclomatic 36, cognitive 27) · ×1
  • Complex function SwitchModelModal (cyclomatic 36, cognitive 27) ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:252 — SwitchModelModal has cyclomatic complexity 36 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 MessageUsageStats (cyclomatic 34, cognitive 29) · ×1
  • Complex function MessageUsageStats (cyclomatic 34, cognitive 29) ui/desktop/src/components/MessageUsageStats.tsx:112 — MessageUsageStats has cyclomatic complexity 34 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function McpAppRenderer (cyclomatic 32, cognitive 25) · ×1
  • Complex function McpAppRenderer (cyclomatic 32, cognitive 25) ui/desktop/src/components/McpApps/McpAppRenderer.tsx:502 — McpAppRenderer has cyclomatic complexity 32 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function LiveVoiceButton (cyclomatic 31, cognitive 28) · ×1
  • Complex function LiveVoiceButton (cyclomatic 31, cognitive 28) ui/desktop/src/components/LiveVoiceButton.tsx:55 — LiveVoiceButton has cyclomatic complexity 31 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 30, cognitive 42) · ×1
  • Complex function (anonymous) (cyclomatic 30, cognitive 42) ui/desktop/src/components/MentionPopover.tsx:194 — (anonymous) has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 30, cognitive 40) · ×1
  • Complex function (anonymous) (cyclomatic 30, cognitive 40) ui/desktop/src/components/ItemIcon.tsx:31 — (anonymous) has cyclomatic complexity 30 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 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 renderContentBlock (cyclomatic 27, cognitive 25) · ×1
  • Complex function renderContentBlock (cyclomatic 27, cognitive 25) crates/goose/src/session/export_html/template.js:359 — renderContentBlock has cyclomatic complexity 27 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function AcpReadinessPanel (cyclomatic 27, cognitive 15) · ×1
  • Complex function AcpReadinessPanel (cyclomatic 27, cognitive 15) ui/desktop/src/components/settings/providers/AcpReadinessPanel.tsx:64 — AcpReadinessPanel has cyclomatic complexity 27 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseCommandLine (cyclomatic 26, cognitive 45) · ×1
  • Complex function parseCommandLine (cyclomatic 26, cognitive 45) ui/desktop/src/components/settings/extensions/utils.ts:223 — parseCommandLine has cyclomatic complexity 26 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ScheduleDetailView (cyclomatic 25, cognitive 20) · ×1
  • Complex function ScheduleDetailView (cyclomatic 25, cognitive 20) ui/desktop/src/components/schedule/ScheduleDetailView.tsx:100 — ScheduleDetailView has cyclomatic complexity 25 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ToolCallView (cyclomatic 25, cognitive 19) · ×1
  • Complex function ToolCallView (cyclomatic 25, cognitive 19) ui/desktop/src/components/ToolCallWithResponse.tsx:501 — ToolCallView has cyclomatic complexity 25 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · ui/desktop/src/main.ts · ×1
  • ui/desktop/src/main.ts: 2737 lines of code ui/desktop/src/main.ts:1 — ui/desktop/src/main.ts has 2737 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/ChatInput.tsx · ×1
  • ui/desktop/src/components/ChatInput.tsx: 1784 lines of code ui/desktop/src/components/ChatInput.tsx:1 — ui/desktop/src/components/ChatInput.tsx has 1784 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/ToolCallWithResponse.tsx · ×1
  • ui/desktop/src/components/ToolCallWithResponse.tsx: 1041 lines of code ui/desktop/src/components/ToolCallWithResponse.tsx:1 — ui/desktop/src/components/ToolCallWithResponse.tsx has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/McpApps/McpAppRenderer.tsx · ×1
  • ui/desktop/src/components/McpApps/McpAppRenderer.tsx: 1031 lines of code ui/desktop/src/components/McpApps/McpAppRenderer.tsx:1 — ui/desktop/src/components/McpApps/McpAppRenderer.tsx has 1031 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/sessions/SessionListView.tsx · ×1
  • ui/desktop/src/components/sessions/SessionListView.tsx: 1016 lines of code ui/desktop/src/components/sessions/SessionListView.tsx:1 — ui/desktop/src/components/sessions/SessionListView.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 · ui/desktop/src/components/recipes/RecipesView.tsx · ×1
  • ui/desktop/src/components/recipes/RecipesView.tsx: 995 lines of code ui/desktop/src/components/recipes/RecipesView.tsx:1 — ui/desktop/src/components/recipes/RecipesView.tsx has 995 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx · ×1
  • ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx: 951 lines of code ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx:1 — ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.tsx has 951 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx · ×1
  • ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx: 927 lines of code ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx:1 — ui/desktop/src/components/settings/models/subcomponents/SwitchModelModal.tsx has 927 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx · ×1
  • ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx: 756 lines of code ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx:1 — ui/desktop/src/components/settings/localInference/ModelSettingsPanel.tsx has 756 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/utils/autoUpdater.ts · ×1
  • ui/desktop/src/utils/autoUpdater.ts: 749 lines of code ui/desktop/src/utils/autoUpdater.ts:1 — ui/desktop/src/utils/autoUpdater.ts has 749 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/acp/chatSessionStore.ts · ×1
  • ui/desktop/src/acp/chatSessionStore.ts: 699 lines of code ui/desktop/src/acp/chatSessionStore.ts:1 — ui/desktop/src/acp/chatSessionStore.ts has 699 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/utils/githubUpdater.ts · ×1
  • ui/desktop/src/utils/githubUpdater.ts: 699 lines of code ui/desktop/src/utils/githubUpdater.ts:1 — ui/desktop/src/utils/githubUpdater.ts has 699 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/SessionActionsHeader.tsx · ×1
  • ui/desktop/src/components/SessionActionsHeader.tsx: 639 lines of code ui/desktop/src/components/SessionActionsHeader.tsx:1 — ui/desktop/src/components/SessionActionsHeader.tsx has 639 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/App.tsx · ×1
  • ui/desktop/src/App.tsx: 626 lines of code ui/desktop/src/App.tsx:1 — ui/desktop/src/App.tsx has 626 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/MentionPopover.tsx · ×1
  • ui/desktop/src/components/MentionPopover.tsx: 613 lines of code ui/desktop/src/components/MentionPopover.tsx:1 — ui/desktop/src/components/MentionPopover.tsx has 613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/utils/analytics.ts · ×1
  • ui/desktop/src/utils/analytics.ts: 600 lines of code ui/desktop/src/utils/analytics.ts:1 — ui/desktop/src/utils/analytics.ts has 600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/McpApps/PipWindow.tsx · ×1
  • ui/desktop/src/components/McpApps/PipWindow.tsx: 594 lines of code ui/desktop/src/components/McpApps/PipWindow.tsx:1 — ui/desktop/src/components/McpApps/PipWindow.tsx has 594 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx · ×1
  • ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx: 588 lines of code ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx:1 — ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx has 588 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/app/AppSettingsSection.tsx · ×1
  • ui/desktop/src/components/settings/app/AppSettingsSection.tsx: 582 lines of code ui/desktop/src/components/settings/app/AppSettingsSection.tsx:1 — ui/desktop/src/components/settings/app/AppSettingsSection.tsx has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/BaseChat.tsx · ×1
  • ui/desktop/src/components/BaseChat.tsx: 581 lines of code ui/desktop/src/components/BaseChat.tsx:1 — ui/desktop/src/components/BaseChat.tsx has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/schedule/SchedulesView.tsx · ×1
  • ui/desktop/src/components/schedule/SchedulesView.tsx: 581 lines of code ui/desktop/src/components/schedule/SchedulesView.tsx:1 — ui/desktop/src/components/schedule/SchedulesView.tsx has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx · ×1
  • ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx: 569 lines of code ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx:1 — ui/desktop/src/components/settings/keyboard/KeyboardShortcutsSection.tsx has 569 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx · ×1
  • ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx: 565 lines of code ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx:1 — ui/desktop/src/components/settings/localInference/LocalInferenceSettings.tsx has 565 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 · crates/goose/src/session/export_html/template.js · ×1
  • crates/goose/src/session/export_html/template.js: 563 lines of code crates/goose/src/session/export_html/template.js:1 — crates/goose/src/session/export_html/template.js has 563 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx · ×1
  • ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx: 559 lines of code ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx:1 — ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/schedule/ScheduleModal.tsx · ×1
  • ui/desktop/src/components/schedule/ScheduleModal.tsx: 557 lines of code ui/desktop/src/components/schedule/ScheduleModal.tsx:1 — ui/desktop/src/components/schedule/ScheduleModal.tsx has 557 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx · ×1
  • ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx: 544 lines of code ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx:1 — ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/gooseServe.ts · ×1
  • ui/desktop/src/gooseServe.ts: 536 lines of code ui/desktop/src/gooseServe.ts:1 — ui/desktop/src/gooseServe.ts has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/MessageQueue.tsx · ×1
  • ui/desktop/src/components/MessageQueue.tsx: 522 lines of code ui/desktop/src/components/MessageQueue.tsx:1 — ui/desktop/src/components/MessageQueue.tsx has 522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/AgentLoopSettings.tsx · ×1
  • ui/desktop/src/components/settings/AgentLoopSettings.tsx: 515 lines of code ui/desktop/src/components/settings/AgentLoopSettings.tsx:1 — ui/desktop/src/components/settings/AgentLoopSettings.tsx has 515 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/security/SecurityToggle.tsx · ×1
  • ui/desktop/src/components/settings/security/SecurityToggle.tsx: 515 lines of code ui/desktop/src/components/settings/security/SecurityToggle.tsx:1 — ui/desktop/src/components/settings/security/SecurityToggle.tsx has 515 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/schedule/ScheduleDetailView.tsx · ×1
  • ui/desktop/src/components/schedule/ScheduleDetailView.tsx: 493 lines of code ui/desktop/src/components/schedule/ScheduleDetailView.tsx:1 — ui/desktop/src/components/schedule/ScheduleDetailView.tsx has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx · ×1
  • ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx: 487 lines of code ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx:1 — ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/onboarding/LocalModelPicker.tsx · ×1
  • ui/desktop/src/components/onboarding/LocalModelPicker.tsx: 473 lines of code ui/desktop/src/components/onboarding/LocalModelPicker.tsx:1 — ui/desktop/src/components/onboarding/LocalModelPicker.tsx has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx · ×1
  • ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx: 415 lines of code ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx:1 — ui/desktop/src/components/recipes/shared/CreateSubRecipeInline.tsx has 415 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/desktop/src/components/Layout/NavigationPanel.tsx · ×1
  • ui/desktop/src/components/Layout/NavigationPanel.tsx: 402 lines of code ui/desktop/src/components/Layout/NavigationPanel.tsx:1 — ui/desktop/src/components/Layout/NavigationPanel.tsx has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~78 LoC) · ×1
  • Dead file (~78 LoC) ui/desktop/src/components/settings/mode/ConversationLimitsDropdown.tsx — no import path from any entry point (70 application, 25 tooling, 133 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~54 LoC) · ×1
  • Dead file (~54 LoC) ui/desktop/scripts/sign-windows-installer.js — no import path from any entry point (70 application, 25 tooling, 133 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 (~48 LoC) · ×1
  • Dead file (~48 LoC) ui/desktop/scripts/build-main.js — no import path from any entry point (70 application, 25 tooling, 133 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
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) ui/desktop/src/main.ts:2264 — `spawn` pipes `stderr` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `ps.stderr`, while `ps.stdout` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stderr (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`ps.stderr.on('data', …)`, or `ps.stderr.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot.
Minor — 218 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging scripts/provider-error-proxy/proxy.py:472 — `info` at line 472 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 scripts/provider-error-proxy/proxy.py:523 — `info` at line 523 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 scripts/provider-error-proxy/proxy.py:528 — `info` at line 528 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 scripts/provider-error-proxy/proxy.py:530 — `info` at line 530 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 scripts/provider-error-proxy/proxy.py:545 — `warning` at line 545 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 scripts/provider-error-proxy/proxy.py:547 — `info` at line 547 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 scripts/provider-error-proxy/proxy.py:588 — `info` at line 588 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 scripts/provider-error-proxy/proxy.py:601 — `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.
  • Interpolated log message defeats structured logging scripts/provider-error-proxy/proxy.py:602 — `info` at line 602 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 scripts/provider-error-proxy/proxy.py:607 — `info` 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.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 scripts/provider-error-proxy/proxy.py:608 — `info` at line 608 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 scripts/provider-error-proxy/proxy.py:617 — `error` at line 617 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.error("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.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/provider-error-proxy/proxy.py:755 — `error` at line 755 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.error("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.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/provider-error-proxy/proxy.py:874 — `info` at line 874 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 crates/goose-roaming/src/node.rs:347 — `warn!` at line 347 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-roaming/src/node.rs:516 — `warn!` at line 516 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-roaming/src/node.rs:532 — `warn!` at line 532 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-roaming/src/node.rs:552 — `warn!` at line 552 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-roaming/src/node.rs:606 — `warn!` at line 606 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-providers/src/anthropic.rs:408 — `debug!` at line 408 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-providers/src/http_status.rs:314 — `warn!` at line 314 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-providers/src/ollama.rs:551 — `debug!` at line 551 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-providers/src/openai.rs:814 — `debug!` at line 814 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-provider-types/src/retry.rs:135 — `warn!` at line 135 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/goose-provider-types/src/retry.rs:219 — `warn!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel services/ask-ai-bot/utils/discord/server-context.ts:35 — `services/ask-ai-bot/utils/discord/server-context.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/gooseServe.ts:18 — `ui/desktop/src/gooseServe.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/gooseServe.ts:19 — `ui/desktop/src/gooseServe.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/proxy.ts:19 — `ui/desktop/src/proxy.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/proxy.ts:26 — `ui/desktop/src/proxy.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/App.tsx:157 — `ui/desktop/src/App.tsx` reports through `console.*` at line 157 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/App.tsx:432 — `ui/desktop/src/App.tsx` reports through `console.*` at line 432 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/App.tsx:464 — `ui/desktop/src/App.tsx` reports through `console.*` at line 464 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/App.tsx:522 — `ui/desktop/src/App.tsx` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/renderer.tsx:20 — `ui/desktop/src/renderer.tsx` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/renderer.tsx:26 — `ui/desktop/src/renderer.tsx` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/toasts.tsx:188 — `ui/desktop/src/toasts.tsx` reports through `console.*` at line 188 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/csp.ts:51 — `ui/desktop/src/utils/csp.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/date.ts:21 — `ui/desktop/src/utils/date.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/localMessageStorage.ts:32 — `ui/desktop/src/utils/localMessageStorage.ts` reports through `console.*` at line 32 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/localMessageStorage.ts:41 — `ui/desktop/src/utils/localMessageStorage.ts` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:21 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:35 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:43 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:51 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:57 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 57 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/platform_events.ts:86 — `ui/desktop/src/utils/platform_events.ts` reports through `console.*` at line 86 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/recentDirs.ts:26 — `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/recentDirs.ts:35 — `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ui/desktop/src/utils/recentDirs.ts:48 — `ui/desktop/src/utils/recentDirs.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×37
  • Orphaned file crates/goose/src/agents/platform_extensions/analyze/format.rs: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 scripts/bench-postprocess-scripts/prepare_aggregate_metrics.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 crates/goose/src/agents/platform_extensions/analyze/languages.rs: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 scripts/bench-postprocess-scripts/llm-judges/llm_judge.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 ui/desktop/src/components/parameter/ParameterInput.tsx: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 ui/desktop/src/components/GroupedExtensionLoadingToast.tsx: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 ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderCatalogPicker.tsx: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 crates/goose/src/agents/validate_extensions.rs: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 ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx: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 scripts/bench-postprocess-scripts/generate_leaderboard.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 ui/desktop/src/components/recipes/RecipeActivityEditor.tsx: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 crates/goose-cli/src/commands/review/prompt.rs: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 crates/goose/src/config/providers.rs: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 ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx: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 ui/desktop/src/components/AnnouncementModal.tsx: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 ui/desktop/src/components/recipes/shared/JsonSchemaEditor.tsx: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 ui/desktop/src/components/settings/mode/ModeSelectionItem.tsx: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 ui/desktop/src/components/icons/Bird2.tsx: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 ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx: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 ui/desktop/src/components/ui/dropdown-menu.tsx: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 ui/desktop/src/components/icons/Bird1.tsx: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 ui/desktop/src/components/icons/Bird3.tsx: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 ui/desktop/src/components/icons/Bird6.tsx: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 crates/goose/src/providers/usage_estimator.rs: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 ui/desktop/src/components/icons/Bird4.tsx: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.
  • + 12 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×26
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/summon.rs:605 — `load_subrecipe_content` turns every `Err` into `Ok(String::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/state_machine/ops_project.rs:27 — `prompt_parts` turns every `Err` into `Ok(Vec::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/hints/load_hints.rs:78 — `load_new_hints` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/acp/server/onboarding.rs:306 — `count_skill_dirs` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/acp/server/onboarding.rs:435 — `import_skill_dirs` turns every `Err` into `Ok(ImportPairCount::default())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/acp/server/tool_calls/conversion.rs:192 — `extract_tool_locations_from_request` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/analyze/parser.rs:82 — `extract_functions` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/analyze/parser.rs:155 — `extract_classes` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/analyze/parser.rs:613 — `extract_imports` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/analyze/parser.rs:677 — `extract_calls` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/developer/shell.rs:106 — `windows_shell` turns every `Err` into `"cmd".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/agents/platform_extensions/developer/tree.rs:210 — `count_file_lines` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/plugins/mod.rs:200 — `auto_update_plugins_at_root` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/plugins/discovery.rs:188 — `list_dir_children` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/plugins/formats/open_plugins.rs:134 — `installed_skill_dirs` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/session_context.rs:78 — `session_user` turns every `Err` into `"unknown".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/sources.rs:172 — `read_existing_project_properties` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/sources.rs:182 — `read_existing_agent_properties` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose/src/sources.rs:261 — `project_working_dirs` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-context-management/src/format.rs:23 — `format_message_for_compacting` turns every `Err` into `Some("tool_request: [error]".to_string())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-local-inference/src/lib.rs:488 — `build_openai_messages_json` turns every `Err` into `"[]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-local-inference/src/lib.rs:511 — `build_openai_text_messages_json` turns every `Err` into `"[]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-local-inference/src/hf_models.rs:325 — `quant_bits` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-local-inference/src/mlx.rs:422 — `generation_config_eos_token_ids` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/goose-provider-types/src/canonical.rs:43 — `recommended_models_from_registry` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • + 1 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate ui/desktop/src/components/onboarding/ProviderConfigForm.tsx:205 — `!!entry.value || (entry.serverValue != null && typeof entry.serverValue === 'string')` appears character-identically in 2 files — ui/desktop/src/components/onboarding/ProviderConfigForm.tsx, ui/desktop/src/components/settings/providers/modal/ProviderConfigurationModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/main.ts:753 — `!filePath || typeof filePath !== 'string'` appears character-identically in 2 files — ui/desktop/src/main.ts, ui/desktop/src/utils/pathUtils.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx:324 — `!isNaN(timeoutValue) && timeoutValue > 0` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx, ui/desktop/src/components/settings/extensions/modal/ExtensionTimeoutField.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/main.ts:2461 — `!settings.keyboardShortcuts && settings.globalShortcut !== undefined` appears character-identically in 2 files — ui/desktop/src/main.ts, ui/desktop/src/utils/settings.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/acp/errors.ts:102 — `'error' in error && isRecord(error.error)` appears character-identically in 3 files — ui/desktop/src/acp/errors.ts, ui/desktop/src/acp/recipe.ts, ui/desktop/src/acp/schedules.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 documentation/src/components/ImageCarousel.js:14 — `Array.isArray(names) && names.length > activeIndex && names[activeIndex]` appears character-identically in 2 files — documentation/src/components/ImageCarousel.js, documentation/src/components/VideoCarousel.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:87 — `a.type !== 'builtin' && b.type === 'builtin'` appears character-identically in 3 files — ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx, ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx, ui/desktop/src/components/settings/permission/PermissionSetting.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx:86 — `a.type === 'builtin' && b.type !== 'builtin'` appears character-identically in 3 files — ui/desktop/src/components/settings/extensions/ExtensionsSection.tsx, ui/desktop/src/components/settings/permission/PermissionRulesModal.tsx, ui/desktop/src/components/settings/permission/PermissionSetting.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/recipes/shared/RecipeExtensionSelector.tsx:42 — `availableTools && availableTools.length > 0` appears character-identically in 2 files — ui/desktop/src/components/recipes/shared/RecipeExtensionSelector.tsx, ui/desktop/src/components/settings/extensions/utils.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/utils/autoUpdater.ts:129 — `error instanceof Error && 'code' in error` appears character-identically in 2 files — ui/desktop/src/utils/autoUpdater.ts, ui/desktop/src/utils/githubUpdater.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:209 — `invalidFields.key && 'border-red-500 focus:border-red-500'` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx, ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:221 — `invalidFields.value && 'border-red-500 focus:border-red-500'` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx, ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:153 — `isFieldInvalid(index, 'key') && 'border-red-500 focus:border-red-500'` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx, ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:173 — `isFieldInvalid(index, 'value') && 'border-red-500 focus:border-red-500'` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx, ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/App.tsx:148 — `isRecipeDeclined(error) || isRecipeParamsCancelled(error)` appears character-identically in 2 files — ui/desktop/src/App.tsx, ui/desktop/src/components/recipes/RecipesView.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/i18n/index.ts:34 — `lower === 'zh' || lower.startsWith('zh-')` appears character-identically in 2 files — ui/desktop/src/i18n/index.ts, ui/desktop/src/utils/externalLinkTranslations.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx:70 — `newKey.trim() !== '' || newValue.trim() !== ''` appears character-identically in 2 files — ui/desktop/src/components/settings/extensions/modal/EnvVarsSection.tsx, ui/desktop/src/components/settings/extensions/modal/HeadersSection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/ParameterInputModal.tsx:226 — `param.input_type === 'select' && param.options` appears character-identically in 2 files — ui/desktop/src/components/ParameterInputModal.tsx, ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:68 — `process.env.GITHUB_OWNER || 'aaif-goose'` appears character-identically in 3 files — REDACTED, ui/desktop/src/utils/githubUpdater.ts, ui/desktop/vite.main.config.mts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/utils/githubUpdater.ts:475 — `process.env.GOOSE_BUNDLE_NAME || 'Goose'` appears character-identically in 2 files — ui/desktop/src/utils/githubUpdater.ts, ui/desktop/vite.main.config.mts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/bottom_menu/DirSwitcher.tsx:156 — `result.canceled || result.filePaths.length === 0` appears character-identically in 2 files — ui/desktop/src/components/bottom_menu/DirSwitcher.tsx, ui/desktop/src/main.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/acp/recipe.ts:12 — `typeof error !== 'object' || error === null` appears character-identically in 2 files — ui/desktop/src/acp/recipe.ts, ui/desktop/src/acp/schedules.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/recipe/index.ts:86 — `typeof error === 'object' && error !== null && 'message' in error` appears character-identically in 2 files — ui/desktop/src/recipe/index.ts, ui/desktop/src/recipe/recipe_management.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/components/MessageUsageStats.tsx:79 — `typeof value === 'number' && Number.isFinite(value)` appears character-identically in 2 files — ui/desktop/src/components/MessageUsageStats.tsx, ui/desktop/src/components/settings/AgentLoopSettings.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/desktop/src/acp/adapter/shared.ts:156 — `typeof value === 'object' && value !== null` appears character-identically in 8 files — ui/desktop/src/acp/adapter/shared.ts, ui/desktop/src/acp/capabilities.ts, ui/desktop/src/acp/errors.ts, ui/desktop/src/acp/recipe.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.
D10 · Test Quality · Mock-dominated test · ×7
  • Mock-dominated test: shows the scoped-parameter incompatibility before returning home ui/desktop/src/App.test.tsx:302 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: restores active chat sessions after ACP reconnects ui/desktop/src/components/ChatSessionsContainer.test.tsx:31 — This test sets up 6 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: returns to the session with the active Live voice interaction ui/desktop/src/components/Hub.test.tsx:158 — 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: saves a provider stored as %s with engine %s ui/desktop/src/components/settings/providers/modal/subcomponents/forms/CustomProviderForm.test.tsx:168 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: finishes a credits failure without a submit error ui/desktop/src/acp/__tests__/chatSessionController.test.ts:289 — 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: waits for pending tool permission cancellation before truncating and rerunning ui/desktop/src/acp/__tests__/chatSessionController.test.ts:396 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 7 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: carries the recipe parameter scope id in new-session metadata ui/desktop/src/acp/__tests__/sessions.test.ts:156 — 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.
D30 · Dependency Vulnerabilities · Low CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: crates/goose/src/hints/import_files.rs, crates/goose/src/skills/supporting_files.rs, crates/goose-local-inference/src/tool_emulation.rs, crates/goose/src/providers/private_file.rs, crates/goose-local-inference/src/native_tool_parsing.rs, ui/desktop/src/desktopFileAccess.ts, crates/goose/src/acp/server/local_inference.rs, crates/goose/src/config/signup_openrouter/server.rs (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: workflow_recipes/release_risk_check/release_risk_report.py, crates/goose/src/acp/server/tool_calls/chain.rs, ui/desktop/src/utils/cronSchedule.ts, ui/desktop/src/acp/adapter/toolNotifications.ts, crates/goose/src/acp/server/tool_calls/enrichment.rs, ui/desktop/src/acp/elicitationRequests.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 5 significant file(s) lose their only recent owner: REDACTED, services/ask-ai-bot/utils/ai/index.ts, services/ask-ai-bot/utils/ai/tools/index.ts, services/ask-ai-bot/utils/ai/tools/github.ts, services/ask-ai-bot/events/messageCreate.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/goose-sdk/scripts/gdk-release.py, crates/goose/src/providers/openrouter_def.rs, crates/goose-providers/src/typesafe.rs. Pair on, review, or document these before any departure.
D31 · IaC & Container Security · Low IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X9 · Subsumed condition operand · Subsumed condition operand · ×3
  • Subsumed condition operand crates/goose/tests/tetrate_streaming.rs:313 — `content1.contains("Stream 1")` can never decide this `||` — every value satisfying `content1.contains("Stream 1")` also satisfies `content1.contains("1")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/goose/tests/tetrate_streaming.rs:317 — `content2.contains("Stream 2")` can never decide this `||` — every value satisfying `content2.contains("Stream 2")` also satisfies `content2.contains("2")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/goose/src/otel/otlp.rs:518 — `target.starts_with("goose::metrics")` can never decide this `||` — every value satisfying `target.starts_with("goose::metrics")` also satisfies `target.contains("metric")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch scripts/diagnostics-viewer.py:313 — `get_file_list` 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 ui/desktop/src/utils/gitBranchIpc.ts:51 — `ipcMain.handle("list-git-branches")` 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.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: AcpChatSessionActions (24 required operations) ui/desktop/src/acp/chatSessionStore.ts:62 — `AcpChatSessionActions` declares 24 required operations: `deleteSnapshot`, `applyAcpSessionNotification`, `applyAcpGooseSessionNotification`, `applyPermissionRequest`, `cancelPermissionRequest`, `applyElicitationRequest`, `setElicitationStatus`, `setSessionMetadata`, `startSessionLoad`, `finishSessionLoad`, `failSessionLoad`, `setSessionLoadError`, `setMessages`, `addPendingLocalSteerMessage`, `setChatState`, `resolveUserInputRequest`, `startPromptAttempt`, `startPromptCancellation`, `clearPromptCancellation`, `restorePromptCancellation`, `waitForPromptCancellation`, `finishPromptAttemptIfCurrent`, `clearActivePromptAttempt`, `isCurrentPromptAttempt`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 12 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 (37 single-owned of 642 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; 642 of the 941 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)) (+6 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/goose/src/security/egress_inspector.rs, crates/goose/src/security/classification_client.rs, crates/goose-sdk/src/observability.rs, ui/desktop/src/remoteBackends.ts, crates/goose/src/agents/tool_schema_normalize.rs, crates/goose/src/acp/handoff.rs, crates/goose-cli/src/session/paste.rs, crates/goose-provider-types/src/cache_semantics.rs (+6 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 4 of 24 project(s) overshoot their size bounds, lowering Project Cohesion to 6.7/10. The most over is `crates/goose` (147480 LoC, 612 module-visible types across 45 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 37 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/goose/src/agents/platform_extensions/analyze/format.rs, scripts/bench-postprocess-scripts/prepare_aggregate_metrics.py, crates/goose/src/agents/platform_extensions/analyze/languages.rs, scripts/bench-postprocess-scripts/llm-judges/llm_judge.py, ui/desktop/src/components/parameter/ParameterInput.tsx, ui/desktop/src/components/GroupedExtensionLoadingToast.tsx, ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderCatalogPicker.tsx, crates/goose/src/agents/validate_extensions.rs (and 29 more) (38 orphaned of 642 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; 642 of the 941 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
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 12/18 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/goose-sdk`, `crates/goose-sdk/examples/uniffi/kotlin`, `crates/goose-test`, `crates/goose-test-support` and 1 more.
R7 · Dead Code · Unused export 'repositoryFromIssueUrl' · ×1
  • Unused export 'repositoryFromIssueUrl' REDACTED:283 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'Archive' · ×1
  • Unused export 'Archive' ui/desktop/src/components/icons/toolcalls/Archive.tsx:1 — Nothing ultimately consumes this binding: its only referrer is the re-export in ui/desktop/src/components/icons/toolcalls/index.tsx, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in ui/desktop/src/components/icons/toolcalls/index.tsx in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'Globe' · ×1
  • Unused export 'Globe' ui/desktop/src/components/icons/toolcalls/Globe.tsx:1 — Nothing ultimately consumes this binding: its only referrer is the re-export in ui/desktop/src/components/icons/toolcalls/index.tsx, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in ui/desktop/src/components/icons/toolcalls/index.tsx in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'Settings' · ×1
  • Unused export 'Settings' ui/desktop/src/components/icons/toolcalls/Settings.tsx:1 — Nothing ultimately consumes this binding: its only referrer is the re-export in ui/desktop/src/components/icons/toolcalls/index.tsx, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in ui/desktop/src/components/icons/toolcalls/index.tsx in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SupportedLocale' · ×1
  • Unused export 'SupportedLocale' ui/desktop/src/i18n/index.ts:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getStorageDirectory' · ×1
  • Unused export 'getStorageDirectory' ui/desktop/src/recipe/recipe_management.ts:66 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'Envs' · ×1
  • Unused export 'Envs' ui/desktop/src/types/extensions.ts:3 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getAutoDownloadDisabled' · ×1
  • Unused export 'getAutoDownloadDisabled' ui/desktop/src/utils/autoUpdater.ts:55 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'shouldHideTimestamp' · ×1
  • Unused export 'shouldHideTimestamp' ui/desktop/src/utils/toolCallChaining.ts:54 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isInChain' · ×1
  • Unused export 'isInChain' ui/desktop/src/utils/toolCallChaining.ts:64 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isProtocolSafe' · ×1
  • Unused export 'isProtocolSafe' ui/desktop/src/utils/urlSecurity.ts:75 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getProtocol' · ×1
  • Unused export 'getProtocol' ui/desktop/src/utils/urlSecurity.ts:87 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused module-local declaration 'mockAllPersistent' · ×1
  • Unused module-local declaration 'mockAllPersistent' oidc-proxy/test/index.test.js:97 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete — Set: Content-Security-Policy, Referrer-Policy. Missing: Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−1.5 on this card.) The server: `axum_server::bind_rustls(` (crates/goose-cli/src/cli.rs:1890).
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 2/7 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~0.4 `!` null assertions per 1k TypeScript source lines — 33 assertion(s) across the 79047 source line(s) of the 464 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: ui/desktop/src/utils/autoUpdater.ts (6), services/ask-ai-bot/utils/ai/tools/docs.ts (4), ui/desktop/src/components/ChatInput.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Minor — 15 finding(s)
D10 · Test Quality · Skipped (documented) · ×15
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:72 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:147 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:176 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:239 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:281 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:316 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:404 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:419 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/desktopFileAccess.test.ts:447 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/gooseServe.test.ts:134 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/gooseServe.test.ts:189 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/gooseServe.test.ts:217 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/gooseServe.test.ts:261 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/gooseServe.test.ts:312 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) ui/desktop/src/utils/githubUpdater.staging.test.ts:24 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-342f8366b22a47b3b4fb0fad77b5ab74/history.json --exit-code 0 --source .10artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-342f8366b22a47b3b4fb0fad77b5ab74/tree.json --exit-code 0 --source .8artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude crates/goose/src/session/export_html/vendor --exclude ui/goose-acp-client/src/generated .60artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update80artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .7artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 3 file(s) — `documentation/docusaurus.config.ts`, `ui/desktop/src/acp/config.ts`, `ui/desktop/src/vite-env.d.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a174ff-2788-72fc-a7d2-a7265c2cb50f · 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