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

affaan-m/ECC

Measured 13 November 2026, 15:23 UTC, at code version d2ef268

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

CAI score 52out of 100 Adequate
CriticalWeakAdequateStrongExemplary
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: 180,209 lines of product code in 28 projects, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Code Health, 42

Findings by how serious they are

22 critical 1106 serious 184 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 15:23 UTC

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

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

73of 73 dimensions measured by tools.
1295of 1312 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
73dimensions across 7 lenses, read from 180,209 lines of product code in 28 projects.
Chapters

Executive summary

affaan-m/ECC falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 52 out of 100 and is rated Adequate, and 21 of its 22 critical findings are security problems.

Code Health, at 42, is the weakest lens and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 6 points. Adding type checking would lift Code Health itself, worth about 5 points. Raising Code Health to 70 would lift the score to about 59.

Eleven places in the code run text as code, which an attacker could use. Four weaknesses in the code could be used by an attacker, and two passwords or keys in the code and one in the code's history are open to anyone who can read the repository. Replacing text run as code with direct calls, fixing the weaknesses the scanner points to and replacing each exposed password or key would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions. The loop of files that import each other needs breaking.

The product code is 180,209 lines, about €340,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.
Code Health 42 · counts for 46%Production Readiness 48 · counts for 25%Performance 60 · counts for 14%Security and Compliance 66 · counts for 8%Architecture 92 · counts for 4%Maturity 95 · counts for 2%Event Sourcing 100 · counts for 1%

If Code Health rose from 42 to 70, the lowest score rated Strong, the score would rise from 52 to about 59.

Code composition: what the lines of code are
Product code 51%Tests 49%
New since the last survey: 197 findings

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

  • Cyclomatic Complexity · runner._sandboxed_setup_command (cyclomatic 24) skills/skill-comply/scripts/runner.py
  • Cyclomatic Complexity · runner._archive_operands (cyclomatic 18) skills/skill-comply/scripts/runner.py
  • Cyclomatic Complexity · StateStore::sync_tool_activity_metrics (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · runner._extracted_archives_safe (cyclomatic 16) skills/skill-comply/scripts/runner.py
  • Cognitive Complexity · runner._archive_operands (cognitive 33) skills/skill-comply/scripts/runner.py
  • Cognitive Complexity · module_audit.check_modules (cognitive 31) .agents/skills/docs-governance/scripts/module_audit.py
  • Cognitive Complexity · module_audit.check_modules (cognitive 31) pi/core/skills/docs-governance/scripts/module_audit.py
  • Cognitive Complexity · module_audit.check_modules (cognitive 31) skills/docs-governance/scripts/module_audit.py
  • Cognitive Complexity · runner._sandboxed_setup_command (cognitive 31) skills/skill-comply/scripts/runner.py
  • Cognitive Complexity · runner._extracted_archives_safe (cognitive 18) skills/skill-comply/scripts/runner.py
  • Code Duplication · Edited copy of a member (111 corresponding lines) skills/taste-application/scripts/taste/timeline.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .agents/skills/docs-governance/scripts/audit-docs.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) pi/core/skills/agent-self-evaluation/scripts/evaluate.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copy of a member (55 corresponding lines) ecc_dashboard.py
  • Code Duplication · Edited copy of a member (39 corresponding lines) skills/taste-application/scripts/mint.py
  • Code Duplication · Edited copy of a member (35 corresponding lines) ecc_dashboard.py
  • Code Duplication · Edited copy of a member (58 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (58 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (57 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copies of one member (3 members, 52+ corresponding lines) src/llm/providers/astraflow.py
  • Code Duplication · Edited copy of a member (16 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copy of a member (29 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (43 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (52 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (41 corresponding lines) ecc2/src/session/manager.rs
  • Code Duplication · Edited copy of a member (27 corresponding lines) ecc2/src/worktree/mod.rs
  • Code Duplication · Edited copy of a member (34 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) skills/taste-application/scripts/taste/timeline.py
  • Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) REDACTED
  • Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) skills/taste-application/scripts/taste/timeline.py
  • Code Duplication · Edited copy of a member (32 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (28 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (28 corresponding lines) ecc2/src/worktree/mod.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (27 corresponding lines) ecc2/src/session/manager.rs
  • Code Duplication · Edited copy of a member (32 corresponding lines) ecc2/src/session/manager.rs
  • Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (34 corresponding lines) REDACTED
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) ecc2/src/worktree/mod.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) ecc2/src/worktree/mod.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (11 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) ecc2/src/worktree/mod.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) skills/taste-application/scripts/taste/plates.py
  • Code Duplication · Edited copy of a member (15 corresponding lines) ecc_dashboard.py
  • Code Duplication · Edited copy of a member (15 corresponding lines) ecc2/src/session/mod.rs
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/llm/providers/astraflow.py
  • Code Duplication · Edited copy of a member (19 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) ecc2/src/notifications.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) ecc2/src/main.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) REDACTED
  • Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) ecc_dashboard.py
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) ecc2/src/comms/mod.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) skills/taste-application/scripts/taste/cadence.py
  • Code Duplication · Edited copy of a member (41 corresponding lines) REDACTED
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) .agents/skills/docs-governance/scripts/module_audit.py
  • Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (10 corresponding lines) ecc2/src/tui/dashboard.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) ecc2/src/config/mod.rs
  • Code Duplication · Edited copy of a member (3 corresponding lines) skills/taste-application/scripts/taste/assemble.py
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/llm/providers/model_config.py
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) REDACTED
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) skills/taste-application/scripts/taste/timeline.py
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) skills/taste-application/scripts/falapi.py
  • Code Duplication · Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/pack.py
  • Code Duplication · Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/pack.py
  • Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) skills/taste-application/scripts/falapi.py
  • Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) skills/taste-application/scripts/taste/assemble.py
  • Code Duplication · Edited copy of a member (2 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copy of a member (2 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) .agents/skills/docs-governance/scripts/audit-docs.py
  • Code Duplication · Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) .agents/skills/docs-governance/scripts/markdown_links.py
  • Code Duplication · Edited copy of a member (8 corresponding lines) ecc2/src/session/mod.rs
  • Code Duplication · Duplicated block (16–18 lines × 2) ecc2/src/session/manager.rs
  • Code Duplication · Duplicated block (15 lines × 2) ecc2/src/session/manager.rs
  • Code Duplication · Duplicated block (13–15 lines × 2) ecc2/src/tui/dashboard.rs
  • Code Duplication · Duplicated block (13–14 lines × 4) REDACTED
  • Code Duplication · Duplicated block (14 lines × 2) ecc2/src/tui/dashboard.rs
  • Code Duplication · Duplicated block (9–13 lines × 2) ecc2/src/tui/dashboard.rs

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

Fixed since the last survey: 1452 findings

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

  • Cyclomatic Complexity · block-no-verify.checkCommand (cyclomatic 73) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · context-selection.resolveTaskContext (cyclomatic 67) scripts/lib/context-selection.js
  • Cyclomatic Complexity · gateguard-fact-force.unwrapLeadWrappers (cyclomatic 63) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · install-state.createFallbackValidator::validate (cyclomatic 60) scripts/lib/install-state.js
  • Cyclomatic Complexity · block-no-verify.executableWords (cyclomatic 58) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · context-profile-commands.execute (cyclomatic 58) scripts/lib/context-profile-commands.js
  • Cyclomatic Complexity · validate-install-manifests.validateInstallManifests (cyclomatic 51) scripts/ci/validate-install-manifests.js
  • Cyclomatic Complexity · mcp-health-check.probeCommandServer (cyclomatic 51) REDACTED
  • Cyclomatic Complexity · index.wrapSqlJsDatabase (cyclomatic 49) scripts/lib/state-store/index.js
  • Cyclomatic Complexity · server.createPlanCanvasServer.handleApi (cyclomatic 49) REDACTED
  • Cyclomatic Complexity · apply.applyInstallPlanLocked (cyclomatic 48) scripts/lib/install/apply.js
  • Cyclomatic Complexity · codex-legacy-sync.uninstallLegacyCodexSync (cyclomatic 47) scripts/lib/codex-legacy-sync.js
  • Cyclomatic Complexity · merge-mcp-config.main (cyclomatic 47) scripts/codex/merge-mcp-config.js
  • Cyclomatic Complexity · context-profile-commands.parse (cyclomatic 46) scripts/lib/context-profile-commands.js
  • Cyclomatic Complexity · server.createControlPaneServer.server (cyclomatic 44) REDACTED
  • Cyclomatic Complexity · request.normalizeInstallRequest (cyclomatic 42) scripts/lib/install/request.js
  • Cyclomatic Complexity · shadow-trail.transition (cyclomatic 41) scripts/lib/agent-proximity/shadow-trail.js
  • Cyclomatic Complexity · guarded-write.writeFileNoFollow (cyclomatic 40) scripts/lib/install/guarded-write.js
  • Cyclomatic Complexity · hook-input-limits.createHookContextScanner.push (cyclomatic 40) scripts/hooks/hook-input-limits.js
  • Cyclomatic Complexity · gateguard-turn-scan.scanCurrentTurn (cyclomatic 39) scripts/lib/gateguard-turn-scan.js
  • Cyclomatic Complexity · context-profile-launch.launchTaskContext (cyclomatic 39) scripts/lib/context-profile-launch.js
  • Cyclomatic Complexity · observability-readiness.buildChecks (cyclomatic 39) scripts/observability-readiness.js
  • Cyclomatic Complexity · loop-status.analyzeTranscript (cyclomatic 36) scripts/loop-status.js
  • Cyclomatic Complexity · release-approval-gate.buildReport (cyclomatic 36) scripts/release-approval-gate.js
  • Cyclomatic Complexity · context-profile-native.inputs (cyclomatic 35) scripts/lib/context-profile-native.js
  • Cyclomatic Complexity · apply.assertOpenCodeHookDeactivationReady (cyclomatic 35) scripts/lib/install/apply.js
  • Cyclomatic Complexity · request.parseInstallArgs (cyclomatic 34) scripts/lib/install/request.js
  • Cyclomatic Complexity · install-guided.main (cyclomatic 34) scripts/install-guided.js
  • Cyclomatic Complexity · install-manifests.resolveInstallPlan (cyclomatic 33) scripts/lib/install-manifests.js
  • Cyclomatic Complexity · ownership-guard.prepareUserOwnedFileGuard (cyclomatic 32) scripts/lib/install/ownership-guard.js
  • Cyclomatic Complexity · context-retrieval.searchRetrieval (cyclomatic 32) scripts/lib/context-retrieval.js
  • Cyclomatic Complexity · release-video-suite.buildReport (cyclomatic 32) scripts/release-video-suite.js
  • Cyclomatic Complexity · status.renderMarkdown (cyclomatic 31) scripts/status.js
  • Cyclomatic Complexity · envelope.validateEnvelope (cyclomatic 30) scripts/lib/eval-harness/envelope.js
  • Cyclomatic Complexity · auto-update.runAutoUpdate (cyclomatic 30) scripts/auto-update.js
  • Cyclomatic Complexity · run-with-flags.main (cyclomatic 30) scripts/hooks/run-with-flags.js
  • Cyclomatic Complexity · gate.parseChildResult (cyclomatic 29) scripts/lib/eval-harness/gate.js
  • Cyclomatic Complexity · qwen-adapt-agents.adaptFrontmatter (cyclomatic 29) scripts/qwen-adapt-agents.js
  • Cyclomatic Complexity · gateguard-search-filters.applyShellFilterArg (cyclomatic 29) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · context-selection.citationFor (cyclomatic 29) scripts/lib/context-selection.js
  • Cyclomatic Complexity · statusline-render.readInstalledPlugins (cyclomatic 29) scripts/lib/statusline-render.js
  • Cyclomatic Complexity · quality-gate.maybeRunQualityGate (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · session-start.main (cyclomatic 29) scripts/hooks/session-start.js
  • Cyclomatic Complexity · install-plan.parseArgs (cyclomatic 29) scripts/install-plan.js
  • Cyclomatic Complexity · claude-settings.mergeManagedHooks (cyclomatic 28) scripts/lib/install/claude-settings.js
  • Cyclomatic Complexity · claw.main (cyclomatic 28) scripts/claw.js
  • Cyclomatic Complexity · policy.loadPolicy (cyclomatic 28) scripts/lib/github-coordination/policy.js
  • Cyclomatic Complexity · gateguard-heredoc.iterateHeredocs (cyclomatic 28) scripts/hooks/gateguard-heredoc.js
  • Cyclomatic Complexity · project-detect.detectProjectType (cyclomatic 28) scripts/lib/project-detect.js
  • Cyclomatic Complexity · claude-scope-migration.migrateClaudePluginScope (cyclomatic 28) scripts/lib/claude-scope-migration.js
  • Cyclomatic Complexity · platform-audit.parseArgs (cyclomatic 28) scripts/platform-audit.js
  • Cyclomatic Complexity · plan.createManifestInstallPlan (cyclomatic 27) scripts/lib/install/plan.js
  • Cyclomatic Complexity · validate-carrier-closure.extractReferences (cyclomatic 27) scripts/ci/validate-carrier-closure.js
  • Cyclomatic Complexity · validate-commands.validateCommands (cyclomatic 27) scripts/ci/validate-commands.js
  • Cyclomatic Complexity · codex-legacy-sync.rollbackLegacyCodexSync (cyclomatic 27) scripts/lib/codex-legacy-sync.js
  • Cyclomatic Complexity · context-selection.validateTask (cyclomatic 27) scripts/lib/context-selection.js
  • Cyclomatic Complexity · context-routing-index.readRoutingIndex (cyclomatic 27) scripts/lib/context-routing-index.js
  • Cyclomatic Complexity · governance-capture.analyzeForGovernanceEvents (cyclomatic 27) scripts/hooks/governance-capture.js
  • Cyclomatic Complexity · hookify-runtime.normalizeRule (cyclomatic 27) scripts/hooks/hookify-runtime.js
  • Cyclomatic Complexity · markdown.renderMarkdown (cyclomatic 27) scripts/lib/plan-canvas/markdown.js
  • Cyclomatic Complexity · profile.parseArgs (cyclomatic 27) scripts/profile.js
  • Cyclomatic Complexity · astra-review.parseArgs (cyclomatic 26) scripts/astra-review.js
  • Cyclomatic Complexity · antigravity-legacy-migration.cleanupLegacyAntigravityInstall (cyclomatic 26) scripts/lib/install/antigravity-legacy-migration.js
  • Cyclomatic Complexity · pre-bash-commit-quality.evaluate (cyclomatic 26) REDACTED
  • Cyclomatic Complexity · tracker.normalizeExecutionRecord (cyclomatic 26) scripts/lib/skill-evolution/tracker.js
  • Cyclomatic Complexity · shell-split.splitShellSegments (cyclomatic 26) scripts/lib/shell-split.js
  • Cyclomatic Complexity · session-start.selectMatchingSession (cyclomatic 26) scripts/hooks/session-start.js
  • Cyclomatic Complexity · server.createPlanCanvasServer.server (cyclomatic 26) REDACTED
  • Cyclomatic Complexity · release-video-suite.validateVideoArtifact (cyclomatic 26) scripts/release-video-suite.js
  • Cyclomatic Complexity · claude-settings.validateHookHandler (cyclomatic 25) scripts/lib/install/claude-settings.js
  • Cyclomatic Complexity · resolve-ecc-root.resolveEccRoot (cyclomatic 25) scripts/lib/resolve-ecc-root.js
  • Cyclomatic Complexity · preview-pack-smoke.buildReport (cyclomatic 25) scripts/preview-pack-smoke.js
  • Cyclomatic Complexity · receipt.verifyReceipt (cyclomatic 24) scripts/lib/eval-harness/receipt.js
  • Cyclomatic Complexity · agent-convert.main (cyclomatic 24) scripts/agent-convert.js
  • Cyclomatic Complexity · merge-codex-config.main (cyclomatic 24) scripts/codex/merge-codex-config.js
  • Cyclomatic Complexity · gateguard-search-filters.wildcardMatch (cyclomatic 24) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · insaits-security-wrapper.process.stdin.on("end") (cyclomatic 24) scripts/hooks/insaits-security-wrapper.js
  • Cyclomatic Complexity · mcp-health-check.attemptReconnect (cyclomatic 24) REDACTED
  • Cyclomatic Complexity · shadow-trail.normalizePayload (cyclomatic 24) scripts/lib/agent-proximity/shadow-trail.js
  • Cyclomatic Complexity · platform-audit.renderMarkdown (cyclomatic 24) scripts/platform-audit.js
  • Cyclomatic Complexity · work-items.main (cyclomatic 24) scripts/work-items.js
  • Cyclomatic Complexity · validate-workflow-security.findViolations (cyclomatic 23) scripts/ci/validate-workflow-security.js
  • Cyclomatic Complexity · generate-skill-triggers.main (cyclomatic 23) scripts/dev/generate-skill-triggers.js
  • Cyclomatic Complexity · claude-plugin-setup.runClaude (cyclomatic 23) scripts/lib/claude-plugin-setup.js
  • Cyclomatic Complexity · setup.main (cyclomatic 23) scripts/setup.js
  • Cyclomatic Complexity · multi-harness-setup.normalizeGuidedInstallRequest (cyclomatic 23) scripts/lib/multi-harness-setup.js
  • Cyclomatic Complexity · gateguard-eval.validateStep (cyclomatic 22) scripts/dev/gateguard-eval.js
  • Cyclomatic Complexity · powershell-destructive-command.isInvokedAfterContainer (cyclomatic 22) REDACTED
  • Cyclomatic Complexity · gateguard-change-profile.words (cyclomatic 22) scripts/lib/gateguard-change-profile.js
  • Cyclomatic Complexity · ecc-statusline.runStatusline (cyclomatic 22) scripts/hooks/ecc-statusline.js
  • Cyclomatic Complexity · hookify-runtime.run (cyclomatic 22) scripts/hooks/hookify-runtime.js
  • Cyclomatic Complexity · context-profile-native-executable.resolveExecutable (cyclomatic 21) scripts/lib/context-profile-native-executable.js
  • Cyclomatic Complexity · validate-skills.inspectFrontmatter (cyclomatic 21) scripts/ci/validate-skills.js
  • Cyclomatic Complexity · state.normalizeWorkItem (cyclomatic 21) scripts/lib/control-pane/state.js
  • Cyclomatic Complexity · control-plane-view.buildInventoryManifest (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js
  • Cyclomatic Complexity · control-plane-view.advisoryEvents (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js
  • Cyclomatic Complexity · control-plane-view.buildControlPlaneView (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js
  • Cyclomatic Complexity · dashboard-web.loadMcps (cyclomatic 21) REDACTED
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cyclomatic 21) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.findClosestMiss (cyclomatic 21) scripts/lib/gateguard-search-evidence.js
Rebuild cost: about €340,000 · Estimate
Cost to rebuild€110,000 to €560,000, for 1,864 to 5,914 hours of work, about 2.3 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.7 at a score of 52. 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: 180,209 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Raises the score by about 6 points · Low effort · Secret Scanning
2
Resolve the 1 finding(s) in Type Safety.
Raises the score by about 5 points · Medium effort · Type Safety
3
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with ecc_tui::main (cyclomatic 169), ecc_tui::tui::app::run (cyclomatic 79).
Raises the score by about 2 points · Medium effort · Cyclomatic Complexity

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 €340,000 to build again, about 2.3 person-years of work. Its weakest lens is Code Health, at 42 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 2 Secret Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 318,169 lines over the last 90 days, which is about 1,290,352 lines a year. At that pace, the extra work comes to an estimated 142.7 to 856.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

244 modules, with 83 dependencies between them. One loop runs through 6 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 204 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 .agents.skills.docs-governance.scripts.audit-docs2 ecc_tui.harness_eval3 ecc_tui.notifications4 ecc_tui.session.output5 integrations.aura6 skills.skill-comply.scripts.scenario_generator7 skills.taste-application.scripts.taste.cadence8 skills.taste-application.scripts.taste.grade9 skills.taste-application.scripts.taste.pack10 skills.taste-distillation.scripts.taste.cadence11 skills.taste-distillation.scripts.taste.grade12 skills.taste-distillation.scripts.taste.pack13 src.llm.core.types14 .agents.skills.docs-governance.scripts15 ecc_tui.config16 ecc_tui.session.store17 skills.skill-comply.scripts.runner18 skills.taste-application.scripts19 skills.taste-application.scripts.taste20 skills.taste-distillation.scripts21 skills.taste-distillation.scripts.taste22 src.llm.core.interface23 ecc_tui.comms24 ecc_tui.observability25 ecc_tui.session.daemon26 ecc_tui.tui.app27 ecc_tui.tui.widgets28 skills.skill-comply.scripts29 src.llm.providers30 src.llm.providers.astraflow31 src.llm.providers.atlas32 src.llm.providers.claude33 src.llm.providers.ollama34 src.llm.providers.openai35 ecc_tui.session36 ecc_tui.session.runtime37 ecc_tui.worktree38 ecc_tui.session.manager39 ecc_tui40 ecc_tui.tui.dashboard
1 .agents.skills.docs-governance.scripts.audit-docs
2 ecc_tui.harness_eval
3 ecc_tui.notifications
4 ecc_tui.session.output
5 integrations.aura
6 skills.skill-comply.scripts.scenario_generator
7 skills.taste-application.scripts.taste.cadence
8 skills.taste-application.scripts.taste.grade
9 skills.taste-application.scripts.taste.pack
10 skills.taste-distillation.scripts.taste.cadence
11 skills.taste-distillation.scripts.taste.grade
12 skills.taste-distillation.scripts.taste.pack
13 src.llm.core.types
14 .agents.skills.docs-governance.scripts1
15 ecc_tui.config3
16 ecc_tui.session.store32218
17 skills.skill-comply.scripts.runner1
18 skills.taste-application.scripts213
19 skills.taste-application.scripts.taste111
20 skills.taste-distillation.scripts112
21 skills.taste-distillation.scripts.taste111
22 src.llm.core.interface3
23 ecc_tui.comms11
24 ecc_tui.observability22
25 ecc_tui.session.daemon12
26 ecc_tui.tui.app11
27 ecc_tui.tui.widgets3
28 skills.skill-comply.scripts11
29 src.llm.providers31
30 src.llm.providers.astraflow31
31 src.llm.providers.atlas21
32 src.llm.providers.claude21
33 src.llm.providers.ollama21
34 src.llm.providers.openai21
35 ecc_tui.session111
36 ecc_tui.session.runtime31
37 ecc_tui.worktree11
38 ecc_tui.session.manager432141
39 ecc_tui81129
40 ecc_tui.tui.dashboard3346221365
Uses a module listed above itPart of a loopThe module itself
1 .agents.skills.docs-governance.scripts.audit-docs2 ecc_tui.harness_eval3 ecc_tui.notifications4 ecc_tui.session.output5 integrations.aura6 skills.skill-comply.scripts.scenario_generator7 skills.taste-application.scripts.taste.cadence8 skills.taste-application.scripts.taste.grade9 skills.taste-application.scripts.taste.pack10 skills.taste-distillation.scripts.taste.cadence11 skills.taste-distillation.scripts.taste.grade12 skills.taste-distillation.scripts.taste.pack13 src.llm.core.types14 .agents.skills.docs-governance.scripts15 ecc_tui.config16 ecc_tui.session.store17 skills.skill-comply.scripts.runner18 skills.taste-application.scripts19 skills.taste-application.scripts.taste20 skills.taste-distillation.scripts21 skills.taste-distillation.scripts.taste22 src.llm.core.interface23 ecc_tui.comms24 ecc_tui.observability25 ecc_tui.session.daemon26 ecc_tui.tui.app27 ecc_tui.tui.widgets28 skills.skill-comply.scripts29 src.llm.providers30 src.llm.providers.astraflow31 src.llm.providers.atlas32 src.llm.providers.claude33 src.llm.providers.ollama34 src.llm.providers.openai35 ecc_tui.session36 ecc_tui.session.runtime37 ecc_tui.worktree38 ecc_tui.session.manager39 ecc_tui40 ecc_tui.tui.dashboard.agents.skills.docs-governance.scripts.audit-docs1ecc_tui.harness_eval2ecc_tui.notifications3ecc_tui.session.output4integrations.aura5skills.skill-comply.scripts.scenario_generator6skills.taste-application.scripts.taste.cadence7skills.taste-application.scripts.taste.grade8skills.taste-application.scripts.taste.pack9skills.taste-distillation.scripts.taste.cadence10skills.taste-distillation.scripts.taste.grade11skills.taste-distillation.scripts.taste.pack12src.llm.core.types13.agents.skills.docs-governance.scripts14ecc_tui.config15ecc_tui.session.store16skills.skill-comply.scripts.runner17skills.taste-application.scripts18skills.taste-application.scripts.taste19skills.taste-distillation.scripts20skills.taste-distillation.scripts.taste21src.llm.core.interface22ecc_tui.comms23ecc_tui.observability24ecc_tui.session.daemon25ecc_tui.tui.app26ecc_tui.tui.widgets27skills.skill-comply.scripts28src.llm.providers29src.llm.providers.astraflow30src.llm.providers.atlas31src.llm.providers.claude32src.llm.providers.ollama33src.llm.providers.openai34ecc_tui.session35ecc_tui.session.runtime36ecc_tui.worktree37ecc_tui.session.manager38ecc_tui39ecc_tui.tui.dashboard40133221812131111121113112212113113131212121211113111432141811293346221365+204 more modules (most-connected shown)

At a glance — Code Health · 42% · Weak · gated by D2, R1, X4 ·

At a glance — Architecture · 92% · Exemplary ·

At a glance — Maturity · 95% · Exemplary ·

At a glance — Readiness · 48% · Weak · gated by D13, R4, P3, P7 ·

At a glance — Security · 66% · Adequate · gated by D29 ·

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

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
A05:2025 — Injection62High / Critical
A03:2025 — Software Supply Chain Failures15Medium
A07:2025 — Authentication Failures3High / Critical
A02:2025 — Security Misconfiguration3High / Critical

Roadmap

Top priorities: Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED; Resolve the 1 finding(s) in Type Safety; 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.

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

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.+6.0 ptsLowSecret Scanning
Resolve the 1 finding(s) in Type Safety.+5.0 ptsMediumType Safety
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with ecc_tui::main (cyclomatic 169), ecc_tui::tui::app::run (cyclomatic 79).+1.9 ptsMediumCyclomatic Complexity
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.+3.0 ptsMediumAsync & latency hygiene
Interpolated log message defeats structured logging+2.9 ptsMediumStructured logging
Bring the 7 bodies over 60 down to 60 or less in Cognitive Complexity — start with ecc_tui::main (cognitive 335), Dashboard::selected_session_metrics_text (cognitive 136), contract.validate_artifact_receipt (cognitive 109).+2.7 ptsHighCognitive Complexity
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+1.6 ptsMediumSecurity & performance tooling
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.+1.6 ptsMediumOutbound HTTP resilience

File quality

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

FileScoreBandWorst signal
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium CVE: REDACTED
ecc2/src/config/mod.rs5.9MixedGod Classes: FileTooLong: config/mod.rs
REDACTED6.1MixedCyclomatic Complexity: OllamaProvider.generate (cyclomatic 18)
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 22

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

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

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

Could not be resolved — 14

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

Methodology & how to trust this report

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

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

What we checked — 73 dimensions across the health lenses
D1D2D3D4D5D6D7D10D11D12D13D14D15D16D17D19D20D24D26D28D29D30D31D35D36D37D43D44AX10AX3AX4AX9ES2M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X13X16X17X19X2X21X23X24X25X28X29X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1d581-83c0-7c15-b05b-24ef638b999e.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .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 81.1% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 7,005 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 54 test source file(s) (.py, .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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the node:test suite in docker/context-profiles/complex-eval/cases3/chained-tickets/files/ was NOT MEASURED: the node:test run in docker/context-profiles/complex-eval/cases3/chained-tickets/files/ produced no per-test report (> test). 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the node:test suite in docker/context-profiles/complex-eval/cases4/chained-tickets/files/ was NOT MEASURED: the node:test run in docker/context-profiles/complex-eval/cases4/chained-tickets/files/ produced no per-test report (> test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D20 ADR Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover 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.
  • D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
  • D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 1856 commits in the last 90 days, yet 58 of 107 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). the app booted but exposed no published HTTP port — nothing to crawl (publish the web service's port to unlock runtime evidence).
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust, Swift, lua is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust, Swift, lua is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P7 Outbound HTTP resilience — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 64 further occurrence(s) are not listed individually; the score already reflects all 104.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 337 further occurrence(s) are not listed individually; the score already reflects all 377.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 712 further occurrence(s) are not listed individually; the score already reflects all 752.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 89 further occurrence(s) are not listed individually; the score already reflects all 129.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 216 further occurrence(s) are not listed individually; the score already reflects all 256.
  • X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X13 Undrained process stream — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X16 Unfloored truncation loop — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X17 Uncapped recursion over a caller-supplied document — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X19 Unrestored process-global state — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X23 Unguarded diagnostic materialisation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X25 Inert configuration knob — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 65 further occurrence(s) are not listed individually; the score already reflects all 105.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 58 further occurrence(s) are not listed individually; the score already reflects all 98.
  • X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 29 further occurrence(s) are not listed individually; the score already reflects all 69.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

119 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ecc_tui::main at 169. A further 2 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 Dashboard::empty_timeline_message at 24 — they are counted neither in the figure above nor in this dimension's score.

ecc_tui::main (cyclomatic 169) · ×9ecc2/src/main.rs:1479
Dashboard::selected_session_metrics_text (cyclomatic 54) · ×5ecc2/src/tui/dashboard.rs:6133
StateStore::ensure_session_columns (cyclomatic 41) · ×4REDACTED:565
(anonymous) (cyclomatic 35) · ×4docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26
markdown_links.inline_link_targets (cyclomatic 22) · ×3.agents/skills/docs-governance/scripts/markdown_links.py:77

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

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with ecc_tui::main (cyclomatic 169), ecc_tui::tui::app::run (cyclomatic 79). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 4.2 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

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

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

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

200 method(s) exceeded the cognitive complexity threshold of 15; the worst was ecc_tui::main at 335.

ecc_tui::main (cognitive 335) · ×23ecc2/src/main.rs:1479
Dashboard::selected_session_metrics_text (cognitive 136) · ×12ecc2/src/tui/dashboard.rs:6133
markdown_links.inline_link_targets (cognitive 43) · ×3.agents/skills/docs-governance/scripts/markdown_links.py:77
StateStore::ensure_session_columns (cognitive 40) · ×3REDACTED:565
module_audit.check_modules (cognitive 31) · ×3.agents/skills/docs-governance/scripts/module_audit.py:34

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

What to do

  1. Bring the 7 bodies over 60 down to 60 or less in Cognitive Complexity — start with ecc_tui::main (cognitive 335), Dashboard::selected_session_metrics_text (cognitive 136), contract.validate_artifact_receipt (cognitive 109). — 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 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes9.5 / 10Stronggated by 44 serious findings✓ 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 9.5 / 10 · rule-coverage 100% · ceiling Prevented

44 god class(es) detected.

FileTooLong: tui/dashboard.rs · ×15ecc2/src/tui/dashboard.rs
FunctionTooLong: ecc_tui::main · ×14ecc2/src/main.rs:1479
MethodTooLong: Dashboard.selected_session_metrics_text · ×9ecc2/src/tui/dashboard.rs:6133
ClassTooLong: Dashboard · ×2ecc2/src/tui/dashboard.rs:107
TooManyMethods: Dashboard · ×2ecc2/src/tui/dashboard.rs:107

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

What to do

  1. Resolve the 15 FileTooLong finding(s) in God Classes — start with mod.rs (3), audit-docs.py (3), dashboard.rs. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 14 FunctionTooLong finding(s) in God Classes — start with main.rs (6), manager.rs (4), run-intent.js. — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 9 MethodTooLong finding(s) in God Classes — start with dashboard.rs (5), REDACTED (4). — One of this dimension's main actionable groups (9 warning-level).

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

D4 · Code Duplication9.3 / 10Stronggated by 337 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.3 / 10 · rule-coverage 100% · ceiling Verified

251 duplicated block group(s) detected. A further 86 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .js (54% 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 (11 lines × 2) · ×12ecc2/src/main.rs:6599
Duplicated block (12 lines × 2) · ×10ecc2/src/main.rs:8527
Duplicated block (9 lines × 3) · ×10ecc2/src/main.rs:7888
Duplicated block (9 lines × 2) · ×10ecc2/src/main.rs:8540
Duplicated block (10 lines × 2) · ×9ecc2/src/main.rs:4682

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

What to do

  1. Resolve the 12 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with main.rs (2), mod.rs (2), REDACTED. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 10 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with main.rs (3), manager.rs, dashboard.rs. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 10 Duplicated block (9 lines × 3) finding(s) in Code Duplication — start with falapi.py (5), audit-docs.py (3), main.rs (2). — One of this dimension's main actionable groups (10 warning-level).

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 1 serious finding✓ 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.4 / 10 · rule-coverage 100% · ceiling Verified

1 of 20 classes have LCOM4 above 3.

Low cohesion: Config (LCOM4 4)ecc2/src/config/mod.rs:220

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

Detailed fixes: d7_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 10 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

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

No assertions: missing owned marker restores safely on reinstall · ×10tests/scripts/command-runtime.test.js:141
Skipped (documented): (unnamed test) · ×15tests/scripts/profile.test.js:198

What to do

  1. Resolve the 10 No assertions finding(s) in Test Quality — start with control-pane-contention.test.js (2), command-runtime.test.js, plan-canvas.test.js. — One of this dimension's main actionable groups (10 warning-level).

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 2 measured tier(s). JavaScript/TypeScript (node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/incident-triage/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/sentinel-api/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/webhook-relay/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/event-stats-api/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/forge-cli/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/keccak-selector/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/chained-tickets/files/; node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/production-ready/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/chained-tickets/files/; node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/production-ready/files/ (1 tests)): measured (0 flaky); Rust (ecc2, 14 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

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

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

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

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

Outdated: libc · ×7

✓ On the Gold path — maintain.

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

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

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

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

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

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

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

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

Top hotspots: scripts/hooks/gateguard-fact-force.js (57×69=3933); scripts/lib/install/apply.js (42×46=1932); scripts/hooks/block-no-verify.js (14×73=1022) Repeated repair below the complexity floor: scripts/lib/inspection.js (10 of 10 changes were fixes); scripts/lib/skill-evolution/versioning.js (9 of 9 changes were fixes); tests/run-all.js (8 of 11 changes were fixes)

Hotspot: scripts/hooks/gateguard-fact-force.js · ×62scripts/hooks/gateguard-fact-force.js:835
Repeated repair: scripts/lib/inspection.js · ×48scripts/lib/inspection.js:176

What to do

  1. Resolve the 62 Hotspot finding(s) in Churn × Complexity Hotspots — start with markdown_links.py (2), REDACTED (2), gateguard-fact-force.js. — One of this dimension's main actionable groups (62 warning-level).
  2. Resolve the 48 Repeated repair finding(s) in Churn × Complexity Hotspots — start with audit-docs.py (2), inspection.js, versioning.js. — One of this dimension's main actionable groups (48 warning-level).

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

D16 · Bus Factor8.8 / 10Strong✓ Tool-verified

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

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

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

13 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ecc2/src/tui/dashboard.rs. Counted over 107 of the 134 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 deducted task-comment markers across 76301 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

2 of 2 documentation facets pass in full. 1435 document(s) read across 28 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D24 · Comment Value6.5 6.3 / 10Adequate✓ Tool-verified

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

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

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

126 of 3586 judged comments only repeat the code they sit on (3.5 %). 155 comment(s) in another language or script were not judged.

redundant comment · ×26scripts/ci/validate-hooks.js:494
doc comments repeat the namesscripts/lib/package-manager.js:162

What to do

  1. Resolve the 26 redundant comment finding(s) in Comment Value — start with REDACTED (4), suggest-compact.test.js (3), project-detect.test.js (2). — One of this dimension's main actionable groups (26 recommendation-level).

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

D26 · Project Cohesion8.6 / 10Strong✓ Tool-verified

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

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

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

2 of 28 build units (Cargo, 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)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED

What to do

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

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

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

62 finding(s): 0 critical, 17 high, 42 medium, 3 low. semgrep hit a parse error in 12 file(s) — `.claude/homunculus/instincts/inherited/ecc-instincts.yaml`, `docker/context-profiles/ai-eval-lib.js`, `scripts/dev/gateguard-eval.js`, `scripts/hooks/gateguard-fact-force.js`, `scripts/hooks/run-with-flags-shell.sh` (line 28), … (+7 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 2 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

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

What to do

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

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

D30 · Dependency Vulnerabilities8.3 / 10Strong✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — 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.

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

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 14 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.

End-of-life runtime: Node.js 20.tool-versions:1

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .tool-versions. — One of this dimension's main actionable groups (1 warning-level).

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

Frontend & cross-cutting dimensions

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

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

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

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

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

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

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

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

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

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

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

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.

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)9.1 / 10Exemplary✓ Tool-verified

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

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

M2 · Architecture documentation10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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

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

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

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

P2 · Observability5.6 / 10Adequate✓ 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 2/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `docker/context-profiles/complex-eval/cases/sentinel-api/files`, `docker/context-profiles/complex-eval/cases/webhook-relay/files`, `docker/context-profiles/complex-eval/cases2/event-stats-api/files`, `docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files` and 3 more.

What to do

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

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

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

  • No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 15 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7

What to do

  • Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×40) — docker/context-profiles/complex-eval/calibrate-stats.js:56, docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:42, docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:69, …

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `fs.rmSync` in `anonymous function` 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. (×4) — docker/context-profiles/complex-eval/calibrate-stats.js:71, docker/context-profiles/complex-eval/calibrate-stats.js:72, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:74, …
  • `fs.readFileSync` in `callback to map` 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. — docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:50
  • `fs.readFileSync` in `anonymous function` 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. (×20) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:134, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:84, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87, …
  • `fs.readdirSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:137, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:105
  • `fs.readFileSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:140, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:108
  • `fs.readdirSync` in `anonymous function` 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. (×8) — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99, REDACTED:66, …
  • `fs.existsSync` in `callback to every` 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. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:92
  • `fs.mkdirSync` in `anonymous function` 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. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:84
  • `fs.writeFileSync` in `anonymous function` 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. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:85

What to do

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

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

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

  • 4 typed · 1011 plain JS — the untyped files are docker/context-profiles/ai-eval-lib.js, docker/context-profiles/ai-eval.js, docker/context-profiles/complex-eval/build-corpus.js, docker/context-profiles/complex-eval/calibrate-stats.js, docker/context-profiles/complex-eval/cases/incident-triage/check.cjs, docker/context-profiles/complex-eval/cases/incident-triage/files/src/inventory-client.js (+1005 more).
R10 · Code Duplication8.4 / 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.

  • docker/context-profiles/complex-eval/cases3/ and docker/context-profiles/complex-eval/cases4/ are near-verbatim copies of each other: 31 files are byte-identical under the same relative paths (~848 lines; the trees hold 32 and 48 files). That is one structural fact, not 31 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:1
  • docker/context-profiles/complex-eval/reference3/ and docker/context-profiles/complex-eval/reference4/ are near-verbatim copies of each other: 15 files are byte-identical under the same relative paths (~674 lines; the trees hold 15 and 21 files). That is one structural fact, not 15 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docker/context-profiles/complex-eval/reference3/chained-tickets/test/links.test.js:1
  • 24 duplicated blocks under docker/context-profiles/complex-eval/ have copies in at least two of the sibling directories cases, cases2, cases3, cases4, reference, reference2 (+2 more sibling(s) not listed) — 23 of them are reported below, and 1 is 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. — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4
  • 22 duplicated blocks under the repository root have copies in at least two of the sibling directories docker, scripts, skills — 19 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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. — docker/gateguard-effectiveness/run-intent.js:375
  • 18 duplicated blocks under scripts/ have copies in at least two of the sibling directories ci, codemaps, hooks, lib — 13 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 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. — scripts/hooks/ecc-context-monitor.js:64
  • 7 duplicated blocks under scripts/lib/ have copies in at least two of the sibling directories control-pane, eval-harness, install, install-targets, skill-evolution — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — scripts/lib/install-targets/claude-home.js:57
  • scripts/preview-pack-smoke.js:91 · scripts/release-approval-gate.js:104 — the two spans are one implementation copied and then locally edited — 1146 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. — scripts/preview-pack-smoke.js:91
  • scripts/lib/session-adapters/codex-worktree.js:12 · scripts/lib/session-adapters/opencode.js:12 — the two spans are one implementation copied and then locally edited — 1189 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. — scripts/lib/session-adapters/codex-worktree.js:12
  • docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 · docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:17 — the two spans are one implementation copied and then locally edited — 1314 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. — docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20
  • scripts/gemini-adapt-agents.js:31 · scripts/qwen-adapt-agents.js:55 — the two spans are one implementation copied and then locally edited — 791 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. — scripts/gemini-adapt-agents.js:31
  • docker/gateguard-effectiveness/run-intent.js:51 · docker/gateguard-effectiveness/run.js:36 — the two spans are one implementation copied and then locally edited — 1310 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. — docker/gateguard-effectiveness/run-intent.js:51
  • scripts/discussion-audit.js:217 · scripts/operator-readiness-dashboard.js:965 — the two spans are one implementation copied and then locally edited — 607 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. — scripts/discussion-audit.js:217
  • docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 · docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:4 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4
  • docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:5 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:4 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:3 — these 2 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3
  • docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 · docker/context-profiles/complex-eval/reference4/production-ready/src/app.js:2 — these 2 files are line-for-line copies of one another — 69 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2
  • scripts/discussion-audit.js:65 · scripts/platform-audit.js:77 — the two spans are one implementation copied and then locally edited — 428 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. — scripts/discussion-audit.js:65
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs:4 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4
  • REDACTED:29 · REDACTED:45 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:29
  • REDACTED:4 · REDACTED:4 — these 2 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:4
  • scripts/lib/install-targets/claude-home.js:15 · scripts/lib/install-targets/claude-project.js:12 — the two spans are one implementation copied and then locally edited — 326 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/lib/install-targets/claude-home.js:15
  • docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 · docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.js:2 — these 2 files are line-for-line copies of one another — 59 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2
  • docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/routes.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2
  • docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2
  • scripts/repair.js:20 · scripts/uninstall.js:30 — the two spans are one implementation copied and then locally edited — 407 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. — scripts/repair.js:20
  • REDACTED:251 · REDACTED: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. — REDACTED:251
  • docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/src/app.js:8 — 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. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8
  • scripts/lib/install/excluded-paths-reconciliation.js:116 · scripts/lib/install/opencode-legacy-migration.js:114 — the two spans are one implementation copied and then locally edited — 300 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. — scripts/lib/install/excluded-paths-reconciliation.js:116
  • docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/production-ready/files/src/app.js:8 — 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. — docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8
  • docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 · docker/context-profiles/complex-eval/reference/webhook-relay/src/app.js:34 — the two spans are one implementation copied and then locally edited — 328 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. — docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14
  • scripts/lib/shell-substitution.js:195 · scripts/lib/shell-substitution.js:287 — the two spans are one implementation copied and then locally edited — 258 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. — scripts/lib/shell-substitution.js:195
  • scripts/ci/issue-submission-guard.js:80 · scripts/ci/pr-burst-guard.js:179 — the two spans are one implementation copied and then locally edited — 390 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. — scripts/ci/issue-submission-guard.js:80
  • scripts/hooks/pre-bash-git-push-reminder.js:17 · scripts/hooks/pre-bash-tmux-reminder.js:22 — 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. — scripts/hooks/pre-bash-git-push-reminder.js:17
  • scripts/lib/install-targets/codebuddy-project.js:16 · scripts/lib/install-targets/joycode-project.js:16 · scripts/lib/install-targets/zed-project.js:16 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — scripts/lib/install-targets/codebuddy-project.js:16
  • scripts/lib/session-adapters/claude-history.js:120 · scripts/lib/session-adapters/codex-worktree.js:311 · scripts/lib/session-adapters/opencode.js:275 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — scripts/lib/session-adapters/claude-history.js:120
  • scripts/lib/github-discussions.js:15 · scripts/platform-audit.js:222 — 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. — scripts/lib/github-discussions.js:15
  • REDACTED:495 · REDACTED:584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:495
  • scripts/harness-audit.js:129 · scripts/observability-readiness.js:68 — the two spans are one implementation copied and then locally edited — 146 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. — scripts/harness-audit.js:129
  • scripts/operator-readiness-dashboard.js:29 · scripts/platform-audit.js:37 — 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. — scripts/operator-readiness-dashboard.js:29

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

  • docker/context-profiles/native-probe.js:71 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — docker/context-profiles/native-probe.js:71
  • docker/context-profiles/packed-smoke.js:11 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — docker/context-profiles/packed-smoke.js:11

What to do

  • Fix the listed violations: move the shared test helper into a source directory production code may depend on (2 rows).
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

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

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

  • runTests has cyclomatic complexity 280 and cognitive complexity 539; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/gateguard-fact-force.test.js:794
  • runTests has cyclomatic complexity 270 and cognitive complexity 529; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/hooks.test.js:389
  • runTests has cyclomatic complexity 197 and cognitive complexity 391; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/utils.test.js:30
  • runTests has cyclomatic complexity 180 and cognitive complexity 352; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/session-manager.test.js:42
  • runTests has cyclomatic complexity 119 and cognitive complexity 235; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/package-manager.test.js:77
  • runTests has cyclomatic complexity 117 and cognitive complexity 230; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/session-aliases.test.js:52
  • runTests has cyclomatic complexity 75 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/install-lifecycle.test.js:334
  • runTests has cyclomatic complexity 66 and cognitive complexity 129; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/hook-flags.test.js:64
  • resolveTaskContext has cyclomatic complexity 64 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/context-selection.js:333
  • runTests has cyclomatic complexity 62 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — tests/lib/install-targets.test.js:35, tests/lib/plan-canvas-markdown.test.js:26
  • validate has cyclomatic complexity 60 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/lib/install-state.js:43
  • runTests has cyclomatic complexity 53 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/scripts/install-apply.test.js:104
  • execute has cyclomatic complexity 52 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/context-profile-commands.js:81
  • handle has cyclomatic complexity 52 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/memory-mcp.mjs:365
  • validateInstallManifests has cyclomatic complexity 51 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/ci/validate-install-manifests.js:71
  • runTests has cyclomatic complexity 50 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/suggest-compact.test.js:90
  • runTests has cyclomatic complexity 48 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/selective-install.test.js:46
  • uninstallLegacyCodexSync has cyclomatic complexity 47 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/lib/codex-legacy-sync.js:521
  • (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27, docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27
  • main has cyclomatic complexity 46 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/codex/merge-mcp-config.js:207
  • parse has cyclomatic complexity 46 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/context-profile-commands.js:12
  • blankCommentsAndLiterals has cyclomatic complexity 45 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/ci/gateguard-env-documented.test.js:72
  • runTests has cyclomatic complexity 45 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — tests/lib/install-manifests.test.js:69, tests/lib/project-detect.test.js:57
  • runTests has cyclomatic complexity 44 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/lib/claude-settings.test.js:146
  • (anonymous) has cyclomatic complexity 44 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:195
  • handleApi has cyclomatic complexity 43 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. — REDACTED:398
  • applyInstallPlanLocked has cyclomatic complexity 43 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/lib/install/apply.js:808
  • runTests has cyclomatic complexity 42 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/pre-bash-dev-server-block.test.js:35
  • normalizeInstallRequest has cyclomatic complexity 41 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. — scripts/lib/install/request.js:101
  • push has cyclomatic complexity 40 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/hooks/hook-input-limits.js:33
  • transition has cyclomatic complexity 40 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/agent-proximity/shadow-trail.js:211
  • scanCurrentTurn 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. — scripts/lib/gateguard-turn-scan.js:101
  • buildChecks has cyclomatic complexity 39 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — scripts/observability-readiness.js:113
  • runTests has cyclomatic complexity 38 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/scripts/skill-create-output.test.js:50
  • parseArgs has cyclomatic complexity 38 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — docker/gateguard-effectiveness/run-intent.js:45
  • runTests has cyclomatic complexity 37 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/hooks/governance-capture.test.js:27
  • runTests has cyclomatic complexity 37 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/opencode-hook-consent-safety.test.js:169
R3 · Large Files9.9 / 10Exemplary✓ 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.

  • docker/context-profiles/ai-eval-lib.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — docker/context-profiles/ai-eval-lib.js:1
  • docker/gateguard-effectiveness/lib.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — docker/gateguard-effectiveness/lib.js:1

What to do

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

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

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

  • docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5
  • docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5
  • docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 imports '../src/charge.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6
  • 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. (×37) — skills/story-lifecycle/scripts/ledger.js:1, docker/gateguard-effectiveness/lib.js:1, docker/gateguard-effectiveness/run-intent.js:1, …

What to do

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

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

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

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

  • This repository declares test tooling, and the ✓ above records that declaration — but docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5
R7 · Dead Code9.9 / 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.

  • 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. — tests/integration/hooks.test.js:19
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

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

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

  • scripts/lib/context-profile-interactive.js → scripts/lib/context-profile-native.js → scripts/lib/context-profile-interactive.js — scripts/lib/context-profile-interactive.js:70

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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 document2.0 / 10Critical✓ Tool-verified

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

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

  • `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. (×3) — skills/taste-distillation/scripts/taste/falapi.py:357, skills/taste-application/scripts/falapi.py:357, skills/taste-application/scripts/taste/falapi.py:357
  • `validate` is public and takes `instance: Any` from its caller, and it calls itself at line 75 (`validate`) with a piece of `instance` (and at line 79, line 90) — and nowhere in `validate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `validate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — skills/taste-application/scripts/tasteforge/schema.py:75

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X19 · Unrestored process-global 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.2 / 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 1/5 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `measure` 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 })`. — docker/context-profiles/complex-eval/calibrate-stats.js:46
  • `query` 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 })`. — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:54
  • `waitForStatus` 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 })`. — docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:37
  • `createPaste` 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 })`. — docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:41

What to do

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

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

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

X23 · Unguarded diagnostic 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 unescaped4.3 / 10Weak✓ Tool-verified

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

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

  • `paste.content` is text this program did not author, and it is written into the text of an element 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. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:21

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.

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 handling5.0 / 10Weak✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×27) — skills/taste-distillation/scripts/taste/cadence.py:123, skills/taste-application/scripts/resolve_ingest.py:388, skills/taste-application/scripts/taste/cadence.py:123, …
  • `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. — skills/taste-application/scripts/resolve_ingest.py:269
  • `.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. (×3) — REDACTED:178, REDACTED:327, REDACTED:342
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — docker/gateguard-effectiveness/lib.js:208
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×8) — docker/context-profiles/complex-eval/cases4/recurring-incident/steps/03-handoff/check.cjs:40, docker/context-profiles/complex-eval/cases4/recurring-incident/steps/03-handoff/check.cjs:95, docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:86, …

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

  • `warning` at line 214 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. — skills/delivery-gate/hooks/quality-gate.py:214
  • `warn!` at line 4048 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`. — ecc2/src/main.rs:4048
  • `warn!` at line 268 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`. — ecc2/src/notifications.rs:268
  • `warn!` at line 305 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`. — ecc2/src/notifications.rs:305
  • `warn!` at line 333 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`. — ecc2/src/notifications.rs:333
  • `info!` at line 129 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`. — ecc2/src/worktree/mod.rs:129
  • `warn!` at line 142 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`. — ecc2/src/worktree/mod.rs:142
  • `warn!` at line 182 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`. — ecc2/src/worktree/mod.rs:182
  • `warn!` at line 188 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`. — ecc2/src/worktree/mod.rs:188
  • `warn!` at line 207 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`. — ecc2/src/worktree/mod.rs:207
  • `warn!` at line 210 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`. — ecc2/src/worktree/mod.rs:210
  • `warn!` at line 227 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`. — ecc2/src/worktree/mod.rs:227
  • `warn!` at line 987 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`. — ecc2/src/worktree/mod.rs:987
  • `warn!` at line 1017 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`. — ecc2/src/worktree/mod.rs:1017
  • `warn!` at line 1042 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`. — ecc2/src/worktree/mod.rs:1042
  • `warn!` at line 1112 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`. — ecc2/src/worktree/mod.rs:1112
  • `warn!` at line 1452 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`. — ecc2/src/worktree/mod.rs:1452
  • `warn!` at line 2183 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`. — ecc2/src/tui/dashboard.rs:2183
  • `warn!` at line 2217 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`. — ecc2/src/tui/dashboard.rs:2217
  • `warn!` at line 2249 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`. — ecc2/src/tui/dashboard.rs:2249
  • `warn!` at line 2386 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`. — ecc2/src/tui/dashboard.rs:2386
  • `warn!` at line 2414 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`. — ecc2/src/tui/dashboard.rs:2414
  • `warn!` at line 2445 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`. — ecc2/src/tui/dashboard.rs:2445
  • `warn!` at line 2521 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`. — ecc2/src/tui/dashboard.rs:2521
  • `warn!` at line 2540 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`. — ecc2/src/tui/dashboard.rs:2540
  • `warn!` at line 2559 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`. — ecc2/src/tui/dashboard.rs:2559
  • `warn!` at line 2693 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`. — ecc2/src/tui/dashboard.rs:2693
  • `warn!` at line 2736 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`. — ecc2/src/tui/dashboard.rs:2736
  • `warn!` at line 2790 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`. — ecc2/src/tui/dashboard.rs:2790
  • `warn!` at line 2839 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`. — ecc2/src/tui/dashboard.rs:2839
  • `warn!` at line 2898 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`. — ecc2/src/tui/dashboard.rs:2898
  • `warn!` at line 2944 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`. — ecc2/src/tui/dashboard.rs:2944
  • `warn!` at line 3011 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`. — ecc2/src/tui/dashboard.rs:3011
  • `warn!` at line 3033 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`. — ecc2/src/tui/dashboard.rs:3033
  • `warn!` at line 3059 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`. — ecc2/src/tui/dashboard.rs:3059
  • `warn!` at line 3088 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`. — ecc2/src/tui/dashboard.rs:3088
  • `warn!` at line 3161 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`. — ecc2/src/tui/dashboard.rs:3161
  • `warn!` at line 3208 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`. — ecc2/src/tui/dashboard.rs:3208
  • `warn!` at line 3221 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`. — ecc2/src/tui/dashboard.rs:3221
  • `warn!` at line 3732 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`. — ecc2/src/tui/dashboard.rs:3732

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types10.0 / 10Exemplary○ Nothing flagged

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.

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 Health42%Weak — gated by D2, R1, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%ExemplarySolid.
Maturity95%ExemplarySolid.
Readiness48%Weak — gated by D13, R4, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security66%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
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 — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 51 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
  • 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 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 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. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state 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
  • AX6 Interface segregation — no exported interface declares behaviour
  • 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 — the app booted but exposed no published HTTP port — nothing to crawl (publish the web service's port to unlock runtime evidence) This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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# and TypeScript only; JavaScript, Python, Rust, Swift not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .lua, .py, .swift, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • 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.
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 46 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
  • 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 — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 10 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — X27 reached only 42% of this repository's production lines — javascript (103,908 lines), typescript (616 lines), swift (226 lines), lua (102 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 22 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×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
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) scripts/lib/context-profile-interactive.js:70 — scripts/lib/context-profile-interactive.js → scripts/lib/context-profile-native.js → scripts/lib/context-profile-interactive.js
Serious — 1106 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×62
  • Hotspot: scripts/hooks/gateguard-fact-force.js scripts/hooks/gateguard-fact-force.js:835 — scripts/hooks/gateguard-fact-force.js changed 57 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in gateguard-fact-force.unwrapLeadWrappers at line 835. 41 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/gateguard-fact-force.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install/apply.js scripts/lib/install/apply.js:808 — scripts/lib/install/apply.js changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in apply.applyInstallPlanLocked at line 808. 39 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install/apply.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/hooks/block-no-verify.js scripts/hooks/block-no-verify.js:987 — scripts/hooks/block-no-verify.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in block-no-verify.checkCommand at line 987. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/block-no-verify.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ecc2/src/main.rs ecc2/src/main.rs:1479 — ecc2/src/main.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 169 in ecc_tui::main at line 1479. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- ecc2/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/context-selection.js scripts/lib/context-selection.js:333 — scripts/lib/context-selection.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in context-selection.resolveTaskContext at line 333. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/context-selection.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-lifecycle.js scripts/lib/install-lifecycle.js:1916 — scripts/lib/install-lifecycle.js changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in install-lifecycle.uninstallInstalledStates.results at line 1916. 22 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-lifecycle.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-manifests.js scripts/lib/install-manifests.js:557 — scripts/lib/install-manifests.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in install-manifests.resolveInstallPlan at line 557. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-manifests.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-state.js scripts/lib/install-state.js:43 — scripts/lib/install-state.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in install-state.createFallbackValidator.validate at line 43. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-state.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/codex-legacy-sync.js scripts/lib/codex-legacy-sync.js:521 — scripts/lib/codex-legacy-sync.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in codex-legacy-sync.uninstallLegacyCodexSync at line 521. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/codex-legacy-sync.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/state-store/index.js scripts/lib/state-store/index.js:214 — scripts/lib/state-store/index.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in index.wrapSqlJsDatabase at line 214. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/state-store/index.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/memory-mcp.mjs scripts/memory-mcp.mjs:365 — scripts/memory-mcp.mjs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in memory-mcp.createMemoryMcpService.handle at line 365. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/memory-mcp.mjs`: 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: skills/skill-comply/scripts/runner.py skills/skill-comply/scripts/runner.py:367 — skills/skill-comply/scripts/runner.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in runner._sandboxed_setup_command at line 367. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- skills/skill-comply/scripts/runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/install-apply.js scripts/install-apply.js:87 — scripts/install-apply.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in install-apply.printHumanPlan at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/install-apply.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: docker/gateguard-effectiveness/run-intent.js docker/gateguard-effectiveness/run-intent.js:216 — docker/gateguard-effectiveness/run-intent.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in run-intent.main at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- docker/gateguard-effectiveness/run-intent.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/dev/gateguard-eval.js scripts/dev/gateguard-eval.js:435 — scripts/dev/gateguard-eval.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in gateguard-eval.summarize at line 435. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/dev/gateguard-eval.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-targets/helpers.js scripts/lib/install-targets/helpers.js:370 — scripts/lib/install-targets/helpers.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in helpers.createInstallTargetAdapter at line 370. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-targets/helpers.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install/hook-consent.js scripts/lib/install/hook-consent.js:107 — scripts/lib/install/hook-consent.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in hook-consent.stripJsonc at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install/hook-consent.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/resolve-ecc-root.js scripts/lib/resolve-ecc-root.js:73 — scripts/lib/resolve-ecc-root.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in resolve-ecc-root.resolveEccRoot at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/resolve-ecc-root.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:492 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in powershell-destructive-command.expandStaticDoubleQuotedString at line 492. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05: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: REDACTED REDACTED:141 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in OllamaProvider.generate at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05: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: .agents/skills/docs-governance/scripts/markdown_links.py .agents/skills/docs-governance/scripts/markdown_links.py:77 — .agents/skills/docs-governance/scripts/markdown_links.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in markdown_links.inline_link_targets at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- .agents/skills/docs-governance/scripts/markdown_links.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: skills/docs-governance/scripts/markdown_links.py skills/docs-governance/scripts/markdown_links.py:77 — skills/docs-governance/scripts/markdown_links.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in markdown_links.inline_link_targets at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- skills/docs-governance/scripts/markdown_links.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1987 — REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in StateStore::sync_tool_activity_metrics at line 1987. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05: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: scripts/lib/install/plan.js scripts/lib/install/plan.js:261 — scripts/lib/install/plan.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in plan.createManifestInstallPlan at line 261. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install/plan.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/hooks/run-with-flags.js scripts/hooks/run-with-flags.js:196 — scripts/hooks/run-with-flags.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in run-with-flags.main at line 196. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/run-with-flags.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 37 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×48
  • Repeated repair: scripts/lib/inspection.js scripts/lib/inspection.js:176 — scripts/lib/inspection.js changed 10 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 inspection.suggestAction at line 176), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(inspection): normalize diagnostic-looking Windows filenames”; “fix(integration): address review findings in docs and diagnostics”; “fix: sort missing inspection dates after pre-epoch timestamps”; “fix: order failure pattern timestamps chronologically”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/inspection.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/skill-evolution/versioning.js scripts/lib/skill-evolution/versioning.js:348 — scripts/lib/skill-evolution/versioning.js changed 9 times in last 90 days and 9 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 versioning.rollbackTo at line 348), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: preflight and document snapshot storage capability”; “fix: normalize root overrides and report unverified snapshot staging”; “fix: preserve rollback version state and bounded runtime workflows”; “fix: publish rollback target snapshot before replacing live skill”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/skill-evolution/versioning.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: tests/run-all.js tests/run-all.js:196 — tests/run-all.js changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is reportTestFile at line 196), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: preserve activity errors, asset bytes and runner summaries”; “fix: complete reviewed integration workflows and safety checks”; “fix: restore unskipped installer refactor validation”; “fix: replace blanket ECC_TEST_ALLOW_FAILURES with targeted ECC_TEST_SKIP”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- tests/run-all.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-executor.js scripts/lib/install-executor.js:455 — scripts/lib/install-executor.js changed 9 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 13 (its worst body is install-executor.createLegacyInstallPlan at line 455), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: respect CLAUDE_CONFIG_DIR with WSL Windows-path conversion”; “fix(install): give Antigravity rules an activation trigger”; “fix(opencode): complete legacy root migration”; “fix(opencode): isolate explicit home contexts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-executor.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-targets/claude-home.js scripts/lib/install-targets/claude-home.js:17 — scripts/lib/install-targets/claude-home.js changed 8 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 7 (its worst body is claude-home.getClaudeManagedDestinationPath at line 17), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix CLAUDE_CONFIG_DIR tilde expansion, blank path fallback, and inline WSL resolver parity”; “fix: respect CLAUDE_CONFIG_DIR with WSL Windows-path conversion”; “fix: protect commands-only CommonJS runtime in Claude installs”; “fix(install): limit followup to target-compatible dependency resolution”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-targets/claude-home.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/session-end.js scripts/hooks/session-end.js:57 — scripts/hooks/session-end.js changed 8 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 14 (its worst body is session-end.collectEntry at line 57), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: preserve Windows rule examples and conservative summary budgets”; “fix: keep session summaries within the lifecycle deadline”; “fix(session-start): scope summary lookup to repository identity (#3160) (#3168)”; “fix(hooks): preserve metadata-marked human prompts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/session-end.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install/content-transform.js scripts/lib/install/content-transform.js:35 — scripts/lib/install/content-transform.js 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 15 (its worst body is content-transform.transformInstallContent at line 35), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep Copilot detector explanation aligned with installed workflow”; “fix: scope Copilot detector projection to the canonical TDD workflow”; “fix: close installed workflow and review publication gaps before integration”; “fix(install): give Antigravity rules an activation trigger”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install/content-transform.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/config-protection.js scripts/hooks/config-protection.js:173 — scripts/hooks/config-protection.js 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 7 (its worst body is config-protection.targetPaths at line 173), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(config-protection): check MultiEdit edits[].file_path targets”; “fix(hooks): recognize Prettier's TypeScript and JSON5 config files”; “fix(hooks): distinguish Biome configs from results files”; “fix(config-protection): cover the TypeScript and ESM config variants”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/config-protection.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: .agents/skills/docs-governance/scripts/audit-docs.py .agents/skills/docs-governance/scripts/audit-docs.py:522 — .agents/skills/docs-governance/scripts/audit-docs.py 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 15 (its worst body is audit-docs.check_adr_lifecycle at line 522), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: complete reviewed integration workflows and safety checks”; “fix(governance): require ADR successor”; “fix(governance): harden ADR audit boundaries”; “fix(governance): validate inline ADR successors”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- .agents/skills/docs-governance/scripts/audit-docs.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: skills/docs-governance/scripts/audit-docs.py skills/docs-governance/scripts/audit-docs.py:522 — skills/docs-governance/scripts/audit-docs.py 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 15 (its worst body is audit-docs.check_adr_lifecycle at line 522), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: complete reviewed integration workflows and safety checks”; “fix(governance): require ADR successor”; “fix(governance): harden ADR audit boundaries”; “fix(governance): validate inline ADR successors”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- skills/docs-governance/scripts/audit-docs.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: skills/skill-comply/scripts/classifier.py skills/skill-comply/scripts/classifier.py:67 — skills/skill-comply/scripts/classifier.py changed 6 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 12 (its worst body is classifier._parse_classification at line 67), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(skill-comply): send Unicode Claude prompts through stdin”; “fix: use UTF-8 throughout skill compliance workflows”; “fix: reject lossy classifier tool-call indices”; “fix: reject constant grader output and classify overflow errors”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- skills/skill-comply/scripts/classifier.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/transcript-context.js scripts/lib/transcript-context.js:142 — scripts/lib/transcript-context.js changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is transcript-context.resolveContextWindow at line 142), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(context): validate budgets and remind before native compaction”; “fix(hooks): let [1m] marker beat CLAUDE_CODE_AUTO_COMPACT_WINDOW”; “fix(hooks): preserve usage records at transcript tail boundaries”; “fix: close truth and portability review gaps”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/transcript-context.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/llm-summary.js scripts/lib/llm-summary.js:37 — scripts/lib/llm-summary.js 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 14 (its worst body is llm-summary.extractConversationText at line 37), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(summary): preserve work before the earlier compaction boundary”; “fix: preserve Windows rule examples and conservative summary budgets”; “fix: report explicitly disabled summaries as skipped”; “fix: keep session summaries within the lifecycle deadline”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/llm-summary.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/session-aliases.js scripts/lib/session-aliases.js:207 — scripts/lib/session-aliases.js 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 14 (its worst body is session-aliases.setAliasUnlocked at line 207), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(session-aliases): reject array-shaped alias maps”; “fix: validate session alias titles before saving”; “fix(state): retry Windows sharing reads without dropping published aliases”; “fix(sessions): preserve committed results on lock cleanup errors”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/session-aliases.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install/antigravity-rule.js scripts/lib/install/antigravity-rule.js:32 — scripts/lib/install/antigravity-rule.js 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 10 (its worst body is antigravity-rule.parseFrontmatter at line 32), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(install): reject blank quoted Antigravity triggers in the YAML fallback”; “fix(install): decide native Antigravity triggers from parsed YAML”; “fix(install): require a value before treating an Antigravity trigger as native”; “fix(install): pass native Antigravity rules through before YAML parsing”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install/antigravity-rule.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: docker/gateguard-effectiveness/coverage.js docker/gateguard-effectiveness/coverage.js:182 — docker/gateguard-effectiveness/coverage.js 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 14 (its worst body is coverage.renderHoles at line 182), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gateguard): make harness graders check content and count only valid trials”; “fix(gateguard): harden effectiveness evidence”; “fix(gateguard): enforce evaluation validity guards”; “fix(gateguard): do not charge the ungated arm with gate-specific holes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- docker/gateguard-effectiveness/coverage.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/llm/providers/reasoning.py src/llm/providers/reasoning.py:19 — src/llm/providers/reasoning.py 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 8 (its worst body is reasoning.strip_reasoning at line 19), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: require explicit reasoning format before stripping content”; “fix(llm): keep answers too deeply nested to parse whole in prefilled mode”; “fix(llm): fall back when a prefilled answer is too deeply nested to parse”; “fix(llm): keep complete JSON answers whole in prefilled reasoning mode”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- src/llm/providers/reasoning.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-targets/opencode-home.js scripts/lib/install-targets/opencode-home.js:26 — scripts/lib/install-targets/opencode-home.js 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 5 (its worst body is opencode-home.isExpectedType at line 26), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(opencode): preserve CommonJS runtime scope and user script ownership”; “fix: resolve installed OpenCode skill paths consistently”; “fix: resolve OpenCode source imports and installed skills paths”; “fix(release): clear final review blockers”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/install-targets/opencode-home.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/state-store/file-lock.js scripts/lib/state-store/file-lock.js:43 — scripts/lib/state-store/file-lock.js 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 14 (its worst body is file-lock.releaseOwnedLock at line 43), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(state-store): tolerate missing Windows lock device IDs”; “fix(state-store): keep cleanup diagnostics off caller errors”; “fix(state-store): preserve permission errors after lock retries”; “fix(state-store): retry Windows contention and repair fixtures”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/state-store/file-lock.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/posttooluse-dispatcher.js scripts/hooks/posttooluse-dispatcher.js:233 — scripts/hooks/posttooluse-dispatcher.js 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 14 (its worst body is posttooluse-dispatcher.runHooks at line 233), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): keep silent hook paths silent (#2987)”; “fix(hooks): harden Hookify rule enforcement”; “fix: close PowerShell destructive command gate bypass”; “fix(skill-evolution): wire Skill PostToolUse tracker so skill-health shows real runs (#2490)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/hooks/posttooluse-dispatcher.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: ecc2/src/config/mod.rs ecc2/src/config/mod.rs:799 — ecc2/src/config/mod.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 9 (its worst body is ResolvedAgentProfile::apply at line 799), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ecc2): report test config root cleanup failures instead of ignoring them”; “fix: reconcile stewardship batch on current main”; “fix(ecc2): also sandbox the legacy ~/.claude/ecc2.toml path under cfg(test)”; “fix(ecc2): sandbox Config::config_path() under cfg(test)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- ecc2/src/config/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: scripts/lib/nasiko-release.js scripts/lib/nasiko-release.js:253 — scripts/lib/nasiko-release.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is nasiko-release.inspectInstalledNasiko at line 253), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(nasiko): use descriptor lock identity”; “fix(nasiko): harden lifecycle recovery”; “fix: close Nasiko filesystem race windows”; “fix: harden Nasiko artifact lifecycle”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/nasiko-release.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:107 — REDACTED 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 catalog.parseReadmeExpectations at line 107), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(catalog): reject unmarked agent-tree skill undercounts”; “fix: complete reviewed integration workflows and safety checks”; “fix(ci): close catalog gate holes on README project tree”; “fix(ci): validate cross-harness catalog counts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05: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: scripts/lib/control-pane/proximity.js scripts/lib/control-pane/proximity.js:19 — scripts/lib/control-pane/proximity.js 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 14 (its worst body is proximity.decodeGitPath at line 19), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(proximity): decode quoted paths with precise line ranges”; “fix(proximity): isolate diff headers and preserve partial probes”; “fix(proximity): retain all tracked working-set paths”; “fix(proximity): observe uncommitted worktree changes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/control-pane/proximity.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/harness-capabilities.js scripts/lib/harness-capabilities.js:345 — scripts/lib/harness-capabilities.js 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 13 (its worst body is harness-capabilities.normalizeHarnessSelection at line 345), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(install): register AdaL capability metadata”; “fix(release): clear final review blockers”; “fix(release): make ECC 2.2 ready to publish”; “fix(install): harden ECC installer lifecycle”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 16:21:50 -05:00' --until='2026-11-06 16:21:50 -05:00' --full-history --no-merges -- scripts/lib/harness-capabilities.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 23 more in this group — see findings.md.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×40
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/calibrate-stats.js:56 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:42 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:69 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:70 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:71 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:75 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:78 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:82 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:89 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:102 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:110 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:113 — `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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:116 — `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 docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:32 — `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 docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:42 — `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 docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:105 — `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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:56 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:34 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:36 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:70 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:48 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:57 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:77 — `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 REDACTED:41 — `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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:42 — `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.
  • + 15 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking docker/context-profiles/complex-eval/calibrate-stats.js:71 — `fs.rmSync` in `anonymous function` 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 docker/context-profiles/complex-eval/calibrate-stats.js:72 — `fs.rmSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:50 — `fs.readFileSync` in `callback to map` 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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:134 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:137 — `fs.readdirSync` in `walk` 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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:140 — `fs.readFileSync` in `walk` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:84 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87 — `fs.readdirSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:92 — `fs.existsSync` in `callback to every` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:70 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:74 — `fs.rmSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:84 — `fs.mkdirSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:85 — `fs.writeFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:92 — `fs.rmSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:96 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99 — `fs.readdirSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99 — `fs.readFileSync` in `anonymous function` 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 REDACTED:66 — `fs.readdirSync` in `anonymous function` 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 REDACTED:67 — `fs.readFileSync` in `anonymous function` 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 REDACTED:73 — `fs.readFileSync` in `anonymous function` 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 REDACTED:76 — `fs.readdirSync` in `anonymous function` 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 REDACTED:76 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:75 — `fs.readFileSync` in `anonymous function` 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 docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:78 — `fs.readFileSync` in `anonymous function` 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.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×37
  • No test reaches this file skills/story-lifecycle/scripts/ledger.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 docker/gateguard-effectiveness/lib.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 docker/gateguard-effectiveness/run-intent.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 workflows/orch-review.workflow.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 docker/gateguard-effectiveness/coverage.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 docker/gateguard-effectiveness/run.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 skills/ck/commands/save.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 skills/ck/commands/migrate.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 skills/remotion-video-creation/rules/assets/charts-bar-chart.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 docker/context-profiles/native-probe.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 docker/gateguard-effectiveness/session.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 docker/gateguard-effectiveness/intent-eval.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 docker/context-profiles/complex-eval/cases4/production-ready/check.cjs: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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs: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 docker/context-profiles/packed-smoke.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 skills/ck/commands/init.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 docker/context-profiles/complex-eval/cases3/production-ready/check.cjs: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 docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs: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 docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs: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 docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs: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 docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs: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 docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs: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 docker/plugin-setup/interactive-plan.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.
  • + 12 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×30
  • Swallowed exception (empty catch) skills/taste-distillation/scripts/taste/cadence.py:123 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/taste-application/scripts/resolve_ingest.py:388 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/taste-application/scripts/taste/cadence.py:123 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/continuous-learning-v2/scripts/instinct-cli.py:41 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/ck/hooks/session-start.mjs:113 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/ck/commands/init.mjs:66 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/ck/commands/migrate.mjs:105 — 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:178 — `.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:327 — `.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:342 — `.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) docker/gateguard-effectiveness/scenarios-intent/retry-idempotency/grader.cjs:54 — 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) docker/gateguard-effectiveness/scenarios/no-duplicate-slug/grader.cjs:15 — 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) docker/gateguard-effectiveness/scenarios/local-callers-normalize/grader.cjs:25 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/gateguard-effectiveness/scenarios/importers-date-shape/grader.cjs:20 — 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) docker/context-profiles/ai-eval-lib.js:272 — 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) docker/context-profiles/ai-eval-lib.js:540 — 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) docker/context-profiles/complex-eval/reference4/chained-tickets/src/store.js:12 — 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) docker/context-profiles/complex-eval/reference3/chained-tickets/src/store.js:12 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/03-handoff/check.cjs:102 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:170 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:192 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:204 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:206 — 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) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:163 — 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.
  • + 5 more in this group — see findings.md.
D2 · Cognitive Complexity · ecc_tui · ×23
  • ecc_tui::main (cognitive 335) ecc2/src/main.rs:1479 — ecc_tui::main has cognitive complexity 335 (threshold 15). Drivers by points: if/else 149 (285 pts), loops 10 (32 pts), match/switch 7 (13 pts), boolean chains 5 (nesting depth added 164). 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.
  • ecc_tui::session::manager::enforce_conflict_resolution (cognitive 44) ecc2/src/session/manager.rs:1281 — ecc_tui::session::manager::enforce_conflict_resolution has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 4 (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.
  • ecc_tui::session::manager::build_agent_command (cognitive 40) ecc2/src/session/manager.rs:3097 — ecc_tui::session::manager::build_agent_command has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::tui::app::run (cognitive 38) ecc2/src/tui/app.rs:15 — ecc_tui::tui::app::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 3 (14 pts), boolean chains 1, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ecc_tui::session::manager::build_configured_harness_command (cognitive 36) ecc2/src/session/manager.rs:3219 — ecc_tui::session::manager::build_configured_harness_command has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::worktree::base_checkout_path (cognitive 27) ecc2/src/worktree/mod.rs:1571 — ecc_tui::worktree::base_checkout_path has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 4, 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.
  • ecc_tui::session::manager::rebalance_team_backlog (cognitive 26) ecc2/src/session/manager.rs:1074 — ecc_tui::session::manager::rebalance_team_backlog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::build_merge_queue (cognitive 26) ecc2/src/session/manager.rs:2136 — ecc_tui::session::manager::build_merge_queue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::build_legacy_migration_plan_report (cognitive 25) ecc2/src/main.rs:7314 — ecc_tui::build_legacy_migration_plan_report has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::build_legacy_remote_add_command (cognitive 24) ecc2/src/main.rs:7070 — ecc_tui::build_legacy_remote_add_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::process_merge_queue (cognitive 24) ecc2/src/session/manager.rs:1892 — ecc_tui::session::manager::process_merge_queue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (6 pts), loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::tui::dashboard::summarize_completion_decisions (cognitive 24) ecc2/src/tui/dashboard.rs:8896 — ecc_tui::tui::dashboard::summarize_completion_decisions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::parse_markdown_memory_sections (cognitive 23) ecc2/src/main.rs:3740 — ecc_tui::parse_markdown_memory_sections has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 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.
  • ecc_tui::format_merge_queue_human (cognitive 23) ecc2/src/main.rs:8259 — ecc_tui::format_merge_queue_human has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (7 pts) (nesting depth added 14). 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.
  • ecc_tui::import_legacy_remote_dispatch (cognitive 22) ecc2/src/main.rs:7155 — ecc_tui::import_legacy_remote_dispatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 5 (9 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::render_task_with_profile_projection (cognitive 22) ecc2/src/session/manager.rs:3497 — ecc_tui::session::manager::render_task_with_profile_projection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • ecc_tui::session::store::derive_board_conflict_signals (cognitive 20) REDACTED:4925 — ecc_tui::session::store::derive_board_conflict_signals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 7 (10 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.
  • ecc_tui::parse_dotenv_memory_entries (cognitive 19) ecc2/src/main.rs:3674 — ecc_tui::parse_dotenv_memory_entries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::import_legacy_schedules (cognitive 17) ecc2/src/main.rs:6053 — ecc_tui::import_legacy_schedules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::enforce_budget_hard_limits (cognitive 17) ecc2/src/session/manager.rs:1203 — ecc_tui::session::manager::enforce_budget_hard_limits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::worktree::detect_shared_dependency_strategies (cognitive 17) ecc2/src/worktree/mod.rs:1222 — ecc_tui::worktree::detect_shared_dependency_strategies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::handle_remote_dispatch_connection (cognitive 16) ecc2/src/main.rs:4055 — ecc_tui::handle_remote_dispatch_connection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 5 (8 pts) (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.
  • ecc_tui::tui::dashboard::build_worktree_diff_columns (cognitive 16) ecc2/src/tui/dashboard.rs:8186 — ecc_tui::tui::dashboard::build_worktree_diff_columns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FileTooLong · ×15
  • FileTooLong: tui/dashboard.rs ecc2/src/tui/dashboard.rs — FileTooLong — 6784 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: Dashboard (2 blocks, 107-7232), declaring 95 free functions. The bar is 500 significant lines; this is 6284 over it, 13.57× 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.rs ecc2/src/main.rs — FileTooLong — 6447 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 154 free functions. The bar is 500 significant lines; this is 5947 over it, 12.89× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4551 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: StateStore (3 blocks, 27-5863), declaring 42 free functions. The bar is 500 significant lines; this is 4051 over it, 9.10× 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: session/manager.rs ecc2/src/session/manager.rs — FileTooLong — 3187 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 109 free functions. The bar is 500 significant lines; this is 2687 over it, 6.37× 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: scripts/instinct-cli.py skills/continuous-learning-v2/scripts/instinct-cli.py — FileTooLong — 1593 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1093 over it, 3.19× 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: worktree/mod.rs ecc2/src/worktree/mod.rs — FileTooLong — 1167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 60 free functions. The bar is 500 significant lines; this is 667 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: context-profiles/ai-eval-lib.js docker/context-profiles/ai-eval-lib.js — FileTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 225 over it, 1.45× 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: tasteforge/workflow.py skills/taste-application/scripts/tasteforge/workflow.py — FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 204 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: config/mod.rs ecc2/src/config/mod.rs — FileTooLong — 674 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 174 over it, 1.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: ./ecc_dashboard.py ecc_dashboard.py — FileTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 152 over it, 1.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: scripts/audit-docs.py .agents/skills/docs-governance/scripts/audit-docs.py — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit-docs.py pi/core/skills/docs-governance/scripts/audit-docs.py — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit-docs.py skills/docs-governance/scripts/audit-docs.py — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: session/mod.rs ecc2/src/session/mod.rs — FileTooLong — 540 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 40 over it, 1.08× 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: scripts/memory-mcp.mjs scripts/memory-mcp.mjs — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D3 · God Classes · FunctionTooLong · ×14
  • FunctionTooLong: ecc_tui::main ecc2/src/main.rs:1479 — FunctionTooLong — ecc_tui::main runs 1228 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 1128 over it, 12.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: ecc_tui::build_legacy_migration_plan_report ecc2/src/main.rs:7314 — FunctionTooLong — ecc_tui::build_legacy_migration_plan_report runs 200 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 100 over it, 2.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: ecc_tui::build_legacy_migration_audit_report ecc2/src/main.rs:5172 — FunctionTooLong — ecc_tui::build_legacy_migration_audit_report runs 158 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 58 over it, 1.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: ecc_tui::handle_remote_dispatch_connection ecc2/src/main.rs:4055 — FunctionTooLong — ecc_tui::handle_remote_dispatch_connection runs 139 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 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: run-intent.main docker/gateguard-effectiveness/run-intent.js:216 — FunctionTooLong — main runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: ecc_tui::import_legacy_remote_dispatch ecc2/src/main.rs:7155 — FunctionTooLong — ecc_tui::import_legacy_remote_dispatch 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.
  • FunctionTooLong: ecc_tui::session::manager::build_merge_queue ecc2/src/session/manager.rs:2136 — FunctionTooLong — ecc_tui::session::manager::build_merge_queue 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.
  • FunctionTooLong: sandbox-smoke.smoke docker/context-profiles/sandbox-smoke.js:37 — FunctionTooLong — smoke runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::session::manager::enforce_conflict_resolution ecc2/src/session/manager.rs:1281 — FunctionTooLong — ecc_tui::session::manager::enforce_conflict_resolution runs 114 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 14 over it, 1.14× 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: ecc_tui::session::manager::assign_session_in_dir_with_runner_program ecc2/src/session/manager.rs:1574 — FunctionTooLong — ecc_tui::session::manager::assign_session_in_dir_with_runner_program runs 114 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 14 over it, 1.14× 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: ecc_tui::session::manager::launch_orchestration_template ecc2/src/session/manager.rs:619 — FunctionTooLong — ecc_tui::session::manager::launch_orchestration_template 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.
  • FunctionTooLong: ecc_tui::tui::app::run ecc2/src/tui/app.rs:15 — FunctionTooLong — ecc_tui::tui::app::run runs 107 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 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: memory-mcp.createMemoryMcpService scripts/memory-mcp.mjs:359 — FunctionTooLong — createMemoryMcpService runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • FunctionTooLong: ecc_tui::import_legacy_schedules ecc2/src/main.rs:6053 — FunctionTooLong — ecc_tui::import_legacy_schedules runs 102 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 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D2 · Cognitive Complexity · Dashboard · ×12
  • Dashboard::selected_session_metrics_text (cognitive 136) ecc2/src/tui/dashboard.rs:6133 — Dashboard::selected_session_metrics_text has cognitive complexity 136 (threshold 15). Drivers by points: if/else 44 (90 pts), loops 12 (45 pts), boolean chains 1 (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Dashboard::board_text (cognitive 70) ecc2/src/tui/dashboard.rs:6574 — Dashboard::board_text has cognitive complexity 70 (threshold 15). Drivers by points: if/else 30 (59 pts), loops 5 (11 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.
  • Dashboard::render_output (cognitive 32) ecc2/src/tui/dashboard.rs:850 — Dashboard::render_output has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::submit_spawn_prompt (cognitive 27) ecc2/src/tui/dashboard.rs:3631 — Dashboard::submit_spawn_prompt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 4 (7 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.
  • Dashboard::sync_session_state_notifications (cognitive 24) ecc2/src/tui/dashboard.rs:4210 — Dashboard::sync_session_state_notifications has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (7 pts), match/switch 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::output_title (cognitive 22) ecc2/src/tui/dashboard.rs:1005 — Dashboard::output_title has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::session_graph_recall_lines (cognitive 21) ecc2/src/tui/dashboard.rs:5448 — Dashboard::session_graph_recall_lines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::sync_selected_lineage (cognitive 19) ecc2/src/tui/dashboard.rs:4950 — Dashboard::sync_selected_lineage has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (4 pts), loops 1 (2 pts) (nesting depth added 10). 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.
  • Dashboard::metrics_line_count_before_delegates (cognitive 17) ecc2/src/tui/dashboard.rs:6013 — Dashboard::metrics_line_count_before_delegates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 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.
  • Dashboard::render_status_bar (cognitive 16) ecc2/src/tui/dashboard.rs:1442 — Dashboard::render_status_bar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 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.
  • Dashboard::sync_runtime_metrics (cognitive 16) ecc2/src/tui/dashboard.rs:4026 — Dashboard::sync_runtime_metrics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 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.
  • Dashboard::board_overlap_risks (cognitive 16) ecc2/src/tui/dashboard.rs:6785 — Dashboard::board_overlap_risks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) ecc2/src/main.rs:6599 — ecc2/src/main.rs:6599-6609 | ecc2/src/main.rs:6885-6895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6599` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) ecc2/src/worktree/mod.rs:710 — ecc2/src/worktree/mod.rs:710-720 | ecc2/src/worktree/mod.rs:1430-1440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/worktree/mod.rs:710` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:2446 — REDACTED:2446-2456 | REDACTED:2512-2522 — both copies are in the same file, so extract the 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) ecc2/src/session/manager.rs:4229 — ecc2/src/session/manager.rs:4229-4239 | ecc2/src/tui/dashboard.rs:8616-8626 — 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) ecc2/src/worktree/mod.rs:1067 — ecc2/src/worktree/mod.rs:1067-1077 | ecc2/src/worktree/mod.rs:1100-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/worktree/mod.rs:1067` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) ecc2/src/main.rs:1791 — ecc2/src/main.rs:1791-1801 | ecc2/src/main.rs:1939-1949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:1791` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) skills/taste-application/scripts/distill.py:470 — skills/taste-application/scripts/distill.py:470-480 | skills/taste-distillation/scripts/distill.py:470-480 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 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) src/llm/cli/selector.py:59 — src/llm/cli/selector.py:59-69 | src/llm/cli/selector.py:81-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/llm/tools/executor.py:66 — src/llm/tools/executor.py:66-76 | src/llm/tools/executor.py:95-105 — both copies are in the same file, so extract the 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) skills/taste-application/scripts/taste/plates.py:44 — skills/taste-application/scripts/taste/plates.py:44-54 | skills/taste-distillation/scripts/taste/plates.py:44-54 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) skills/taste-application/scripts/taste/render3d.py:264 — skills/taste-application/scripts/taste/render3d.py:264-274 | skills/taste-distillation/scripts/taste/render3d.py:264-274 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/llm/providers/astraflow.py:28 — src/llm/providers/astraflow.py:28-38 | src/llm/providers/atlas.py:29-39 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · No assertions · ×10
  • No assertions: missing owned marker restores safely on reinstall tests/scripts/command-runtime.test.js:141 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: (unnamed test) tests/scripts/plan-canvas.test.js:1005 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: fixture has no node_modules anywhere in its ancestor chain tests/scripts/plugin-install-without-node-modules.test.js:86 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: an eight-request burst caps live workers at two and rejects excess work without queuing tests/lib/control-pane-contention.test.js:303 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: a disconnected HTTP client retains its worker slot until actual exit tests/lib/control-pane-contention.test.js:304 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: buildOrchestrationPlan exposes shell-safe launcher aliases alongside raw defaults tests/lib/tmux-worktree-orchestrator.test.js:156 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: (unnamed test) tests/hooks/gateguard-fact-force.test.js:4050 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: hooks.json is valid JSON tests/hooks/hooks.test.js:2780 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: stop hook is a no-op when no accumulator exists tests/hooks/stop-format-typecheck.test.js:196 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: workflow IDs come from exact-path metadata and unrelated spoof results do not gate tests/ci/release-packed-artifact-workflow.test.js:330 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×10
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:8527 — ecc2/src/main.rs:8527-8538 | ecc2/src/tui/dashboard.rs:2949-2960 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:8527` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) ecc2/src/session/manager.rs:1604 — ecc2/src/session/manager.rs:1604-1615 | ecc2/src/session/manager.rs:3826-3837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/session/manager.rs:1604` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) ecc2/src/tui/dashboard.rs:2036 — ecc2/src/tui/dashboard.rs:2036-2047 | ecc2/src/tui/dashboard.rs:2083-2094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:2036` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:7373 — ecc2/src/main.rs:7373-7384 | ecc2/src/main.rs:7416-7427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:7373` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:3609 — ecc2/src/main.rs:3609-3620 | ecc2/src/main.rs:3632-3643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:3609` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:383 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:383-394 | skills/agent-self-evaluation/scripts/evaluate.py:383-394 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/render3d.py:278 — skills/taste-application/scripts/taste/render3d.py:278-289 | skills/taste-distillation/scripts/taste/render3d.py:278-289 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/plates.py:129 — skills/taste-application/scripts/taste/plates.py:129-140 | skills/taste-distillation/scripts/taste/plates.py:129-140 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/grade.py:248 — skills/taste-application/scripts/taste/grade.py:248-259 | skills/taste-distillation/scripts/taste/grade.py:248-259 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/pack.py:81 — skills/taste-application/scripts/taste/pack.py:81-92 | skills/taste-distillation/scripts/taste/pack.py:81-92 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×10
  • Duplicated block (9 lines × 3) ecc2/src/main.rs:7888 — ecc2/src/main.rs:7888-7896 | ecc2/src/main.rs:7918-7926 | ecc2/src/main.rs:7946-7954 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:7888` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `report` to `&LegacySkillImportReport` in one and `&LegacyToolImportReport` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) ecc2/src/main.rs:6372 — ecc2/src/main.rs:6372-6380 | ecc2/src/main.rs:6605-6613 | ecc2/src/main.rs:6891-6899 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6372` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:271 — .agents/skills/docs-governance/scripts/audit-docs.py:271-279 | pi/core/skills/docs-governance/scripts/audit-docs.py:271-279 | skills/docs-governance/scripts/audit-docs.py:271-279 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:114 — skills/taste-application/scripts/falapi.py:114-122 | skills/taste-application/scripts/taste/falapi.py:114-122 | skills/taste-distillation/scripts/taste/falapi.py:114-122 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:226 — skills/taste-application/scripts/falapi.py:226-234 | skills/taste-application/scripts/taste/falapi.py:226-234 | skills/taste-distillation/scripts/taste/falapi.py:226-234 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:615 — skills/taste-application/scripts/falapi.py:615-623 | skills/taste-application/scripts/taste/falapi.py:615-623 | skills/taste-distillation/scripts/taste/falapi.py:615-623 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:172 — .agents/skills/docs-governance/scripts/audit-docs.py:172-180 | pi/core/skills/docs-governance/scripts/audit-docs.py:172-180 | skills/docs-governance/scripts/audit-docs.py:172-180 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:441 — .agents/skills/docs-governance/scripts/audit-docs.py:441-449 | pi/core/skills/docs-governance/scripts/audit-docs.py:441-449 | skills/docs-governance/scripts/audit-docs.py:441-449 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:531 — skills/taste-application/scripts/falapi.py:531-539 | skills/taste-application/scripts/taste/falapi.py:531-539 | skills/taste-distillation/scripts/taste/falapi.py:531-539 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:543 — skills/taste-application/scripts/falapi.py:543-551 | skills/taste-application/scripts/taste/falapi.py:543-551 | skills/taste-distillation/scripts/taste/falapi.py:543-551 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:8540 — ecc2/src/main.rs:8540-8548 | ecc2/src/tui/dashboard.rs:2962-2970 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:8540` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:6816 — ecc2/src/main.rs:6816-6824 | ecc2/src/main.rs:7017-7025 — both copies are in the same file, so extract the 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) skills/continuous-learning-v2/scripts/instinct-cli.py:1466 — skills/continuous-learning-v2/scripts/instinct-cli.py:1466-1474 | skills/continuous-learning-v2/scripts/instinct-cli.py:1668-1676 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:545 — skills/taste-application/scripts/taste/grade.py:545-553 | skills/taste-distillation/scripts/taste/grade.py:545-553 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/distill.py:316 — skills/taste-application/scripts/distill.py:316-324 | skills/taste-distillation/scripts/distill.py:316-324 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/distill.py:304 — skills/taste-application/scripts/distill.py:304-312 | skills/taste-distillation/scripts/distill.py:304-312 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:114 — skills/taste-application/scripts/taste/grade.py:114-122 | skills/taste-distillation/scripts/taste/grade.py:114-122 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/distill.py:206 — skills/taste-application/scripts/distill.py:206-214 | skills/taste-distillation/scripts/distill.py:206-214 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:153 — skills/taste-application/scripts/taste/grade.py:153-161 | skills/taste-distillation/scripts/taste/grade.py:153-161 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/plates.py:80 — skills/taste-application/scripts/taste/plates.py:80-88 | skills/taste-distillation/scripts/taste/plates.py:80-88 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×10
  • Swallowed exception (caught, then discarded) skills/taste-application/scripts/resolve_ingest.py:269 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) docker/gateguard-effectiveness/lib.js:208 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/03-handoff/check.cjs:40 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/03-handoff/check.cjs:95 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:86 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:93 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:122 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:90 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:97 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:127 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
D1 · Cyclomatic Complexity · ecc_tui · ×9
  • ecc_tui::main (cyclomatic 169) ecc2/src/main.rs:1479 — ecc_tui::main has cyclomatic complexity 169 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::tui::app::run (cyclomatic 79) ecc2/src/tui/app.rs:15 — ecc_tui::tui::app::run has cyclomatic complexity 79 (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.
  • ecc_tui::build_legacy_migration_plan_report (cyclomatic 22) ecc2/src/main.rs:7314 — ecc_tui::build_legacy_migration_plan_report 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.
  • ecc_tui::session::manager::build_agent_command (cyclomatic 22) ecc2/src/session/manager.rs:3097 — ecc_tui::session::manager::build_agent_command 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.
  • ecc_tui::session::manager::build_configured_harness_command (cyclomatic 21) ecc2/src/session/manager.rs:3219 — ecc_tui::session::manager::build_configured_harness_command 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.
  • ecc_tui::build_legacy_remote_add_command (cyclomatic 20) ecc2/src/main.rs:7070 — ecc_tui::build_legacy_remote_add_command 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.
  • ecc_tui::session::manager::render_task_with_profile_projection (cyclomatic 19) ecc2/src/session/manager.rs:3497 — ecc_tui::session::manager::render_task_with_profile_projection 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.
  • ecc_tui::session::manager::enforce_conflict_resolution (cyclomatic 17) ecc2/src/session/manager.rs:1281 — ecc_tui::session::manager::enforce_conflict_resolution 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.
  • ecc_tui::worktree::base_checkout_path (cyclomatic 16) ecc2/src/worktree/mod.rs:1571 — ecc_tui::worktree::base_checkout_path has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D3 · God Classes · MethodTooLong · ×9
  • MethodTooLong: Dashboard.selected_session_metrics_text ecc2/src/tui/dashboard.rs:6133 — MethodTooLong — selected_session_metrics_text runs 316 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 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.init_schema REDACTED:218 — MethodTooLong — init_schema runs 294 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 194 over it, 2.94× 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: StateStore.ensure_session_columns REDACTED:565 — MethodTooLong — ensure_session_columns runs 210 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 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.board_text ecc2/src/tui/dashboard.rs:6574 — MethodTooLong — board_text runs 164 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 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.sync_tool_activity_metrics REDACTED:1987 — MethodTooLong — sync_tool_activity_metrics runs 156 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 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.new ecc2/src/tui/dashboard.rs:531 — MethodTooLong — new runs 120 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 20 over it, 1.20× 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: Dashboard.submit_spawn_prompt ecc2/src/tui/dashboard.rs:3631 — MethodTooLong — submit_spawn_prompt runs 117 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 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.sync_selected_lineage ecc2/src/tui/dashboard.rs:4950 — MethodTooLong — sync_selected_lineage runs 116 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 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.recall_context_entities REDACTED:3304 — MethodTooLong — recall_context_entities runs 107 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 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×9
  • Duplicated block (10 lines × 2) ecc2/src/main.rs:4682 — ecc2/src/main.rs:4682-4691 | ecc2/src/main.rs:4737-4746 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:4682` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `report` to `&WorktreeStatusReport` in one and `&WorktreeResolutionReport` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) ecc2/src/main.rs:6618 — ecc2/src/main.rs:6618-6627 | ecc2/src/main.rs:6904-6913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6618` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) ecc2/src/session/manager.rs:2643 — ecc2/src/session/manager.rs:2643-2652 | ecc2/src/session/manager.rs:2748-2757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/session/manager.rs:2639` calls `Some`, `as_ref`, `upsert_session_profile` and `ecc2/src/session/manager.rs:2746` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) REDACTED:2760 — REDACTED:2760-2769 | REDACTED:2777-2786 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:5211 — REDACTED:5211-5220 | REDACTED:5464-5473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) REDACTED:4652 — REDACTED:4652-4661 | ecc2/src/tui/dashboard.rs:8605-8614 — 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) ecc2/src/tui/dashboard.rs:3297 — ecc2/src/tui/dashboard.rs:3297-3306 | ecc2/src/tui/dashboard.rs:3321-3330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:3297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) ecc_dashboard.py:630 — ecc_dashboard.py:630-639 | ecc_dashboard.py:680-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) skills/taste-application/scripts/taste/frames.py:86 — skills/taste-application/scripts/taste/frames.py:86-95 | skills/taste-distillation/scripts/taste/frames.py:86-95 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) ecc2/src/main.rs:5011 — ecc2/src/main.rs:5011-5018 | ecc2/src/main.rs:5081-5088 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/main.rs:5008` calls `Some`, `push` and `ecc2/src/main.rs:5080` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) REDACTED:962 — REDACTED:962-969 | REDACTED:1854-1861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:962` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ecc2/src/tui/dashboard.rs:1255 — ecc2/src/tui/dashboard.rs:1255-1262 | ecc2/src/tui/dashboard.rs:1290-1297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `lines` to `&[&OutputLine]` in one and `&[GraphDisplayLine]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ecc2/src/tui/dashboard.rs:1264` calls `selected_session_id` and `ecc2/src/tui/dashboard.rs:1299` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) ecc2/src/main.rs:5818 — ecc2/src/main.rs:5818-5825 | ecc2/src/main.rs:5912-5919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:5818` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ecc2/src/session/manager.rs:2667 — ecc2/src/session/manager.rs:2667-2674 | ecc2/src/session/manager.rs:2768-2775 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/session/manager.rs:2667` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/grade.py:103 — skills/taste-application/scripts/taste/grade.py:103-110 | skills/taste-distillation/scripts/taste/grade.py:103-110 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/plates.py:58 — skills/taste-application/scripts/taste/plates.py:58-65 | skills/taste-distillation/scripts/taste/plates.py:58-65 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/frames.py:136 — skills/taste-application/scripts/taste/frames.py:136-143 | skills/taste-distillation/scripts/taste/frames.py:136-143 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/frames.py:326 — skills/taste-application/scripts/taste/frames.py:326-333 | skills/taste-distillation/scripts/taste/frames.py:326-333 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×9
  • Duplicated block (7 lines × 2) ecc2/src/session/manager.rs:1595 — ecc2/src/session/manager.rs:1595-1601 | ecc2/src/session/manager.rs:3817-3823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:989 — REDACTED:989-995 | REDACTED:2935-2941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:989` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) ecc2/src/tui/dashboard.rs:1022 — ecc2/src/tui/dashboard.rs:1022-1028 | ecc2/src/tui/dashboard.rs:1087-1093 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:1022` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) ecc2/src/tui/dashboard.rs:6459 — ecc2/src/tui/dashboard.rs:6459-6465 | ecc2/src/tui/dashboard.rs:6476-6482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:6459` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) ecc2/src/worktree/mod.rs:297 — ecc2/src/worktree/mod.rs:297-303 | ecc2/src/worktree/mod.rs:313-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. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/worktree/mod.rs:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:5320 — REDACTED:5320-5326 | REDACTED:5363-5369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:5327` calls `parse_store_timestamp` and `REDACTED:5371` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/taste/cadence.py:244 — skills/taste-application/scripts/taste/cadence.py:244-250 | skills/taste-distillation/scripts/taste/cadence.py:244-250 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 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) skills/taste-application/scripts/taste/pack.py:147 — skills/taste-application/scripts/taste/pack.py:147-153 | skills/taste-distillation/scripts/taste/pack.py:147-153 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/taste/timeline.py:240 — skills/taste-application/scripts/taste/timeline.py:240-246 | skills/taste-distillation/scripts/taste/timeline.py:240-246 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 244 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×8
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:4070 — ecc2/src/main.rs:4070-4082 | ecc2/src/main.rs:4147-4159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:6643 — ecc2/src/main.rs:6643-6655 | ecc2/src/main.rs:6929-6941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6643` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:2042 — ecc2/src/main.rs:2042-2054 | ecc2/src/main.rs:2079-2091 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:2042` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:2343 — ecc2/src/main.rs:2343-2355 | ecc2/src/main.rs:2433-2445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:2343` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:137 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:137-149 | skills/agent-self-evaluation/scripts/evaluate.py:137-149 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/taste/frames.py:28 — skills/taste-application/scripts/taste/frames.py:28-40 | skills/taste-distillation/scripts/taste/frames.py:28-40 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/taste/render3d.py:76 — skills/taste-application/scripts/taste/render3d.py:76-88 | skills/taste-distillation/scripts/taste/render3d.py:76-88 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/taste/grade.py:126 — skills/taste-application/scripts/taste/grade.py:126-138 | skills/taste-distillation/scripts/taste/grade.py:126-138 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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 (5 lines × 2) · ×8
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:8070 — ecc2/src/main.rs:8070-8074 | ecc2/src/tui/dashboard.rs:5489-5493 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:8070` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:4249 — REDACTED:4249-4253 | REDACTED:4285-4289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:6496 — ecc2/src/main.rs:6496-6500 | ecc2/src/main.rs:6764-6768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6496` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) ecc_dashboard.py:437 — ecc_dashboard.py:437-441 | ecc_dashboard.py:550-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) skills/continuous-learning-v2/scripts/instinct-cli.py:759 — skills/continuous-learning-v2/scripts/instinct-cli.py:759-764 | skills/continuous-learning-v2/scripts/instinct-cli.py:1318-1322 — both copies are in the same file, so extract the 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) skills/taste-application/scripts/tasteforge/media/glitch.py:218 — skills/taste-application/scripts/tasteforge/media/glitch.py:218-222 | skills/taste-application/scripts/tasteforge/media/stills.py:90-94 — 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) skills/taste-application/scripts/taste/grade.py:537 — skills/taste-application/scripts/taste/grade.py:537-541 | skills/taste-distillation/scripts/taste/grade.py:537-541 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/pack.py:139 — skills/taste-application/scripts/taste/pack.py:139-143 | skills/taste-distillation/scripts/taste/pack.py:139-143 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D30 · Dependency Vulnerabilities · Medium CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) ecc2/src/main.rs:1770 — ecc2/src/main.rs:1770-1783 | ecc2/src/main.rs:1998-2011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:1770` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/main.rs:1997` calls `short_session` and `ecc2/src/main.rs:1769` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) ecc2/src/tui/dashboard.rs:8189 — ecc2/src/tui/dashboard.rs:8189-8202 | ecc2/src/tui/dashboard.rs:8253-8266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:8189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) ecc2/src/main.rs:6735 — ecc2/src/main.rs:6735-6748 | ecc2/src/main.rs:6990-7003 — both copies are in the same file, so extract the 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) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:366 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:366-379 | skills/agent-self-evaluation/scripts/evaluate.py:366-379 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) skills/videodb/scripts/ws_listener.py:161 — skills/videodb/scripts/ws_listener.py:161-174 | skills/videodb/scripts/ws_listener.py:211-224 — both copies are in the same file, so extract the 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) skills/taste-application/scripts/taste/render3d.py:142 — skills/taste-application/scripts/taste/render3d.py:142-155 | skills/taste-distillation/scripts/taste/render3d.py:142-155 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) skills/taste-application/scripts/mint.py:180 — skills/taste-application/scripts/mint.py:180-193 | skills/taste-distillation/scripts/mint.py:180-193 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 133 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 (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) ecc2/src/main.rs:2057 — ecc2/src/main.rs:2057-2062 | ecc2/src/main.rs:2097-2102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:2057` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) ecc_dashboard.py:416 — ecc_dashboard.py:416-421 | ecc_dashboard.py:527-532 — both copies are in the same file, so extract the 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) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:153 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:153-158 | skills/agent-self-evaluation/scripts/evaluate.py:153-158 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/mint.py:129 — skills/taste-application/scripts/mint.py:129-134 | skills/taste-distillation/scripts/mint.py:129-134 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 133 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) skills/taste-application/scripts/taste/plates.py:241 — skills/taste-application/scripts/taste/plates.py:241-246 | skills/taste-distillation/scripts/taste/plates.py:241-246 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/frames.py:99 — skills/taste-application/scripts/taste/frames.py:99-104 | skills/taste-distillation/scripts/taste/frames.py:99-104 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/frames.py:192 — skills/taste-application/scripts/taste/frames.py:192-197 | skills/taste-distillation/scripts/taste/frames.py:192-197 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×6
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:166 — skills/taste-application/scripts/falapi.py:166-171 | skills/taste-application/scripts/taste/falapi.py:166-171 | skills/taste-distillation/scripts/taste/falapi.py:166-171 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:186 — skills/taste-application/scripts/falapi.py:186-191 | skills/taste-application/scripts/taste/falapi.py:186-191 | skills/taste-distillation/scripts/taste/falapi.py:186-191 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:645 — skills/taste-application/scripts/falapi.py:645-650 | skills/taste-application/scripts/taste/falapi.py:645-650 | skills/taste-distillation/scripts/taste/falapi.py:645-650 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/taste/timeline.py:105 — skills/taste-application/scripts/taste/timeline.py:105-114 | skills/taste-application/scripts/tasteforge/timeline.py:54-59 | skills/taste-distillation/scripts/taste/timeline.py:105-114 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:212 — .agents/skills/docs-governance/scripts/audit-docs.py:212-217 | pi/core/skills/docs-governance/scripts/audit-docs.py:212-217 | skills/docs-governance/scripts/audit-docs.py:212-217 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:555 — skills/taste-application/scripts/falapi.py:555-560 | skills/taste-application/scripts/taste/falapi.py:555-560 | skills/taste-distillation/scripts/taste/falapi.py:555-560 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D1 · Cyclomatic Complexity · Dashboard · ×5
  • Dashboard::selected_session_metrics_text (cyclomatic 54) ecc2/src/tui/dashboard.rs:6133 — Dashboard::selected_session_metrics_text 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.
  • Dashboard::board_text (cyclomatic 30) ecc2/src/tui/dashboard.rs:6574 — Dashboard::board_text 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.
  • Dashboard::render_output (cyclomatic 18) ecc2/src/tui/dashboard.rs:850 — Dashboard::render_output has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (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.
  • Dashboard::sync_session_state_notifications (cyclomatic 16) ecc2/src/tui/dashboard.rs:4210 — Dashboard::sync_session_state_notifications 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 is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (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.
  • Dashboard::metrics_line_count_before_delegates (cyclomatic 16) ecc2/src/tui/dashboard.rs:6013 — Dashboard::metrics_line_count_before_delegates 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 is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (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.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×5
  • Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/grade.py:263 — skills/taste-application/scripts/taste/grade.py:263-266 | skills/taste-distillation/scripts/taste/grade.py:263-266 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/llm/providers/model_config.py:7 — src/llm/providers/model_config.py:7-11 | src/llm/providers/resolver.py:40-43 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/pack.py:161 — skills/taste-application/scripts/taste/pack.py:161-164 | skills/taste-distillation/scripts/taste/pack.py:161-164 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/pack.py:123 — skills/taste-application/scripts/taste/pack.py:123-126 | skills/taste-distillation/scripts/taste/pack.py:123-126 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) skills/taste-application/scripts/taste/grade.py:592 — skills/taste-application/scripts/taste/grade.py:592-595 | skills/taste-distillation/scripts/taste/grade.py:592-595 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×5
  • Duplicated block (20 lines × 2) ecc2/src/main.rs:4092 — ecc2/src/main.rs:4092-4111 | ecc2/src/main.rs:4169-4188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:4092` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) ecc2/src/main.rs:4126 — ecc2/src/main.rs:4126-4145 | ecc2/src/main.rs:4206-4225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:4126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) skills/taste-application/scripts/taste/frames.py:113 — skills/taste-application/scripts/taste/frames.py:113-132 | skills/taste-distillation/scripts/taste/frames.py:113-132 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) skills/taste-application/scripts/taste/timeline.py:393 — skills/taste-application/scripts/taste/timeline.py:393-412 | skills/taste-distillation/scripts/taste/timeline.py:393-412 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 244 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 (20 lines × 2) skills/taste-application/scripts/taste/cadence.py:197 — skills/taste-application/scripts/taste/cadence.py:197-216 | skills/taste-distillation/scripts/taste/cadence.py:197-216 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×5
  • Duplicated block (15 lines × 2) ecc2/src/session/manager.rs:218 — ecc2/src/session/manager.rs:218-232 | ecc2/src/session/manager.rs:405-419 — both copies are in the same file, so extract the 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) ecc2/src/session/manager.rs:1803 — ecc2/src/session/manager.rs:1803-1817 | ecc2/src/session/manager.rs:1837-1851 — both copies are in the same file, so extract the 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) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:398 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:398-412 | skills/agent-self-evaluation/scripts/evaluate.py:398-412 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 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 (15 lines × 2) skills/taste-application/scripts/distill.py:188 — skills/taste-application/scripts/distill.py:188-202 | skills/taste-distillation/scripts/distill.py:188-202 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/taste/timeline.py:438 — skills/taste-application/scripts/taste/timeline.py:438-452 | skills/taste-distillation/scripts/taste/timeline.py:438-452 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 244 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) ecc2/src/main.rs:6348 — ecc2/src/main.rs:6348-6358 | ecc2/src/main.rs:6581-6591 | ecc2/src/main.rs:6867-6877 — 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 (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:365 — .agents/skills/docs-governance/scripts/audit-docs.py:365-375 | pi/core/skills/docs-governance/scripts/audit-docs.py:365-375 | skills/docs-governance/scripts/audit-docs.py:365-375 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:379 — .agents/skills/docs-governance/scripts/audit-docs.py:379-389 | pi/core/skills/docs-governance/scripts/audit-docs.py:379-389 | skills/docs-governance/scripts/audit-docs.py:379-389 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) skills/taste-application/scripts/falapi.py:401 — skills/taste-application/scripts/falapi.py:401-411 | skills/taste-application/scripts/taste/falapi.py:401-411 | skills/taste-distillation/scripts/taste/falapi.py:401-411 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:223 — .agents/skills/docs-governance/scripts/audit-docs.py:223-233 | pi/core/skills/docs-governance/scripts/audit-docs.py:223-233 | skills/docs-governance/scripts/audit-docs.py:223-233 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×5
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:486 — .agents/skills/docs-governance/scripts/audit-docs.py:486-507 | pi/core/skills/docs-governance/scripts/audit-docs.py:486-507 | skills/docs-governance/scripts/audit-docs.py:486-507 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:28 — .agents/skills/docs-governance/scripts/markdown_links.py:28-49 | pi/core/skills/docs-governance/scripts/markdown_links.py:28-49 | skills/docs-governance/scripts/markdown_links.py:28-49 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:53 — .agents/skills/docs-governance/scripts/markdown_links.py:53-74 | pi/core/skills/docs-governance/scripts/markdown_links.py:53-74 | skills/docs-governance/scripts/markdown_links.py:53-74 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) skills/taste-application/scripts/falapi.py:252 — skills/taste-application/scripts/falapi.py:252-273 | skills/taste-application/scripts/taste/falapi.py:252-273 | skills/taste-distillation/scripts/taste/falapi.py:252-273 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:181 — .agents/skills/docs-governance/scripts/markdown_links.py:181-202 | pi/core/skills/docs-governance/scripts/markdown_links.py:181-202 | skills/docs-governance/scripts/markdown_links.py:181-202 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `.agents/skills/docs-governance/scripts/markdown_links.py:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · StateStore · ×4
  • StateStore::ensure_session_columns (cyclomatic 41) REDACTED:565 — StateStore::ensure_session_columns has cyclomatic complexity 41 (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.
  • StateStore::evaluate_promote_and_health_check (cyclomatic 17) REDACTED:5670 — StateStore::evaluate_promote_and_health_check has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • StateStore::sync_tool_activity_metrics (cyclomatic 16) REDACTED:1987 — StateStore::sync_tool_activity_metrics 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.
  • StateStore::verify_harness_audit_entry (cyclomatic 16) REDACTED:5795 — StateStore::verify_harness_audit_entry has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 35) · ×4
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (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.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (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.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (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.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (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.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) ecc2/src/main.rs:8632 — ecc2/src/main.rs:8632-8646 | ecc2/src/tui/dashboard.rs:7412-7432 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) ecc2/src/worktree/mod.rs:292 — ecc2/src/worktree/mod.rs:292-306 | ecc2/src/worktree/mod.rs:308-322 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) ecc_dashboard.py:476 — ecc_dashboard.py:476-496 | ecc_dashboard.py:597-613 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) ecc2/src/session/mod.rs:34 — ecc2/src/session/mod.rs:34-48 | ecc2/src/session/mod.rs:50-64 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) ecc2/src/main.rs:6513 — ecc2/src/main.rs:6513-6529 | ecc2/src/main.rs:6797-6813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6513` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/main.rs:6794` calls `starts_with` and `ecc2/src/main.rs:6512` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) ecc2/src/session/manager.rs:1660 — ecc2/src/session/manager.rs:1660-1676 | ecc2/src/session/manager.rs:3880-3896 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/session/manager.rs:1660` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) skills/taste-application/scripts/taste/grade.py:309 — skills/taste-application/scripts/taste/grade.py:309-325 | skills/taste-distillation/scripts/taste/grade.py:309-325 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) skills/taste-application/scripts/taste/grade.py:289 — skills/taste-application/scripts/taste/grade.py:289-305 | skills/taste-distillation/scripts/taste/grade.py:289-305 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) ecc2/src/session/manager.rs:1641 — ecc2/src/session/manager.rs:1641-1656 | ecc2/src/session/manager.rs:3854-3869 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/session/manager.rs:1641` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) ecc2/src/tui/dashboard.rs:2742 — ecc2/src/tui/dashboard.rs:2742-2757 | ecc2/src/tui/dashboard.rs:2796-2811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:2742` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) skills/taste-application/scripts/taste/assemble.py:178 — skills/taste-application/scripts/taste/assemble.py:178-193 | skills/taste-distillation/scripts/taste/assemble.py:178-193 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) skills/taste-application/scripts/taste/plates.py:104 — skills/taste-application/scripts/taste/plates.py:104-119 | skills/taste-distillation/scripts/taste/plates.py:104-119 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/plates.py:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) ecc2/src/main.rs:3131 — ecc2/src/main.rs:3131-3144 | ecc2/src/main.rs:3284-3297 | ecc2/src/main.rs:3443-3456 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/main.rs:3128` calls `open`, `with_context`, `display` and `ecc2/src/main.rs:3282` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) ecc2/src/tui/dashboard.rs:2370 — ecc2/src/tui/dashboard.rs:2370-2383 | ecc2/src/tui/dashboard.rs:2398-2411 | ecc2/src/tui/dashboard.rs:2429-2442 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:2370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:283 — .agents/skills/docs-governance/scripts/audit-docs.py:283-296 | pi/core/skills/docs-governance/scripts/audit-docs.py:283-296 | skills/docs-governance/scripts/audit-docs.py:283-296 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) src/llm/providers/astraflow.py:81 — src/llm/providers/astraflow.py:81-94 | src/llm/providers/atlas.py:98-111 | src/llm/providers/openai.py:104-117 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/llm/providers/astraflow.py:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×4
  • Duplicated block (12 lines × 3) ecc2/src/tui/dashboard.rs:2857 — ecc2/src/tui/dashboard.rs:2857-2868 | ecc2/src/tui/dashboard.rs:2905-2916 | ecc2/src/tui/dashboard.rs:2972-2983 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:677 — .agents/skills/docs-governance/scripts/audit-docs.py:677-688 | pi/core/skills/docs-governance/scripts/audit-docs.py:677-688 | skills/docs-governance/scripts/audit-docs.py:677-688 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 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 (12 lines × 3) skills/taste-application/scripts/falapi.py:739 — skills/taste-application/scripts/falapi.py:739-750 | skills/taste-application/scripts/taste/falapi.py:739-750 | skills/taste-distillation/scripts/taste/falapi.py:739-750 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 3) skills/taste-application/scripts/falapi.py:195 — skills/taste-application/scripts/falapi.py:195-206 | skills/taste-application/scripts/taste/falapi.py:195-206 | skills/taste-distillation/scripts/taste/falapi.py:195-206 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×4
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-distillation/scripts/taste/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/tasteforge/schema.py:75 — `validate` is public and takes `instance: Any` from its caller, and it calls itself at line 75 (`validate`) with a piece of `instance` (and at line 79, line 90) — and nowhere in `validate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `validate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/taste/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X2 · Cancellation propagation · Async function without AbortSignal · ×4
  • Async function without AbortSignal: measure docker/context-profiles/complex-eval/calibrate-stats.js:46 — `measure` 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: query docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:54 — `query` 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: waitForStatus docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:37 — `waitForStatus` 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: createPaste docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:41 — `createPaste` 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 })`.
D1 · Cyclomatic Complexity · markdown_links.inline_link_targets (cyclomatic 22) · ×3
  • markdown_links.inline_link_targets (cyclomatic 22) .agents/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets 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.
  • markdown_links.inline_link_targets (cyclomatic 22) pi/core/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets 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.
  • markdown_links.inline_link_targets (cyclomatic 22) skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets 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.
D2 · Cognitive Complexity · markdown_links.inline_link_targets (cognitive 43) · ×3
  • markdown_links.inline_link_targets (cognitive 43) .agents/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • markdown_links.inline_link_targets (cognitive 43) pi/core/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • markdown_links.inline_link_targets (cognitive 43) skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StateStore · ×3
  • StateStore::ensure_session_columns (cognitive 40) REDACTED:565 — StateStore::ensure_session_columns has cognitive complexity 40 (threshold 15). Drivers by points: if/else 40. 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.
  • StateStore::sync_tool_activity_metrics (cognitive 29) REDACTED:1987 — StateStore::sync_tool_activity_metrics has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • StateStore::list_file_overlaps (cognitive 18) REDACTED:4395 — StateStore::list_file_overlaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · module_audit.check_modules (cognitive 31) · ×3
  • module_audit.check_modules (cognitive 31) .agents/skills/docs-governance/scripts/module_audit.py:34 — module_audit.check_modules has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (6 pts), boolean chains 3 (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.
  • module_audit.check_modules (cognitive 31) pi/core/skills/docs-governance/scripts/module_audit.py:34 — module_audit.check_modules has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (6 pts), boolean chains 3 (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.
  • module_audit.check_modules (cognitive 31) skills/docs-governance/scripts/module_audit.py:34 — module_audit.check_modules has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (6 pts), boolean chains 3 (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 · audit-docs.check_adr_lifecycle (cognitive 23) · ×3
  • audit-docs.check_adr_lifecycle (cognitive 23) .agents/skills/docs-governance/scripts/audit-docs.py:522 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_adr_lifecycle (cognitive 23) pi/core/skills/docs-governance/scripts/audit-docs.py:522 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_adr_lifecycle (cognitive 23) skills/docs-governance/scripts/audit-docs.py:522 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_spine_paths (cognitive 18) · ×3
  • audit-docs.check_spine_paths (cognitive 18) .agents/skills/docs-governance/scripts/audit-docs.py:299 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_spine_paths (cognitive 18) pi/core/skills/docs-governance/scripts/audit-docs.py:299 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_spine_paths (cognitive 18) skills/docs-governance/scripts/audit-docs.py:299 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · falapi._mesh_url (cognitive 18) · ×3
  • falapi._mesh_url (cognitive 18) skills/taste-application/scripts/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • falapi._mesh_url (cognitive 18) skills/taste-application/scripts/taste/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • falapi._mesh_url (cognitive 18) skills/taste-distillation/scripts/taste/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×3
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:53 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, error handling 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, error handling 7, ternaries 2, loops 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, error handling 7, ternaries 2, loops 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_markdown_links (cognitive 17) · ×3
  • audit-docs.check_markdown_links (cognitive 17) .agents/skills/docs-governance/scripts/audit-docs.py:246 — audit-docs.check_markdown_links has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_markdown_links (cognitive 17) pi/core/skills/docs-governance/scripts/audit-docs.py:246 — audit-docs.check_markdown_links has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_markdown_links (cognitive 17) skills/docs-governance/scripts/audit-docs.py:246 — audit-docs.check_markdown_links has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_status_resurrection (cognitive 17) · ×3
  • audit-docs.check_status_resurrection (cognitive 17) .agents/skills/docs-governance/scripts/audit-docs.py:332 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_status_resurrection (cognitive 17) pi/core/skills/docs-governance/scripts/audit-docs.py:332 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_status_resurrection (cognitive 17) skills/docs-governance/scripts/audit-docs.py:332 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:2688 — REDACTED:2688-2717 | REDACTED:2723-2752 | REDACTED:2788-2814 | REDACTED:2816-2843 — 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) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49-91 | pi/core/skills/agent-self-evaluation/scripts/evaluate.py:203-243 | skills/agent-self-evaluation/scripts/evaluate.py:49-91 | skills/agent-self-evaluation/scripts/evaluate.py:203-243 — 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) skills/taste-application/scripts/taste/grade.py:212 — skills/taste-application/scripts/taste/grade.py:212-237 | skills/taste-application/scripts/taste/grade.py:607-639 | skills/taste-distillation/scripts/taste/grade.py:212-237 | skills/taste-distillation/scripts/taste/grade.py:607-639 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 22+ corresponding lines) skills/taste-application/scripts/taste/timeline.py:161 — skills/taste-application/scripts/taste/timeline.py:161-198 | skills/taste-application/scripts/tasteforge/timeline.py:83-104 | skills/taste-distillation/scripts/taste/timeline.py:161-198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 22+ corresponding lines) ecc2/src/main.rs:6461 — ecc2/src/main.rs:6461-6482 | ecc2/src/main.rs:6732-6759 | ecc2/src/main.rs:6987-7014 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 22+ corresponding lines) ecc2/src/main.rs:3599 — ecc2/src/main.rs:3599-3620 | ecc2/src/main.rs:3622-3643 | ecc2/src/main.rs:3649-3672 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) REDACTED:4137 — REDACTED:4137-4155 | REDACTED:4162-4178 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) ecc2/src/tui/dashboard.rs:8099 — ecc2/src/tui/dashboard.rs:8099-8115 | ecc2/src/tui/dashboard.rs:8117-8133 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:4562 — REDACTED:4562-4587 | REDACTED:4589-4605 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×3
  • Edited copy of a member (14 corresponding lines) src/llm/providers/astraflow.py:56 — src/llm/providers/astraflow.py:56-69 | src/llm/providers/atlas.py:65-82 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) ecc2/src/notifications.rs:152 — ecc2/src/notifications.rs:152-165 | ecc2/src/notifications.rs:241-254 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) ecc2/src/main.rs:6009 — ecc2/src/main.rs:6009-6023 | ecc2/src/session/manager.rs:2385-2398 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 4+ corresponding lines) .agents/skills/docs-governance/scripts/module_audit.py:28 — .agents/skills/docs-governance/scripts/module_audit.py:28-31 | pi/core/skills/docs-governance/scripts/module_audit.py:28-31 | skills/docs-governance/scripts/module_audit.py:28-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) skills/taste-application/scripts/taste/timeline.py:250 — skills/taste-application/scripts/taste/timeline.py:250-253 | skills/taste-application/scripts/tasteforge/export.py:83-86 | skills/taste-distillation/scripts/taste/timeline.py:250-253 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) skills/taste-application/scripts/falapi.py:627 — skills/taste-application/scripts/falapi.py:627-630 | skills/taste-application/scripts/taste/falapi.py:627-630 | skills/taste-distillation/scripts/taste/falapi.py:627-630 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) ecc2/src/tui/dashboard.rs:1818 — ecc2/src/tui/dashboard.rs:1818-1835 | ecc2/src/tui/dashboard.rs:1855-1872 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:1818` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: `ecc2/src/tui/dashboard.rs:1855` is reached only past a guard at line 1845 that tests `self.cfg.pane_layout` and leaves the function early, and `ecc2/src/tui/dashboard.rs:1818` reads `self.cfg.pane_layout` with no such check. What separates these copies is not which lines they run but which PRECONDITION they enforce, so one of them is operating on state the other one refuses. Decide which is intended BEFORE unifying them — extract the shared part and whichever copy is missing the check keeps running unchecked, and if the guard is the correct behaviour then that hole is already live.
  • Duplicated block (18 lines × 2) hooks/hermes/check-console-log.py:31 — hooks/hermes/check-console-log.py:31-48 | hooks/hermes/config-protection.py:47-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) skills/taste-application/scripts/distill.py:388 — skills/taste-application/scripts/distill.py:388-405 | skills/taste-distillation/scripts/distill.py:388-405 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 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 (38 lines × 2) · ×3
  • Duplicated block (38 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:162 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:162-199 | skills/agent-self-evaluation/scripts/evaluate.py:162-199 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (38 lines × 2) src/llm/providers/astraflow.py:86 — src/llm/providers/astraflow.py:86-123 | src/llm/providers/atlas.py:103-140 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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 (38 lines × 2) skills/taste-application/scripts/taste/frames.py:205 — skills/taste-application/scripts/taste/frames.py:205-242 | skills/taste-distillation/scripts/taste/frames.py:205-242 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×3
  • Duplicated block (25 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:120 — .agents/skills/docs-governance/scripts/audit-docs.py:120-144 | pi/core/skills/docs-governance/scripts/audit-docs.py:120-144 | skills/docs-governance/scripts/audit-docs.py:120-144 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:335 — .agents/skills/docs-governance/scripts/audit-docs.py:335-359 | pi/core/skills/docs-governance/scripts/audit-docs.py:335-359 | skills/docs-governance/scripts/audit-docs.py:335-359 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 3) skills/taste-application/scripts/falapi.py:340 — skills/taste-application/scripts/falapi.py:340-364 | skills/taste-application/scripts/taste/falapi.py:340-364 | skills/taste-distillation/scripts/taste/falapi.py:340-364 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 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 (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/distill.py:116 — skills/taste-application/scripts/distill.py:116-140 | skills/taste-distillation/scripts/distill.py:116-140 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/taste/cadence.py:72 — skills/taste-application/scripts/taste/cadence.py:72-96 | skills/taste-distillation/scripts/taste/cadence.py:72-96 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/taste/grade.py:342 — skills/taste-application/scripts/taste/grade.py:342-366 | skills/taste-distillation/scripts/taste/grade.py:342-366 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×3
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:91 — .agents/skills/docs-governance/scripts/audit-docs.py:91-111 | pi/core/skills/docs-governance/scripts/audit-docs.py:91-111 | skills/docs-governance/scripts/audit-docs.py:91-111 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:148 — .agents/skills/docs-governance/scripts/audit-docs.py:148-168 | pi/core/skills/docs-governance/scripts/audit-docs.py:148-168 | skills/docs-governance/scripts/audit-docs.py:148-168 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:188 — .agents/skills/docs-governance/scripts/audit-docs.py:188-208 | pi/core/skills/docs-governance/scripts/audit-docs.py:188-208 | skills/docs-governance/scripts/audit-docs.py:188-208 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:705 — .agents/skills/docs-governance/scripts/audit-docs.py:705-714 | pi/core/skills/docs-governance/scripts/audit-docs.py:705-714 | skills/docs-governance/scripts/audit-docs.py:705-714 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 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 (10 lines × 3) skills/taste-application/scripts/falapi.py:662 — skills/taste-application/scripts/falapi.py:662-671 | skills/taste-application/scripts/taste/falapi.py:662-671 | skills/taste-distillation/scripts/taste/falapi.py:662-671 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 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 (10 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:692 — .agents/skills/docs-governance/scripts/audit-docs.py:692-701 | pi/core/skills/docs-governance/scripts/audit-docs.py:692-701 | skills/docs-governance/scripts/audit-docs.py:692-701 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:83 — .agents/skills/docs-governance/scripts/audit-docs.py:83-87 | pi/core/skills/docs-governance/scripts/audit-docs.py:83-87 | skills/docs-governance/scripts/audit-docs.py:83-87 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/falapi.py:238 — skills/taste-application/scripts/falapi.py:238-242 | skills/taste-application/scripts/taste/falapi.py:238-242 | skills/taste-distillation/scripts/taste/falapi.py:238-242 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/taste/timeline.py:118 — skills/taste-application/scripts/taste/timeline.py:118-134 | skills/taste-application/scripts/tasteforge/timeline.py:63-67 | skills/taste-distillation/scripts/taste/timeline.py:118-134 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
R4 · Test Coverage · This test file cannot be loaded · ×3
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 — docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 — docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 imports '../src/charge.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 47) · ×2
  • (anonymous) (cyclomatic 47) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 (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.
  • (anonymous) (cyclomatic 47) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 (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 · (anonymous) (cyclomatic 20) · ×2
  • (anonymous) (cyclomatic 20) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cyclomatic 20) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous) (cognitive 50) · ×2
  • (anonymous) (cognitive 50) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cognitive complexity 50 (threshold 15). Drivers by points: error handling 11 (20 pts), boolean chains 16, if/else 8 (11 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 50) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cognitive complexity 50 (threshold 15). Drivers by points: error handling 11 (20 pts), boolean chains 16, if/else 8 (11 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 48) · ×2
  • (anonymous) (cognitive 48) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cognitive complexity 48 (threshold 15). Drivers by points: error handling 14 (26 pts), boolean chains 13, loops 4 (7 pts), if/else 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.
  • (anonymous) (cognitive 48) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cognitive complexity 48 (threshold 15). Drivers by points: error handling 14 (26 pts), boolean chains 13, loops 4 (7 pts), if/else 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 43) · ×2
  • (anonymous) (cognitive 43) docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: error handling 15 (25 pts), boolean chains 13, loops 2 (3 pts), if/else 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.
  • (anonymous) (cognitive 43) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:26 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: error handling 15 (25 pts), boolean chains 13, loops 2 (3 pts), if/else 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 · distill.validate_spec (cognitive 24) · ×2
  • distill.validate_spec (cognitive 24) skills/taste-application/scripts/distill.py:143 — distill.validate_spec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 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.
  • distill.validate_spec (cognitive 24) skills/taste-distillation/scripts/distill.py:143 — distill.validate_spec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · grade.transfer (cognitive 23) · ×2
  • grade.transfer (cognitive 23) skills/taste-application/scripts/taste/grade.py:397 — grade.transfer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • grade.transfer (cognitive 23) skills/taste-distillation/scripts/taste/grade.py:397 — grade.transfer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate.format_report (cognitive 19) · ×2
  • evaluate.format_report (cognitive 19) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:304 — evaluate.format_report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 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.
  • evaluate.format_report (cognitive 19) skills/agent-self-evaluation/scripts/evaluate.py:304 — evaluate.format_report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 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 · distill.describe (cognitive 18) · ×2
  • distill.describe (cognitive 18) skills/taste-application/scripts/distill.py:327 — distill.describe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • distill.describe (cognitive 18) skills/taste-distillation/scripts/distill.py:327 — distill.describe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · distill.extract_json (cognitive 16) · ×2
  • distill.extract_json (cognitive 16) skills/taste-application/scripts/distill.py:80 — distill.extract_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • distill.extract_json (cognitive 16) skills/taste-distillation/scripts/distill.py:80 — distill.extract_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: Dashboard ecc2/src/tui/dashboard.rs:107 — ClassTooLong — 4883 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 214 methods, 2 blocks, lines 107-7232. The bar is 400 significant lines; this is 4483 over it, 12.21× 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: StateStore REDACTED:27 — ClassTooLong — 3735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 118 methods, 3 blocks, lines 27-5863. The bar is 400 significant lines; this is 3335 over it, 9.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: Dashboard ecc2/src/tui/dashboard.rs:107 — TooManyMethods — 214 methods. The bar is 30 methods; this is 184 over it, 7.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: StateStore REDACTED:27 — TooManyMethods — 118 methods. The bar is 30 methods; this is 88 over it, 3.93× 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.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: Dashboard ecc2/src/tui/dashboard.rs:107 — TooManyFields — 75 stored fields beside 214 methods. The bar is 30 stored fields; this is 45 over it, 2.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: Config ecc2/src/config/mod.rs:220 — TooManyFields — 33 stored fields beside 19 methods. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) ecc2/src/main.rs:3166 — ecc2/src/main.rs:3166-3225 | ecc2/src/main.rs:3319-3376 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) ecc2/src/tui/dashboard.rs:2824 — ecc2/src/tui/dashboard.rs:2824-2881 | ecc2/src/tui/dashboard.rs:2929-3002 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) skills/taste-application/scripts/taste/grade.py:126 — skills/taste-application/scripts/taste/grade.py:126-141 | skills/taste-distillation/scripts/taste/grade.py:126-141 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:2754 — REDACTED:2754-2769 | REDACTED:2771-2786 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) REDACTED:4227 — REDACTED:4227-4273 | REDACTED:4275-4303 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) ecc2/src/main.rs:8596 — ecc2/src/main.rs:8596-8626 | ecc2/src/session/manager.rs:2959-2987 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×2
  • Edited copy of a member (41 corresponding lines) ecc2/src/session/manager.rs:2624 — ecc2/src/session/manager.rs:2624-2674 | ecc2/src/session/manager.rs:2735-2775 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) REDACTED:67 — REDACTED:67-107 | src/llm/providers/openai.py:42-93 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) ecc2/src/worktree/mod.rs:694 — ecc2/src/worktree/mod.rs:694-720 | ecc2/src/worktree/mod.rs:1410-1440 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) ecc2/src/session/manager.rs:1802 — ecc2/src/session/manager.rs:1802-1834 | ecc2/src/session/manager.rs:1836-1862 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×2
  • Edited copy of a member (34 corresponding lines) ecc2/src/main.rs:3123 — ecc2/src/main.rs:3123-3159 | ecc2/src/main.rs:3279-3312 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:1544 — REDACTED:1544-1577 | REDACTED:1684-1727 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 27+ corresponding lines) ecc2/src/main.rs:7883 — ecc2/src/main.rs:7883-7911 | ecc2/src/main.rs:7913-7939 | ecc2/src/main.rs:7941-7970 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 27+ corresponding lines) ecc2/src/tui/dashboard.rs:2367 — ecc2/src/tui/dashboard.rs:2367-2393 | ecc2/src/tui/dashboard.rs:2395-2424 | ecc2/src/tui/dashboard.rs:2426-2452 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) ecc2/src/tui/dashboard.rs:1254 — ecc2/src/tui/dashboard.rs:1254-1287 | ecc2/src/tui/dashboard.rs:1289-1320 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) ecc2/src/session/manager.rs:215 — ecc2/src/session/manager.rs:215-246 | ecc2/src/session/manager.rs:404-439 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) REDACTED:2438 — REDACTED:2438-2462 | REDACTED:2504-2527 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) ecc2/src/tui/dashboard.rs:8796 — ecc2/src/tui/dashboard.rs:8796-8825 | ecc2/src/tui/dashboard.rs:8827-8850 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) ecc2/src/tui/dashboard.rs:1808 — ecc2/src/tui/dashboard.rs:1808-1835 | ecc2/src/tui/dashboard.rs:1844-1872 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) ecc2/src/worktree/mod.rs:1056 — ecc2/src/worktree/mod.rs:1056-1083 | ecc2/src/worktree/mod.rs:1089-1120 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 21+ corresponding lines) ecc2/src/tui/dashboard.rs:3004 — ecc2/src/tui/dashboard.rs:3004-3024 | ecc2/src/tui/dashboard.rs:3026-3046 | ecc2/src/tui/dashboard.rs:3048-3072 | ecc2/src/tui/dashboard.rs:3214-3234 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 21+ corresponding lines) REDACTED:1327 — REDACTED:1327-1349 | REDACTED:1392-1412 | REDACTED:1423-1446 | REDACTED:1448-1474 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 14+ corresponding lines) ecc2/src/worktree/mod.rs:491 — ecc2/src/worktree/mod.rs:491-504 | ecc2/src/worktree/mod.rs:604-617 | ecc2/src/worktree/mod.rs:1462-1476 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:149 — REDACTED:149-162 | REDACTED:169-183 | REDACTED:185-199 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) skills/taste-application/scripts/taste/cadence.py:244 — skills/taste-application/scripts/taste/cadence.py:244-251 | skills/taste-distillation/scripts/taste/cadence.py:244-251 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) ecc2/src/session/mod.rs:696 — ecc2/src/session/mod.rs:696-703 | REDACTED:5234-5243 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 2+ corresponding lines) skills/taste-application/scripts/falapi.py:734 — skills/taste-application/scripts/falapi.py:734-735 | skills/taste-application/scripts/taste/falapi.py:734-735 | skills/taste-distillation/scripts/taste/falapi.py:734-735 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 2+ corresponding lines) .agents/skills/docs-governance/scripts/markdown_links.py:148 — .agents/skills/docs-governance/scripts/markdown_links.py:148-149 | pi/core/skills/docs-governance/scripts/markdown_links.py:148-149 | skills/docs-governance/scripts/markdown_links.py:148-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×2
  • Edited copy of a member (2 corresponding lines) skills/taste-application/scripts/taste/grade.py:329 — skills/taste-application/scripts/taste/grade.py:329-330 | skills/taste-distillation/scripts/taste/grade.py:329-330 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (2 corresponding lines) skills/taste-application/scripts/taste/grade.py:98 — skills/taste-application/scripts/taste/grade.py:98-99 | skills/taste-distillation/scripts/taste/grade.py:98-99 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) ecc2/src/tui/dashboard.rs:8339 — ecc2/src/tui/dashboard.rs:8339-8359 | ecc2/src/tui/dashboard.rs:8394-8414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:8339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) skills/taste-application/scripts/taste/cadence.py:220 — skills/taste-application/scripts/taste/cadence.py:220-240 | skills/taste-distillation/scripts/taste/cadence.py:220-240 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) ecc2/src/main.rs:6033 — ecc2/src/main.rs:6033-6051 | ecc2/src/main.rs:7090-7108 | ecc2/src/main.rs:7133-7151 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6033` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `draft` to `&LegacyScheduleDraft` in one and `&LegacyRemoteDispatchDraft` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 3) skills/taste-application/scripts/taste/timeline.py:403 — skills/taste-application/scripts/taste/timeline.py:403-421 | skills/taste-application/scripts/tasteforge/export.py:208-226 | skills/taste-distillation/scripts/taste/timeline.py:403-421 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (49 lines × 3) · ×2
  • Duplicated block (49 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:718 — .agents/skills/docs-governance/scripts/audit-docs.py:718-766 | pi/core/skills/docs-governance/scripts/audit-docs.py:718-766 | skills/docs-governance/scripts/audit-docs.py:718-766 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (49 lines × 3) .agents/skills/docs-governance/scripts/module_audit.py:43 — .agents/skills/docs-governance/scripts/module_audit.py:43-91 | pi/core/skills/docs-governance/scripts/module_audit.py:43-91 | skills/docs-governance/scripts/module_audit.py:43-91 — before extracting anything, compare `.agents/skills/docs-governance/scripts/module_audit.py` and `pi/core/skills/docs-governance/scripts/module_audit.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×2
  • Duplicated block (44 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:247 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:247-290 | skills/agent-self-evaluation/scripts/evaluate.py:247-290 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (44 lines × 2) skills/taste-application/scripts/taste/grade.py:165 — skills/taste-application/scripts/taste/grade.py:165-208 | skills/taste-distillation/scripts/taste/grade.py:165-208 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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 (36 lines × 2) · ×2
  • Duplicated block (36 lines × 2) skills/taste-application/scripts/taste/grade.py:649 — skills/taste-application/scripts/taste/grade.py:649-684 | skills/taste-distillation/scripts/taste/grade.py:649-684 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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 (36 lines × 2) skills/taste-application/scripts/distill.py:144 — skills/taste-application/scripts/distill.py:144-179 | skills/taste-distillation/scripts/distill.py:144-179 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (33 lines × 3) · ×2
  • Duplicated block (33 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:613 — .agents/skills/docs-governance/scripts/audit-docs.py:613-645 | pi/core/skills/docs-governance/scripts/audit-docs.py:613-645 | skills/docs-governance/scripts/audit-docs.py:613-645 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (33 lines × 3) skills/taste-application/scripts/falapi.py:290 — skills/taste-application/scripts/falapi.py:290-322 | skills/taste-application/scripts/taste/falapi.py:290-322 | skills/taste-distillation/scripts/taste/falapi.py:290-322 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×2
  • Duplicated block (32 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:406 — .agents/skills/docs-governance/scripts/audit-docs.py:406-437 | pi/core/skills/docs-governance/scripts/audit-docs.py:406-437 | skills/docs-governance/scripts/audit-docs.py:406-437 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 3) skills/taste-application/scripts/falapi.py:426 — skills/taste-application/scripts/falapi.py:426-457 | skills/taste-application/scripts/taste/falapi.py:426-457 | skills/taste-distillation/scripts/taste/falapi.py:426-457 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 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 (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) skills/taste-application/scripts/distill.py:484 — skills/taste-application/scripts/distill.py:484-514 | skills/taste-distillation/scripts/distill.py:484-514 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 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 (31 lines × 2) skills/taste-application/scripts/taste/grade.py:696 — skills/taste-application/scripts/taste/grade.py:696-726 | skills/taste-distillation/scripts/taste/grade.py:696-726 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/taste/assemble.py:41 — skills/taste-application/scripts/taste/assemble.py:41-68 | skills/taste-distillation/scripts/taste/assemble.py:41-68 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/taste/frames.py:156 — skills/taste-application/scripts/taste/frames.py:156-183 | skills/taste-distillation/scripts/taste/frames.py:156-183 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) skills/taste-application/scripts/taste/assemble.py:254 — skills/taste-application/scripts/taste/assemble.py:254-279 | skills/taste-distillation/scripts/taste/assemble.py:254-279 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (26 lines × 2) skills/taste-application/scripts/taste/grade.py:212 — skills/taste-application/scripts/taste/grade.py:212-237 | skills/taste-distillation/scripts/taste/grade.py:212-237 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×2
  • Duplicated block (35 lines × 2) skills/taste-application/scripts/taste/grade.py:499 — skills/taste-application/scripts/taste/grade.py:499-533 | skills/taste-distillation/scripts/taste/grade.py:499-533 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (35 lines × 2) skills/taste-application/scripts/mint.py:138 — skills/taste-application/scripts/mint.py:138-172 | skills/taste-distillation/scripts/mint.py:138-172 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 133 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 (20 lines × 3) · ×2
  • Duplicated block (20 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:153 — .agents/skills/docs-governance/scripts/markdown_links.py:153-172 | pi/core/skills/docs-governance/scripts/markdown_links.py:153-172 | skills/docs-governance/scripts/markdown_links.py:153-172 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 3) skills/taste-application/scripts/falapi.py:378 — skills/taste-application/scripts/falapi.py:378-397 | skills/taste-application/scripts/taste/falapi.py:378-397 | skills/taste-distillation/scripts/taste/falapi.py:378-397 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) skills/taste-application/scripts/taste/render3d.py:54 — skills/taste-application/scripts/taste/render3d.py:54-72 | skills/taste-distillation/scripts/taste/render3d.py:54-72 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (19 lines × 2) skills/taste-application/scripts/taste/render3d.py:236 — skills/taste-application/scripts/taste/render3d.py:236-254 | skills/taste-distillation/scripts/taste/render3d.py:236-254 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:249 — .agents/skills/docs-governance/scripts/audit-docs.py:249-264 | pi/core/skills/docs-governance/scripts/audit-docs.py:249-264 | skills/docs-governance/scripts/audit-docs.py:249-264 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:465 — .agents/skills/docs-governance/scripts/audit-docs.py:465-480 | pi/core/skills/docs-governance/scripts/audit-docs.py:465-480 | skills/docs-governance/scripts/audit-docs.py:465-480 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:73 — .agents/skills/docs-governance/scripts/audit-docs.py:73-79 | pi/core/skills/docs-governance/scripts/audit-docs.py:73-79 | skills/docs-governance/scripts/audit-docs.py:73-79 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:513 — .agents/skills/docs-governance/scripts/audit-docs.py:513-519 | pi/core/skills/docs-governance/scripts/audit-docs.py:513-519 | skills/docs-governance/scripts/audit-docs.py:513-519 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:393 — .agents/skills/docs-governance/scripts/audit-docs.py:393-400 | pi/core/skills/docs-governance/scripts/audit-docs.py:393-400 | skills/docs-governance/scripts/audit-docs.py:393-400 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) skills/taste-application/scripts/falapi.py:566 — skills/taste-application/scripts/falapi.py:566-573 | skills/taste-application/scripts/taste/falapi.py:566-573 | skills/taste-distillation/scripts/taste/falapi.py:566-573 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
R10 · Code Duplication · Duplicated block with local edits (128 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (128 matched lines × 2 locations) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 — docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 · docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:17 — the two spans are one implementation copied and then locally edited — 1314 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (128 matched lines × 2 locations) scripts/gemini-adapt-agents.js:31 — scripts/gemini-adapt-agents.js:31 · scripts/qwen-adapt-agents.js:55 — the two spans are one implementation copied and then locally edited — 791 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (56 identical lines × 2 files) · ×2
  • Wholesale file copy (56 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 — docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/routes.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
  • Wholesale file copy (56 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (37 matched lines × 2 locations) docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 — docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 · docker/context-profiles/complex-eval/reference/webhook-relay/src/app.js:34 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (37 matched lines × 2 locations) scripts/lib/shell-substitution.js:195 — scripts/lib/shell-substitution.js:195 · scripts/lib/shell-substitution.js:287 — the two spans are one implementation copied and then locally edited — 258 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 (34 lines × 3 locations) · ×2
  • Duplicated block (34 lines × 3 locations) scripts/lib/install-targets/codebuddy-project.js:16 — scripts/lib/install-targets/codebuddy-project.js:16 · scripts/lib/install-targets/joycode-project.js:16 · scripts/lib/install-targets/zed-project.js:16 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
  • Duplicated block (34 lines × 3 locations) scripts/lib/session-adapters/claude-history.js:120 — scripts/lib/session-adapters/claude-history.js:120 · scripts/lib/session-adapters/codex-worktree.js:311 · scripts/lib/session-adapters/opencode.js:275 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:test-suite-dependency] docker/context-profiles/native-probe.js:71 — docker/context-profiles/native-probe.js:71 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] docker/context-profiles/packed-smoke.js:11 — docker/context-profiles/packed-smoke.js:11 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 62, cognitive 121) · ×2
  • Complex function runTests (cyclomatic 62, cognitive 121) tests/lib/install-targets.test.js:35 — runTests has cyclomatic complexity 62 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function runTests (cyclomatic 62, cognitive 121) tests/lib/plan-canvas-markdown.test.js:26 — runTests has cyclomatic complexity 62 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 47, cognitive 48) · ×2
  • Complex function (anonymous) (cyclomatic 47, cognitive 48) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 47, cognitive 48) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 45, cognitive 87) · ×2
  • Complex function runTests (cyclomatic 45, cognitive 87) tests/lib/install-manifests.test.js:69 — runTests has cyclomatic complexity 45 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function runTests (cyclomatic 45, cognitive 87) tests/lib/project-detect.test.js:57 — runTests has cyclomatic complexity 45 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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.
D1 · Cyclomatic Complexity · contract.validate_artifact_receipt (cyclomatic 58) · ×1
  • contract.validate_artifact_receipt (cyclomatic 58) skills/taste-application/scripts/tasteforge/contract.py:307 — contract.validate_artifact_receipt has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · forge.forge (cyclomatic 54) · ×1
  • forge.forge (cyclomatic 54) skills/taste-application/scripts/forge.py:49 — forge.forge has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · instinct-cli.cmd_import (cyclomatic 51) · ×1
  • instinct-cli.cmd_import (cyclomatic 51) skills/continuous-learning-v2/scripts/instinct-cli.py:889 — instinct-cli.cmd_import has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · memory-mcp.createMemoryMcpService.handle (cyclomatic 50) · ×1
  • memory-mcp.createMemoryMcpService.handle (cyclomatic 50) scripts/memory-mcp.mjs:365 — memory-mcp.createMemoryMcpService.handle has cyclomatic complexity 50 (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 · run-intent.parseArgs (cyclomatic 41) · ×1
  • run-intent.parseArgs (cyclomatic 41) docker/gateguard-effectiveness/run-intent.js:45 — run-intent.parseArgs has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · contract.validate_effect_recipe (cyclomatic 40) · ×1
  • contract.validate_effect_recipe (cyclomatic 40) skills/taste-application/scripts/tasteforge/contract.py:173 — contract.validate_effect_recipe has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run-intent.main (cyclomatic 40) · ×1
  • run-intent.main (cyclomatic 40) docker/gateguard-effectiveness/run-intent.js:216 — run-intent.main has cyclomatic complexity 40 (threshold 15). Of this number, 33 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · apply.apply (cyclomatic 39) · ×1
  • apply.apply (cyclomatic 39) skills/taste-application/scripts/apply.py:284 — apply.apply has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · blender_prop.build (cyclomatic 39) · ×1
  • blender_prop.build (cyclomatic 39) skills/taste-application/scripts/blender_prop.py:151 — blender_prop.build has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · workflow.run_workflow (cyclomatic 34) · ×1
  • workflow.run_workflow (cyclomatic 34) skills/taste-application/scripts/tasteforge/workflow.py:523 — workflow.run_workflow has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pipeline.main (cyclomatic 33) · ×1
  • pipeline.main (cyclomatic 33) skills/taste-application/scripts/pipeline.py:52 — pipeline.main has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cli.run (cyclomatic 33) · ×1
  • cli.run (cyclomatic 33) docker/context-profiles/complex-eval/reference2/forge-cli/src/cli.js:19 — cli.run has cyclomatic complexity 33 (threshold 15). Of this number, 31 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 · (anonymous) (cyclomatic 33) · ×1
  • (anonymous) (cyclomatic 33) docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:47 — (anonymous) has cyclomatic complexity 33 (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 · ai-eval.main (cyclomatic 32) · ×1
  • ai-eval.main (cyclomatic 32) docker/context-profiles/ai-eval.js:6 — ai-eval.main has cyclomatic complexity 32 (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 · schema.validate (cyclomatic 30) · ×1
  • schema.validate (cyclomatic 30) skills/taste-application/scripts/tasteforge/schema.py:36 — schema.validate 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 · ecc_dashboard.load_skills (cyclomatic 29) · ×1
  • ecc_dashboard.load_skills (cyclomatic 29) ecc_dashboard.py:108 — ecc_dashboard.load_skills has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run.parseArgs (cyclomatic 29) · ×1
  • run.parseArgs (cyclomatic 29) docker/gateguard-effectiveness/run.js:31 — run.parseArgs has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main (cyclomatic 29) · ×1
  • main (cyclomatic 29) skills/ck/hooks/session-start.mjs:86 — main has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 5 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 · install-apply.printHumanPlan (cyclomatic 28) · ×1
  • install-apply.printHumanPlan (cyclomatic 28) scripts/install-apply.js:87 — install-apply.printHumanPlan has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · doUninstall (cyclomatic 27) · ×1
  • doUninstall (cyclomatic 27) .codebuddy/uninstall.js:119 — doUninstall has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · instinct-cli.detect_project (cyclomatic 26) · ×1
  • instinct-cli.detect_project (cyclomatic 26) skills/continuous-learning-v2/scripts/instinct-cli.py:285 — instinct-cli.detect_project has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.createApp (cyclomatic 26) · ×1
  • app.createApp (cyclomatic 26) REDACTED:38 — app.createApp has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 41, 45). 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 · lib.parseStream (cyclomatic 26) · ×1
  • lib.parseStream (cyclomatic 26) docker/gateguard-effectiveness/lib.js:201 — lib.parseStream 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 · run.main (cyclomatic 26) · ×1
  • run.main (cyclomatic 26) docker/gateguard-effectiveness/run.js:137 — run.main has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 144, 169, 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 · report.generate_report (cyclomatic 25) · ×1
  • report.generate_report (cyclomatic 25) skills/skill-comply/scripts/report.py:13 — report.generate_report has cyclomatic complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 25) · ×1
  • (anonymous) (cyclomatic 25) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:53 — (anonymous) has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · instinct-cli.cmd_evolve (cyclomatic 24) · ×1
  • instinct-cli.cmd_evolve (cyclomatic 24) skills/continuous-learning-v2/scripts/instinct-cli.py:1308 — instinct-cli.cmd_evolve has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quality-gate.main (cyclomatic 24) · ×1
  • quality-gate.main (cyclomatic 24) skills/delivery-gate/hooks/quality-gate.py:131 — quality-gate.main 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 · runner._sandboxed_setup_command (cyclomatic 24) · ×1
  • runner._sandboxed_setup_command (cyclomatic 24) skills/skill-comply/scripts/runner.py:367 — runner._sandboxed_setup_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.
D1 · Cyclomatic Complexity · apply.apply_local (cyclomatic 24) · ×1
  • apply.apply_local (cyclomatic 24) skills/taste-application/scripts/tasteforge/apply.py:135 — apply.apply_local 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 · resolve.apply_placements (cyclomatic 24) · ×1
  • resolve.apply_placements (cyclomatic 24) skills/taste-application/scripts/tasteforge/resolve.py:232 — resolve.apply_placements 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 · memory-mcp.runStdioServer (cyclomatic 24) · ×1
  • memory-mcp.runStdioServer (cyclomatic 24) scripts/memory-mcp.mjs:533 — memory-mcp.runStdioServer has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 610, drainQueue, enqueue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · doInstall (cyclomatic 24) · ×1
  • doInstall (cyclomatic 24) .codebuddy/install.js:146 — doInstall 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 · config-protection.main (cyclomatic 23) · ×1
  • config-protection.main (cyclomatic 23) hooks/hermes/config-protection.py:46 — config-protection.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.
D1 · Cyclomatic Complexity · contract.validate_genre_specs (cyclomatic 23) · ×1
  • contract.validate_genre_specs (cyclomatic 23) skills/taste-application/scripts/tasteforge/contract.py:117 — contract.validate_genre_specs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClaudeProvider.generate (cyclomatic 23) · ×1
  • ClaudeProvider.generate (cyclomatic 23) src/llm/providers/claude.py:64 — ClaudeProvider.generate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · check-evidence.checkEvidence (cyclomatic 23) · ×1
  • check-evidence.checkEvidence (cyclomatic 23) skills/frontend-design-direction/scripts/check-evidence.js:13 — check-evidence.checkEvidence has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (check, a function literal at line 32, a function literal at line 26, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · renderContextMd (cyclomatic 23) · ×1
  • renderContextMd (cyclomatic 23) skills/ck/commands/shared.mjs:200 — renderContextMd has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.createApp (cyclomatic 22) · ×1
  • app.createApp (cyclomatic 22) REDACTED:24 — app.createApp has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 25, 29). 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 · open-terminal.parseArgs (cyclomatic 22) · ×1
  • open-terminal.parseArgs (cyclomatic 22) skills/terminal-opener/scripts/open-terminal.js:88 — open-terminal.parseArgs 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 · runExistingHook (cyclomatic 22) · ×1
  • runExistingHook (cyclomatic 22) .cursor/hooks/adapter.js:176 — runExistingHook 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 · mint3d.mint3d (cyclomatic 21) · ×1
  • mint3d.mint3d (cyclomatic 21) skills/taste-application/scripts/mint3d.py:87 — mint3d.mint3d 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 · integration._read_local (cyclomatic 21) · ×1
  • integration._read_local (cyclomatic 21) skills/taste-application/scripts/tasteforge/integration.py:112 — integration._read_local has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai-eval-lib.validateCorpus (cyclomatic 20) · ×1
  • ai-eval-lib.validateCorpus (cyclomatic 20) docker/context-profiles/ai-eval-lib.js:49 — ai-eval-lib.validateCorpus 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, name the conditions: bind each compound test to a 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 · intent-eval.loadIntentScenarios (cyclomatic 20) · ×1
  • intent-eval.loadIntentScenarios (cyclomatic 20) docker/gateguard-effectiveness/intent-eval.js:24 — intent-eval.loadIntentScenarios has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 28). 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 · review-with-codex.runReview (cyclomatic 20) · ×1
  • review-with-codex.runReview (cyclomatic 20) REDACTED:181 — review-with-codex.runReview has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ito-baskets.run (cyclomatic 20) · ×1
  • ito-baskets.run (cyclomatic 20) skills/ito-baskets/scripts/ito-baskets.js:124 — ito-baskets.run 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 · build-agreement.buildValues (cyclomatic 20) · ×1
  • build-agreement.buildValues (cyclomatic 20) skills/master-agreement-generator/scripts/build-agreement.js:79 — build-agreement.buildValues has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · integration.build_application_bundle (cyclomatic 19) · ×1
  • integration.build_application_bundle (cyclomatic 19) skills/taste-application/scripts/tasteforge/integration.py:338 — integration.build_application_bundle has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolve.allocate_placements (cyclomatic 19) · ×1
  • resolve.allocate_placements (cyclomatic 19) skills/taste-application/scripts/tasteforge/resolve.py:88 — resolve.allocate_placements 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 · ws_listener.listen_with_retry (cyclomatic 19) · ×1
  • ws_listener.listen_with_retry (cyclomatic 19) skills/videodb/scripts/ws_listener.py:148 — ws_listener.listen_with_retry 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 · AtlasProvider.generate (cyclomatic 19) · ×1
  • AtlasProvider.generate (cyclomatic 19) src/llm/providers/atlas.py:84 — AtlasProvider.generate 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 · check-console-log.main (cyclomatic 18) · ×1
  • check-console-log.main (cyclomatic 18) hooks/hermes/check-console-log.py:30 — check-console-log.main 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 · instinct-cli.cmd_export (cyclomatic 18) · ×1
  • instinct-cli.cmd_export (cyclomatic 18) skills/continuous-learning-v2/scripts/instinct-cli.py:1078 — instinct-cli.cmd_export 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 · runner._archive_operands (cyclomatic 18) · ×1
  • runner._archive_operands (cyclomatic 18) skills/skill-comply/scripts/runner.py:313 — runner._archive_operands 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 · _AstraflowBaseProvider.generate (cyclomatic 18) · ×1
  • _AstraflowBaseProvider.generate (cyclomatic 18) src/llm/providers/astraflow.py:71 — _AstraflowBaseProvider.generate 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 · OllamaProvider.generate (cyclomatic 18) · ×1
  • OllamaProvider.generate (cyclomatic 18) REDACTED:141 — OllamaProvider.generate 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 · OpenAIProvider.generate (cyclomatic 18) · ×1
  • OpenAIProvider.generate (cyclomatic 18) src/llm/providers/openai.py:95 — OpenAIProvider.generate 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 · session.runConversation (cyclomatic 18) · ×1
  • session.runConversation (cyclomatic 18) docker/gateguard-effectiveness/session.js:74 — session.runConversation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · renderBriefingBox (cyclomatic 18) · ×1
  • renderBriefingBox (cyclomatic 18) skills/ck/commands/shared.mjs:275 — renderBriefingBox has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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 · instinct-cli.parse_instinct_file (cyclomatic 17) · ×1
  • instinct-cli.parse_instinct_file (cyclomatic 17) skills/continuous-learning-v2/scripts/instinct-cli.py:515 — instinct-cli.parse_instinct_file 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 · resolve_ingest.run_resolve (cyclomatic 17) · ×1
  • resolve_ingest.run_resolve (cyclomatic 17) skills/taste-application/scripts/resolve_ingest.py:323 — resolve_ingest.run_resolve 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 · verify.verify (cyclomatic 17) · ×1
  • verify.verify (cyclomatic 17) skills/taste-application/scripts/verify.py:99 — verify.verify has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai-eval-lib.runScoredCheck (cyclomatic 17) · ×1
  • ai-eval-lib.runScoredCheck (cyclomatic 17) docker/context-profiles/ai-eval-lib.js:518 — ai-eval-lib.runScoredCheck has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · interactive-plan.parseArgs (cyclomatic 17) · ×1
  • interactive-plan.parseArgs (cyclomatic 17) docker/plugin-setup/interactive-plan.js:33 — interactive-plan.parseArgs 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 · memory-mcp.executeMemoryTool (cyclomatic 17) · ×1
  • memory-mcp.executeMemoryTool (cyclomatic 17) scripts/memory-mcp.mjs:273 — memory-mcp.executeMemoryTool has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×1
  • (anonymous) (cyclomatic 17) docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:60 — (anonymous) has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · runner._extracted_archives_safe (cyclomatic 16) · ×1
  • runner._extracted_archives_safe (cyclomatic 16) skills/skill-comply/scripts/runner.py:262 — runner._extracted_archives_safe 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 · glitch.render (cyclomatic 16) · ×1
  • glitch.render (cyclomatic 16) skills/taste-application/scripts/tasteforge/media/glitch.py:100 — glitch.render 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 · generate_icons.swift.top-level code (cyclomatic 16) · ×1
  • generate_icons.swift.top-level code (cyclomatic 16) skills/ios-icon-gen/scripts/generate_icons.swift:173 — generate_icons.swift.top-level code 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 · ai-eval-lib.parseCodexJsonl (cyclomatic 16) · ×1
  • ai-eval-lib.parseCodexJsonl (cyclomatic 16) docker/context-profiles/ai-eval-lib.js:182 — ai-eval-lib.parseCodexJsonl 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 · evidence.verifyManifest (cyclomatic 16) · ×1
  • evidence.verifyManifest (cyclomatic 16) docker/gateguard-effectiveness/evidence.js:77 — evidence.verifyManifest 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 · ecc.runCommand (cyclomatic 16) · ×1
  • ecc.runCommand (cyclomatic 16) scripts/ecc.js:270 — ecc.runCommand 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 · plan-canvas.main (cyclomatic 16) · ×1
  • plan-canvas.main (cyclomatic 16) REDACTED:369 — plan-canvas.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ledger.requireHardlinks (cyclomatic 16) · ×1
  • ledger.requireHardlinks (cyclomatic 16) skills/story-lifecycle/scripts/ledger.js:77 — ledger.requireHardlinks 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 · ledger.replaceTable (cyclomatic 16) · ×1
  • ledger.replaceTable (cyclomatic 16) skills/story-lifecycle/scripts/ledger.js:291 — ledger.replaceTable has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ledger.main (cyclomatic 16) · ×1
  • ledger.main (cyclomatic 16) skills/story-lifecycle/scripts/ledger.js:485 — ledger.main has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · contract.validate_artifact_receipt (cognitive 109) · ×1
  • contract.validate_artifact_receipt (cognitive 109) skills/taste-application/scripts/tasteforge/contract.py:307 — contract.validate_artifact_receipt has cognitive complexity 109 (threshold 15). Drivers by points: if/else 33 (76 pts), boolean chains 13, loops 7 (12 pts), error handling 4 (8 pts) (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.
D2 · Cognitive Complexity · forge.forge (cognitive 88) · ×1
  • forge.forge (cognitive 88) skills/taste-application/scripts/forge.py:49 — forge.forge has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (34 pts), ternaries 8 (20 pts), boolean chains 16, loops 8 (15 pts), error handling 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.cmd_import (cognitive 81) · ×1
  • instinct-cli.cmd_import (cognitive 81) skills/continuous-learning-v2/scripts/instinct-cli.py:889 — instinct-cli.cmd_import has cognitive complexity 81 (threshold 15). Drivers by points: if/else 35 (53 pts), loops 8 (11 pts), boolean chains 7, error handling 3 (6 pts), ternaries 3 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contract.validate_effect_recipe (cognitive 65) · ×1
  • contract.validate_effect_recipe (cognitive 65) skills/taste-application/scripts/tasteforge/contract.py:173 — contract.validate_effect_recipe has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 10, ternaries 2 (7 pts), loops 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contract.validate_genre_specs (cognitive 58) · ×1
  • contract.validate_genre_specs (cognitive 58) skills/taste-application/scripts/tasteforge/contract.py:117 — contract.validate_genre_specs has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 6 (22 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow.run_workflow (cognitive 52) · ×1
  • workflow.run_workflow (cognitive 52) skills/taste-application/scripts/tasteforge/workflow.py:523 — workflow.run_workflow has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (13 pts), ternaries 6 (12 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli.run (cognitive 50) · ×1
  • cli.run (cognitive 50) docker/context-profiles/complex-eval/reference2/forge-cli/src/cli.js:19 — cli.run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 8, ternaries 4 (8 pts), loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 18). Of this number, 48 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 · doInstall (cognitive 50) · ×1
  • doInstall (cognitive 50) .codebuddy/install.js:146 — doInstall has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 7 (13 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 · ws_listener.listen_with_retry (cognitive 49) · ×1
  • ws_listener.listen_with_retry (cognitive 49) skills/videodb/scripts/ws_listener.py:148 — ws_listener.listen_with_retry has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (32 pts), error handling 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 48) · ×1
  • main (cognitive 48) docker/gateguard-effectiveness/run-intent.js:216 — main has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 9, loops 4 (5 pts), ternaries 3 (5 pts) (nesting depth added 14). Of this number, 39 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · report.generate_report (cognitive 47) · ×1
  • report.generate_report (cognitive 47) skills/skill-comply/scripts/report.py:13 — report.generate_report has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 7 (11 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 22). 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 · blender_prop.build (cognitive 47) · ×1
  • blender_prop.build (cognitive 47) skills/taste-application/scripts/blender_prop.py:151 — blender_prop.build has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 6 (9 pts), loops 6 (7 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ecc_dashboard.load_skills (cognitive 46) · ×1
  • ecc_dashboard.load_skills (cognitive 46) ecc_dashboard.py:108 — ecc_dashboard.load_skills has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (25 pts), boolean chains 9, loops 2 (7 pts), error handling 1 (5 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · apply.apply (cognitive 46) · ×1
  • apply.apply (cognitive 46) skills/taste-application/scripts/apply.py:284 — apply.apply has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7, loops 6 (7 pts), ternaries 6 (7 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · schema.validate (cognitive 45) · ×1
  • schema.validate (cognitive 45) skills/taste-application/scripts/tasteforge/schema.py:36 — schema.validate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 4 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config-protection.main (cognitive 43) · ×1
  • config-protection.main (cognitive 43) hooks/hermes/config-protection.py:46 — config-protection.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (11 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.parse_instinct_file (cognitive 43) · ×1
  • instinct-cli.parse_instinct_file (cognitive 43) skills/continuous-learning-v2/scripts/instinct-cli.py:515 — instinct-cli.parse_instinct_file has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 2 (10 pts), ternaries 1 (5 pts), boolean chains 2, loops 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · memory-mcp.createMemoryMcpService.handle (cognitive 43) · ×1
  • memory-mcp.createMemoryMcpService.handle (cognitive 43) scripts/memory-mcp.mjs:365 — memory-mcp.createMemoryMcpService.handle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 14, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 43) · ×1
  • main (cognitive 43) skills/ck/hooks/session-start.mjs:86 — main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 12, ternaries 5 (11 pts), error handling 1, other 1 (nesting depth added 16). Of this number, 39 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · doUninstall (cognitive 42) · ×1
  • doUninstall (cognitive 42) .codebuddy/uninstall.js:119 — doUninstall has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (26 pts), error handling 5 (10 pts), boolean chains 4, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lib.parseStream (cognitive 41) · ×1
  • lib.parseStream (cognitive 41) docker/gateguard-effectiveness/lib.js:201 — lib.parseStream has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pipeline.main (cognitive 40) · ×1
  • pipeline.main (cognitive 40) skills/taste-application/scripts/pipeline.py:52 — pipeline.main has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · run-intent.parseArgs (cognitive 39) · ×1
  • run-intent.parseArgs (cognitive 39) docker/gateguard-effectiveness/run-intent.js:45 — run-intent.parseArgs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28 (32 pts), boolean chains 6, loops 1 (nesting depth added 4). Of this number, 35 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · memory-mcp.runStdioServer (cognitive 39) · ×1
  • memory-mcp.runStdioServer (cognitive 39) scripts/memory-mcp.mjs:533 — memory-mcp.runStdioServer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 2 (6 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 15). None of this is in the body itself: all 39 points belong to 5 function items inside it that branch (a function literal at line 610, drainQueue, enqueue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ai-eval.main (cognitive 37) · ×1
  • ai-eval.main (cognitive 37) docker/context-profiles/ai-eval.js:6 — ai-eval.main has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 10 (13 pts), boolean chains 9, 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.
D2 · Cognitive Complexity · quality-gate.check_stale_libs (cognitive 36) · ×1
  • quality-gate.check_stale_libs (cognitive 36) skills/delivery-gate/hooks/quality-gate.py:82 — quality-gate.check_stale_libs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), error handling 3 (10 pts), loops 3 (8 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-apply.printHumanPlan (cognitive 35) · ×1
  • install-apply.printHumanPlan (cognitive 35) scripts/install-apply.js:87 — install-apply.printHumanPlan has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, loops 5 (9 pts), ternaries 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main (cognitive 35) · ×1
  • main (cognitive 35) docker/gateguard-effectiveness/run.js:137 — main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 5 (8 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 11). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 144, a function literal at line 169, (anonymous)::execute, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ecc_dashboard.load_rules (cognitive 34) · ×1
  • ecc_dashboard.load_rules (cognitive 34) ecc_dashboard.py:237 — ecc_dashboard.load_rules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (12 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.
D2 · Cognitive Complexity · instinct-cli.detect_project (cognitive 34) · ×1
  • instinct-cli.detect_project (cognitive 34) skills/continuous-learning-v2/scripts/instinct-cli.py:285 — instinct-cli.detect_project has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 2 (5 pts), ternaries 5, boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · instinct-cli.cmd_evolve (cognitive 34) · ×1
  • instinct-cli.cmd_evolve (cognitive 34) skills/continuous-learning-v2/scripts/instinct-cli.py:1308 — instinct-cli.cmd_evolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 7 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). 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 · app.createApp (cognitive 34) · ×1
  • app.createApp (cognitive 34) REDACTED:38 — app.createApp has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10, error handling 2 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 41, 45). 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 · runner._archive_operands (cognitive 33) · ×1
  • runner._archive_operands (cognitive 33) skills/skill-comply/scripts/runner.py:313 — runner._archive_operands has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality-gate.main (cognitive 32) · ×1
  • quality-gate.main (cognitive 32) skills/delivery-gate/hooks/quality-gate.py:131 — quality-gate.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run.parseArgs (cognitive 32) · ×1
  • run.parseArgs (cognitive 32) docker/gateguard-effectiveness/run.js:31 — run.parseArgs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 4, loops 1 (nesting depth added 4). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · runner._sandboxed_setup_command (cognitive 31) · ×1
  • runner._sandboxed_setup_command (cognitive 31) skills/skill-comply/scripts/runner.py:367 — runner._sandboxed_setup_command has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply.apply_local (cognitive 31) · ×1
  • apply.apply_local (cognitive 31) skills/taste-application/scripts/tasteforge/apply.py:135 — apply.apply_local has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 6 (8 pts), boolean chains 5, 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 · resolve.apply_placements (cognitive 31) · ×1
  • resolve.apply_placements (cognitive 31) skills/taste-application/scripts/tasteforge/resolve.py:232 — resolve.apply_placements has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 6 (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 · instinct-cli.cmd_export (cognitive 29) · ×1
  • instinct-cli.cmd_export (cognitive 29) skills/continuous-learning-v2/scripts/instinct-cli.py:1078 — instinct-cli.cmd_export has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mint3d.mint3d (cognitive 29) · ×1
  • mint3d.mint3d (cognitive 29) skills/taste-application/scripts/mint3d.py:87 — mint3d.mint3d has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, error handling 2 (4 pts), ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve.allocate_placements (cognitive 29) · ×1
  • resolve.allocate_placements (cognitive 29) skills/taste-application/scripts/tasteforge/resolve.py:88 — resolve.allocate_placements has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeProvider.generate (cognitive 29) · ×1
  • ClaudeProvider.generate (cognitive 29) src/llm/providers/claude.py:64 — ClaudeProvider.generate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.createApp (cognitive 29) · ×1
  • app.createApp (cognitive 29) REDACTED:24 — app.createApp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 29 points belong to 2 function literals inside it that branch (lines 25, 29). 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 · ecc_dashboard.load_agents (cognitive 28) · ×1
  • ecc_dashboard.load_agents (cognitive 28) ecc_dashboard.py:44 — ecc_dashboard.load_agents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (7 pts), error handling 1 (3 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · instinct-cli._parse_created_date (cognitive 28) · ×1
  • instinct-cli._parse_created_date (cognitive 28) skills/continuous-learning-v2/scripts/instinct-cli.py:2084 — instinct-cli._parse_created_date has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 3 (7 pts), loops 2 (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 · resolve_ingest.run_resolve (cognitive 27) · ×1
  • resolve_ingest.run_resolve (cognitive 27) skills/taste-application/scripts/resolve_ingest.py:323 — resolve_ingest.run_resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (5 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow_graphs.validate_graph (cognitive 27) · ×1
  • workflow_graphs.validate_graph (cognitive 27) skills/taste-application/scripts/workflow_graphs.py:73 — workflow_graphs.validate_graph has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 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.
D2 · Cognitive Complexity · shared.renderContextMd (cognitive 27) · ×1
  • shared.renderContextMd (cognitive 27) skills/ck/commands/shared.mjs:200 — shared.renderContextMd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 12, ternaries 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · instinct-cli.cmd_prune (cognitive 26) · ×1
  • instinct-cli.cmd_prune (cognitive 26) skills/continuous-learning-v2/scripts/instinct-cli.py:2162 — instinct-cli.cmd_prune has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (8 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner._parse_stream_json (cognitive 25) · ×1
  • runner._parse_stream_json (cognitive 25) skills/skill-comply/scripts/runner.py:479 — runner._parse_stream_json has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (9 pts), error handling 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.recover (cognitive 25) · ×1
  • ledger.recover (cognitive 25) skills/story-lifecycle/scripts/ledger.js:230 — ledger.recover has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.cmd_status (cognitive 24) · ×1
  • instinct-cli.cmd_status (cognitive 24) skills/continuous-learning-v2/scripts/instinct-cli.py:747 — instinct-cli.cmd_status has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · glitch.transform_stream (cognitive 24) · ×1
  • glitch.transform_stream (cognitive 24) skills/taste-application/scripts/tasteforge/media/glitch.py:13 — glitch.transform_stream has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (5 pts), loops 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 · glitch.render (cognitive 24) · ×1
  • glitch.render (cognitive 24) skills/taste-application/scripts/tasteforge/media/glitch.py:100 — glitch.render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OllamaProvider.generate (cognitive 23) · ×1
  • OllamaProvider.generate (cognitive 23) REDACTED:141 — OllamaProvider.generate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open-terminal.parseArgs (cognitive 23) · ×1
  • open-terminal.parseArgs (cognitive 23) skills/terminal-opener/scripts/open-terminal.js:88 — open-terminal.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · integration._read_local (cognitive 22) · ×1
  • integration._read_local (cognitive 22) skills/taste-application/scripts/tasteforge/integration.py:112 — integration._read_local has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · integration.build_application_bundle (cognitive 22) · ×1
  • integration.build_application_bundle (cognitive 22) skills/taste-application/scripts/tasteforge/integration.py:338 — integration.build_application_bundle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · generate_icons.swift.top-level code (cognitive 22) · ×1
  • generate_icons.swift.top-level code (cognitive 22) skills/ios-icon-gen/scripts/generate_icons.swift:173 — generate_icons.swift.top-level code has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session.runConversation (cognitive 22) · ×1
  • session.runConversation (cognitive 22) docker/gateguard-effectiveness/session.js:74 — session.runConversation has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review-with-codex.runReview (cognitive 22) · ×1
  • review-with-codex.runReview (cognitive 22) REDACTED:181 — review-with-codex.runReview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ledger.acquireLock (cognitive 22) · ×1
  • ledger.acquireLock (cognitive 22) skills/story-lifecycle/scripts/ledger.js:203 — ledger.acquireLock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:47 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, error handling 3, if/else 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 · ecc_dashboard.load_commands (cognitive 21) · ×1
  • ecc_dashboard.load_commands (cognitive 21) ecc_dashboard.py:188 — ecc_dashboard.load_commands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow.parse_feature_output (cognitive 21) · ×1
  • workflow.parse_feature_output (cognitive 21) skills/taste-application/scripts/tasteforge/workflow.py:304 — workflow.parse_feature_output has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AtlasProvider.generate (cognitive 21) · ×1
  • AtlasProvider.generate (cognitive 21) src/llm/providers/atlas.py:84 — AtlasProvider.generate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIProvider.generate (cognitive 21) · ×1
  • OpenAIProvider.generate (cognitive 21) src/llm/providers/openai.py:95 — OpenAIProvider.generate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evidence.verifyManifest (cognitive 21) · ×1
  • evidence.verifyManifest (cognitive 21) docker/gateguard-effectiveness/evidence.js:77 — evidence.verifyManifest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ito-baskets.run (cognitive 21) · ×1
  • ito-baskets.run (cognitive 21) skills/ito-baskets/scripts/ito-baskets.js:124 — ito-baskets.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (5 pts), boolean chains 2, error handling 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.requireHardlinks (cognitive 21) · ×1
  • ledger.requireHardlinks (cognitive 21) skills/story-lifecycle/scripts/ledger.js:77 — ledger.requireHardlinks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 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 · parseCodexJsonl (cognitive 21) · ×1
  • parseCodexJsonl (cognitive 21) docker/context-profiles/ai-eval-lib.js:182 — parseCodexJsonl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, error handling 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadIntentScenarios (cognitive 21) · ×1
  • loadIntentScenarios (cognitive 21) docker/gateguard-effectiveness/intent-eval.js:24 — loadIntentScenarios has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, loops 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 28, 27, 46, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · instinct-cli._promote_auto (cognitive 20) · ×1
  • instinct-cli._promote_auto (cognitive 20) skills/continuous-learning-v2/scripts/instinct-cli.py:1664 — instinct-cli._promote_auto has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (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 · verify.verify (cognitive 20) · ×1
  • verify.verify (cognitive 20) skills/taste-application/scripts/verify.py:99 — verify.verify has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AstraflowBaseProvider.generate (cognitive 20) · ×1
  • _AstraflowBaseProvider.generate (cognitive 20) src/llm/providers/astraflow.py:71 — _AstraflowBaseProvider.generate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selector.keccakF (cognitive 20) · ×1
  • selector.keccakF (cognitive 20) docker/context-profiles/complex-eval/reference2/keccak-selector/src/selector.js:15 — selector.keccakF has cognitive complexity 20 (threshold 15). Drivers by points: loops 9 (20 pts) (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 · interactive-plan.parseArgs (cognitive 20) · ×1
  • interactive-plan.parseArgs (cognitive 20) docker/plugin-setup/interactive-plan.js:33 — interactive-plan.parseArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 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 · prepareEnvironments (cognitive 20) · ×1
  • prepareEnvironments (cognitive 20) docker/context-profiles/ai-eval-lib.js:367 — prepareEnvironments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (restore, verify, listing, …). 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 · runExistingHook (cognitive 20) · ×1
  • runExistingHook (cognitive 20) .cursor/hooks/adapter.js:176 — runExistingHook has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · instinct-cli._cluster_by_keyword_overlap (cognitive 19) · ×1
  • instinct-cli._cluster_by_keyword_overlap (cognitive 19) skills/continuous-learning-v2/scripts/instinct-cli.py:1266 — instinct-cli._cluster_by_keyword_overlap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contract.validate_provenance (cognitive 19) · ×1
  • contract.validate_provenance (cognitive 19) skills/taste-application/scripts/tasteforge/contract.py:258 — contract.validate_provenance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai-eval-lib.steppedTrial (cognitive 19) · ×1
  • ai-eval-lib.steppedTrial (cognitive 19) docker/context-profiles/ai-eval-lib.js:712 — ai-eval-lib.steppedTrial has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 2 (4 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sandbox-smoke.smoke (cognitive 19) · ×1
  • sandbox-smoke.smoke (cognitive 19) docker/context-profiles/sandbox-smoke.js:37 — sandbox-smoke.smoke has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), ternaries 2 (4 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 3 belong to 3 function items inside it that branch. 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 · build-agreement.buildValues (cognitive 19) · ×1
  • build-agreement.buildValues (cognitive 19) skills/master-agreement-generator/scripts/build-agreement.js:79 — build-agreement.buildValues has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts), loops 1, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · check-console-log.main (cognitive 18) · ×1
  • check-console-log.main (cognitive 18) hooks/hermes/check-console-log.py:30 — check-console-log.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 2, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · grader._check_temporal_order (cognitive 18) · ×1
  • grader._check_temporal_order (cognitive 18) skills/skill-comply/scripts/grader.py:28 — grader._check_temporal_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (18 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 · runner._extracted_archives_safe (cognitive 18) · ×1
  • runner._extracted_archives_safe (cognitive 18) skills/skill-comply/scripts/runner.py:262 — runner._extracted_archives_safe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow._build_effect_recipe (cognitive 18) · ×1
  • workflow._build_effect_recipe (cognitive 18) skills/taste-application/scripts/tasteforge/workflow.py:426 — workflow._build_effect_recipe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-apply.main (cognitive 18) · ×1
  • install-apply.main (cognitive 18) scripts/install-apply.js:157 — install-apply.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · memory-mcp.executeMemoryTool (cognitive 18) · ×1
  • memory-mcp.executeMemoryTool (cognitive 18) scripts/memory-mcp.mjs:273 — memory-mcp.executeMemoryTool has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ledger.apply (cognitive 18) · ×1
  • ledger.apply (cognitive 18) skills/story-lifecycle/scripts/ledger.js:422 — ledger.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderBriefingBox (cognitive 18) · ×1
  • renderBriefingBox (cognitive 18) skills/ck/commands/shared.mjs:275 — renderBriefingBox has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 3, other 1. Of this number, 16 points are the body's own statements and 2 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 · instinct-cli._generate_evolved (cognitive 17) · ×1
  • instinct-cli._generate_evolved (cognitive 17) skills/continuous-learning-v2/scripts/instinct-cli.py:1958 — instinct-cli._generate_evolved has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · grader.grade (cognitive 17) · ×1
  • grader.grade (cognitive 17) skills/skill-comply/scripts/grader.py:119 — grader.grade has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve_ingest.detect_resolution (cognitive 17) · ×1
  • resolve_ingest.detect_resolution (cognitive 17) skills/taste-application/scripts/resolve_ingest.py:250 — resolve_ingest.detect_resolution has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · integration._snapshot (cognitive 17) · ×1
  • integration._snapshot (cognitive 17) skills/taste-application/scripts/tasteforge/integration.py:187 — integration._snapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (4 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · workflow_graphs.main (cognitive 17) · ×1
  • workflow_graphs.main (cognitive 17) skills/taste-application/scripts/workflow_graphs.py:120 — workflow_graphs.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · coverage.renderHoles (cognitive 17) · ×1
  • coverage.renderHoles (cognitive 17) docker/gateguard-effectiveness/coverage.js:182 — coverage.renderHoles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (5 pts), ternaries 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ito-baskets.buildRequest (cognitive 17) · ×1
  • ito-baskets.buildRequest (cognitive 17) skills/ito-baskets/scripts/ito-baskets.js:80 — ito-baskets.buildRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 3 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extract-pptx.extract_pptx (cognitive 16) · ×1
  • extract-pptx.extract_pptx (cognitive 16) skills/frontend-slides/scripts/extract-pptx.py:18 — extract-pptx.extract_pptx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 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 · apply._strict_assign (cognitive 16) · ×1
  • apply._strict_assign (cognitive 16) skills/taste-application/scripts/tasteforge/apply.py:55 — apply._strict_assign has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · integration._candidates (cognitive 16) · ×1
  • integration._candidates (cognitive 16) skills/taste-application/scripts/tasteforge/integration.py:281 — integration._candidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow._stable_probe (cognitive 16) · ×1
  • workflow._stable_probe (cognitive 16) skills/taste-application/scripts/tasteforge/workflow.py:59 — workflow._stable_probe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 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 · ollama._messages_payload (cognitive 16) · ×1
  • ollama._messages_payload (cognitive 16) REDACTED:34 — ollama._messages_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan-canvas.main (cognitive 16) · ×1
  • plan-canvas.main (cognitive 16) REDACTED:369 — plan-canvas.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, error handling 1, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · check-evidence.checkEvidence (cognitive 16) · ×1
  • check-evidence.checkEvidence (cognitive 16) skills/frontend-design-direction/scripts/check-evidence.js:13 — check-evidence.checkEvidence has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 5, if/else 3. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (check, a function literal at line 26, a function literal at line 32, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work 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 · ledger.replaceTable (cognitive 16) · ×1
  • ledger.replaceTable (cognitive 16) skills/story-lifecycle/scripts/ledger.js:291 — ledger.replaceTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.allocate (cognitive 16) · ×1
  • ledger.allocate (cognitive 16) skills/story-lifecycle/scripts/ledger.js:362 — ledger.allocate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (52 shared lines) · ×1
  • Near-duplicate member pair (52 shared lines) ecc2/src/session/manager.rs:1585 — ecc2/src/session/manager.rs:1585-1720 | ecc2/src/session/manager.rs:3815-3921 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) ecc2/src/main.rs:6580 — ecc2/src/main.rs:6580-6680 | ecc2/src/main.rs:6866-6971 — These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (111 corresponding lines) · ×1
  • Edited copy of a member (111 corresponding lines) skills/taste-application/scripts/taste/timeline.py:269 — skills/taste-application/scripts/taste/timeline.py:269-379 | skills/taste-distillation/scripts/taste/timeline.py:269-379 — These two members are one piece of code written twice and then edited apart: 111 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .agents/skills/docs-governance/scripts/audit-docs.py:249 — .agents/skills/docs-governance/scripts/audit-docs.py:249-267 | .agents/skills/docs-governance/scripts/audit-docs.py:300-329 | pi/core/skills/docs-governance/scripts/audit-docs.py:249-267 | pi/core/skills/docs-governance/scripts/audit-docs.py:300-329 | skills/docs-governance/scripts/audit-docs.py:249-267 | skills/docs-governance/scripts/audit-docs.py:300-329 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) ecc_dashboard.py:398 — ecc_dashboard.py:398-452 | ecc_dashboard.py:503-563 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) skills/taste-application/scripts/mint.py:138 — skills/taste-application/scripts/mint.py:138-176 | skills/taste-distillation/scripts/mint.py:138-176 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) ecc_dashboard.py:625 — ecc_dashboard.py:625-659 | ecc_dashboard.py:675-720 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) ecc2/src/main.rs:7740 — ecc2/src/main.rs:7740-7796 | ecc2/src/main.rs:7972-8034 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 52+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 52+ corresponding lines) src/llm/providers/astraflow.py:72 — src/llm/providers/astraflow.py:72-123 | src/llm/providers/atlas.py:85-140 | src/llm/providers/openai.py:96-150 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 52 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) ecc2/src/tui/dashboard.rs:8338 — ecc2/src/tui/dashboard.rs:8338-8386 | ecc2/src/tui/dashboard.rs:8393-8435 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) ecc2/src/tui/dashboard.rs:2717 — ecc2/src/tui/dashboard.rs:2717-2768 | ecc2/src/tui/dashboard.rs:2770-2822 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) ecc2/src/main.rs:6550 — ecc2/src/main.rs:6550-6578 | ecc2/src/main.rs:6835-6864 | ecc2/src/main.rs:7036-7068 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) REDACTED:5319 — REDACTED:5319-5340 | REDACTED:5362-5384 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) skills/taste-application/scripts/taste/timeline.py:393 — skills/taste-application/scripts/taste/timeline.py:393-421 | skills/taste-application/scripts/tasteforge/export.py:206-226 | skills/taste-distillation/scripts/taste/timeline.py:393-421 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) ecc2/src/main.rs:6509 — ecc2/src/main.rs:6509-6529 | ecc2/src/main.rs:6790-6813 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) ecc2/src/tui/dashboard.rs:2514 — ecc2/src/tui/dashboard.rs:2514-2531 | ecc2/src/tui/dashboard.rs:2533-2550 | ecc2/src/tui/dashboard.rs:2552-2569 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) ecc2/src/worktree/mod.rs:972 — ecc2/src/worktree/mod.rs:972-1000 | ecc2/src/worktree/mod.rs:1002-1025 | ecc2/src/worktree/mod.rs:1027-1050 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) ecc2/src/tui/dashboard.rs:3927 — ecc2/src/tui/dashboard.rs:3927-3946 | ecc2/src/tui/dashboard.rs:3948-3967 | ecc2/src/tui/dashboard.rs:3969-3990 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) ecc2/src/tui/dashboard.rs:3394 — ecc2/src/tui/dashboard.rs:3394-3404 | ecc2/src/tui/dashboard.rs:3406-3416 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) skills/taste-application/scripts/taste/plates.py:58 — skills/taste-application/scripts/taste/plates.py:58-66 | skills/taste-distillation/scripts/taste/plates.py:58-66 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) ecc2/src/tui/dashboard.rs:2629 — ecc2/src/tui/dashboard.rs:2629-2648 | ecc2/src/tui/dashboard.rs:2650-2671 | ecc2/src/tui/dashboard.rs:3892-3908 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) ecc2/src/main.rs:6815 — ecc2/src/main.rs:6815-6833 | ecc2/src/main.rs:7016-7034 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) ecc2/src/main.rs:8088 — ecc2/src/main.rs:8088-8108 | ecc2/src/main.rs:8245-8257 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) ecc2/src/tui/dashboard.rs:3828 — ecc2/src/tui/dashboard.rs:3828-3843 | ecc2/src/tui/dashboard.rs:3876-3890 | ecc2/src/tui/dashboard.rs:3910-3925 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) ecc_dashboard.py:455 — ecc_dashboard.py:455-460 | ecc_dashboard.py:571-577 | ecc_dashboard.py:728-734 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) ecc2/src/comms/mod.rs:162 — ecc2/src/comms/mod.rs:162-170 | ecc2/src/main.rs:3882-3889 | ecc2/src/tui/dashboard.rs:8064-8072 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 18+ corresponding lines) REDACTED:3124 — REDACTED:3124-3144 | REDACTED:3284-3302 | REDACTED:3617-3635 | REDACTED:3853-3875 | REDACTED:4046-4063 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) ecc2/src/tui/dashboard.rs:3802 — ecc2/src/tui/dashboard.rs:3802-3811 | ecc2/src/tui/dashboard.rs:3813-3826 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) ecc2/src/config/mod.rs:689 — ecc2/src/config/mod.rs:689-700 | ecc2/src/config/mod.rs:702-713 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) skills/taste-application/scripts/taste/assemble.py:29 — skills/taste-application/scripts/taste/assemble.py:29-31 | skills/taste-distillation/scripts/taste/assemble.py:29-31 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 3+ corresponding lines) skills/taste-application/scripts/taste/assemble.py:283 — skills/taste-application/scripts/taste/assemble.py:283-286 | skills/taste-application/scripts/taste/cadence.py:255-258 | skills/taste-application/scripts/taste/pack.py:129-131 | skills/taste-distillation/scripts/taste/assemble.py:283-286 | skills/taste-distillation/scripts/taste/cadence.py:255-258 | skills/taste-distillation/scripts/taste/pack.py:129-131 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) .agents/skills/docs-governance/scripts/audit-docs.py:241 — .agents/skills/docs-governance/scripts/audit-docs.py:241-243 | pi/core/skills/docs-governance/scripts/audit-docs.py:241-243 | skills/docs-governance/scripts/audit-docs.py:241-243 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) ecc2/src/main.rs:3178 — ecc2/src/main.rs:3178-3199 | ecc2/src/main.rs:3331-3352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:3178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) ecc2/src/main.rs:3207 — ecc2/src/main.rs:3207-3225 | ecc2/src/main.rs:3359-3376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:3207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/main.rs:3359` calls `as_deref` and `ecc2/src/main.rs:3207` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) ecc2/src/session/manager.rs:940 — ecc2/src/session/manager.rs:940-957 | ecc2/src/session/manager.rs:1148-1163 — both copies are in the same file, so extract the 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–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) ecc2/src/tui/dashboard.rs:2225 — ecc2/src/tui/dashboard.rs:2225-2237 | ecc2/src/tui/dashboard.rs:3647-3661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:2225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) ecc2/src/tui/dashboard.rs:7026 — ecc2/src/tui/dashboard.rs:7026-7040 | ecc2/src/tui/dashboard.rs:7059-7072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) REDACTED:2699 — REDACTED:2699-2711 | REDACTED:2734-2746 | REDACTED:2798-2810 | REDACTED:2825-2838 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2825` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) ecc2/src/main.rs:6854 — ecc2/src/main.rs:6854-6864 | ecc2/src/main.rs:7055-7068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:6854` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) ecc2/src/tui/dashboard.rs:2905 — ecc2/src/tui/dashboard.rs:2905-2913 | ecc2/src/tui/dashboard.rs:2968-2980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/tui/dashboard.rs:2968` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) ecc2/src/main.rs:7803 — ecc2/src/main.rs:7803-7814 | ecc2/src/main.rs:7847-7857 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:7803` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `report` to `&LegacyMemoryImportReport` in one and `&LegacyEnvImportReport` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) ecc2/src/main.rs:7932 — ecc2/src/main.rs:7932-7939 | ecc2/src/main.rs:7960-7970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/main.rs:7932` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) ecc2/src/session/manager.rs:1106 — ecc2/src/session/manager.rs:1106-1112 | ecc2/src/session/manager.rs:1130-1140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/session/manager.rs:1106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ecc2/src/session/manager.rs:1127` calls `direct_delegate_sessions`, `unread_message_counts` and `ecc2/src/session/manager.rs:1104` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) ecc2/src/worktree/mod.rs:1591 — ecc2/src/worktree/mod.rs:1591-1600 | ecc2/src/worktree/mod.rs:1612-1619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) ecc2/src/comms/mod.rs:163 — ecc2/src/comms/mod.rs:163-170 | ecc2/src/main.rs:3883-3889 | ecc2/src/tui/dashboard.rs:8065-8072 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) REDACTED:962 — REDACTED:962-968 | REDACTED:1163-1168 | REDACTED:1854-1860 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:962` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) ecc2/src/worktree/mod.rs:1015 — ecc2/src/worktree/mod.rs:1015-1025 | ecc2/src/worktree/mod.rs:1040-1050 | ecc2/src/worktree/mod.rs:1110-1120 | ecc2/src/worktree/mod.rs:1450-1460 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ecc2/src/worktree/mod.rs:1015` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (79–80 lines × 3) · ×1
  • Duplicated block (79–80 lines × 3) skills/taste-application/scripts/taste/timeline.py:295 — skills/taste-application/scripts/taste/timeline.py:295-374 | skills/taste-application/scripts/tasteforge/export.py:108-186 | skills/taste-distillation/scripts/taste/timeline.py:295-374 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (79 lines × 2) · ×1
  • Duplicated block (79 lines × 2) skills/taste-application/scripts/taste/grade.py:740 — skills/taste-application/scripts/taste/grade.py:740-818 | skills/taste-distillation/scripts/taste/grade.py:740-818 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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 (67 lines × 3) · ×1
  • Duplicated block (67 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:78 — .agents/skills/docs-governance/scripts/markdown_links.py:78-144 | pi/core/skills/docs-governance/scripts/markdown_links.py:78-144 | skills/docs-governance/scripts/markdown_links.py:78-144 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) skills/taste-application/scripts/distill.py:328 — skills/taste-application/scripts/distill.py:328-384 | skills/taste-distillation/scripts/distill.py:328-384 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) skills/taste-application/scripts/taste/plates.py:150 — skills/taste-application/scripts/taste/plates.py:150-204 | skills/taste-distillation/scripts/taste/plates.py:150-204 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) skills/taste-application/scripts/distill.py:414 — skills/taste-application/scripts/distill.py:414-466 | skills/taste-distillation/scripts/distill.py:414-466 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (51 lines × 3) · ×1
  • Duplicated block (51 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:525 — .agents/skills/docs-governance/scripts/audit-docs.py:525-575 | pi/core/skills/docs-governance/scripts/audit-docs.py:525-575 | skills/docs-governance/scripts/audit-docs.py:525-575 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) skills/taste-application/scripts/taste/cadence.py:280 — skills/taste-application/scripts/taste/cadence.py:280-328 | skills/taste-distillation/scripts/taste/cadence.py:280-328 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) skills/taste-application/scripts/taste/cadence.py:144 — skills/taste-application/scripts/taste/cadence.py:144-193 | skills/taste-distillation/scripts/taste/cadence.py:144-193 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 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 (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) skills/taste-application/scripts/taste/assemble.py:205 — skills/taste-application/scripts/taste/assemble.py:205-250 | skills/taste-distillation/scripts/taste/assemble.py:205-250 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (45 lines × 3) · ×1
  • Duplicated block (45 lines × 3) skills/taste-application/scripts/falapi.py:681 — skills/taste-application/scripts/falapi.py:681-725 | skills/taste-application/scripts/taste/falapi.py:681-725 | skills/taste-distillation/scripts/taste/falapi.py:681-725 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (41–43 lines × 4) · ×1
  • Duplicated block (41–43 lines × 4) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49-91 | pi/core/skills/agent-self-evaluation/scripts/evaluate.py:203-243 | skills/agent-self-evaluation/scripts/evaluate.py:49-91 | skills/agent-self-evaluation/scripts/evaluate.py:203-243 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) skills/taste-application/scripts/falapi.py:487 — skills/taste-application/scripts/falapi.py:487-527 | skills/taste-application/scripts/taste/falapi.py:487-527 | skills/taste-distillation/scripts/taste/falapi.py:487-527 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:95 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:95-133 | skills/agent-self-evaluation/scripts/evaluate.py:95-133 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (72 lines × 2) · ×1
  • Duplicated block (72 lines × 2) skills/taste-application/scripts/taste/frames.py:251 — skills/taste-application/scripts/taste/frames.py:251-322 | skills/taste-distillation/scripts/taste/frames.py:251-322 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/frames.py:251` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (78 lines × 2) · ×1
  • Duplicated block (78 lines × 2) skills/taste-application/scripts/mint.py:40 — skills/taste-application/scripts/mint.py:40-117 | skills/taste-distillation/scripts/mint.py:40-117 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/mint.py:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) skills/taste-application/scripts/taste/grade.py:411 — skills/taste-application/scripts/taste/grade.py:411-486 | skills/taste-distillation/scripts/taste/grade.py:411-486 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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 (92 lines × 2) · ×1
  • Duplicated block (92 lines × 2) skills/taste-application/scripts/taste/assemble.py:83 — skills/taste-application/scripts/taste/assemble.py:83-174 | skills/taste-distillation/scripts/taste/assemble.py:83-174 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/assemble.py:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) skills/taste-application/scripts/distill.py:81 — skills/taste-application/scripts/distill.py:81-112 | skills/taste-distillation/scripts/distill.py:81-112 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28–30 lines × 3) · ×1
  • Duplicated block (28–30 lines × 3) skills/taste-application/scripts/taste/timeline.py:207 — skills/taste-application/scripts/taste/timeline.py:207-236 | skills/taste-application/scripts/tasteforge/export.py:45-72 | skills/taste-distillation/scripts/taste/timeline.py:207-236 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×1
  • Duplicated block (62 lines × 2) skills/taste-application/scripts/distill.py:224 — skills/taste-application/scripts/distill.py:224-285 | skills/taste-distillation/scripts/distill.py:224-285 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 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 (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:579 — .agents/skills/docs-governance/scripts/audit-docs.py:579-607 | pi/core/skills/docs-governance/scripts/audit-docs.py:579-607 | skills/docs-governance/scripts/audit-docs.py:579-607 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) skills/taste-application/scripts/taste/cadence.py:104 — skills/taste-application/scripts/taste/cadence.py:104-132 | skills/taste-distillation/scripts/taste/cadence.py:104-132 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (15–28 lines × 3) · ×1
  • Duplicated block (15–28 lines × 3) skills/taste-application/scripts/taste/timeline.py:161 — skills/taste-application/scripts/taste/timeline.py:161-188 | skills/taste-application/scripts/tasteforge/timeline.py:83-97 | skills/taste-distillation/scripts/taste/timeline.py:161-188 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/timeline.py:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:300 — .agents/skills/docs-governance/scripts/audit-docs.py:300-326 | pi/core/skills/docs-governance/scripts/audit-docs.py:300-326 | skills/docs-governance/scripts/audit-docs.py:300-326 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305-362 | skills/agent-self-evaluation/scripts/evaluate.py:305-362 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 282 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 (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:649 — .agents/skills/docs-governance/scripts/audit-docs.py:649-671 | pi/core/skills/docs-governance/scripts/audit-docs.py:649-671 | skills/docs-governance/scripts/audit-docs.py:649-671 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) skills/taste-application/scripts/taste/grade.py:371 — skills/taste-application/scripts/taste/grade.py:371-394 | skills/taste-distillation/scripts/taste/grade.py:371-394 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) skills/taste-application/scripts/taste/grade.py:566 — skills/taste-application/scripts/taste/grade.py:566-588 | skills/taste-distillation/scripts/taste/grade.py:566-588 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) skills/taste-application/scripts/taste/frames.py:49 — skills/taste-application/scripts/taste/frames.py:49-82 | skills/taste-distillation/scripts/taste/frames.py:49-82 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) skills/taste-application/scripts/apply.py:591 — skills/taste-application/scripts/apply.py:591-609 | skills/taste-application/scripts/distill.py:495-511 | skills/taste-distillation/scripts/distill.py:495-511 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/apply.py:591` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 3) · ×1
  • Duplicated block (37 lines × 3) skills/taste-application/scripts/falapi.py:754 — skills/taste-application/scripts/falapi.py:754-790 | skills/taste-application/scripts/taste/falapi.py:754-790 | skills/taste-distillation/scripts/taste/falapi.py:754-790 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 382 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 (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) skills/skill-comply/scripts/classifier.py:41 — skills/skill-comply/scripts/classifier.py:41-59 | skills/skill-comply/scripts/scenario_generator.py:36-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `skills/skill-comply/scripts/classifier.py:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–18 lines × 3) · ×1
  • Duplicated block (12–18 lines × 3) skills/taste-application/scripts/taste/timeline.py:79 — skills/taste-application/scripts/taste/timeline.py:79-96 | skills/taste-application/scripts/tasteforge/timeline.py:34-45 | skills/taste-distillation/scripts/taste/timeline.py:79-96 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) skills/taste-application/scripts/taste/plates.py:208 — skills/taste-application/scripts/taste/plates.py:208-237 | skills/taste-distillation/scripts/taste/plates.py:208-237 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) skills/taste-application/scripts/taste/render3d.py:92 — skills/taste-application/scripts/taste/render3d.py:92-131 | skills/taste-distillation/scripts/taste/render3d.py:92-131 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) skills/taste-application/scripts/distill.py:249 — skills/taste-application/scripts/distill.py:249-259 | skills/taste-application/scripts/tasteforge/distill.py:135-147 | skills/taste-distillation/scripts/distill.py:249-259 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `skills/taste-application/scripts/distill.py:260` calls `max` and `skills/taste-application/scripts/tasteforge/distill.py:149` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–10 lines × 3) · ×1
  • Duplicated block (6–10 lines × 3) skills/taste-application/scripts/distill.py:264 — skills/taste-application/scripts/distill.py:264-269 | skills/taste-application/scripts/tasteforge/distill.py:149-158 | skills/taste-distillation/scripts/distill.py:264-269 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/distill.py:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `skills/taste-application/scripts/distill.py:260` calls `max` and `skills/taste-application/scripts/tasteforge/distill.py:147` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) .agents/skills/docs-governance/scripts/audit-docs.py:259 — .agents/skills/docs-governance/scripts/audit-docs.py:259-267 | .agents/skills/docs-governance/scripts/audit-docs.py:321-329 | pi/core/skills/docs-governance/scripts/audit-docs.py:259-267 | pi/core/skills/docs-governance/scripts/audit-docs.py:321-329 | skills/docs-governance/scripts/audit-docs.py:259-267 | skills/docs-governance/scripts/audit-docs.py:321-329 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 559 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 (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) skills/taste-application/scripts/taste/grade.py:607 — skills/taste-application/scripts/taste/grade.py:607-639 | skills/taste-distillation/scripts/taste/grade.py:607-639 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (2–7 lines × 4) · ×1
  • Duplicated block (2–7 lines × 4) skills/taste-application/scripts/taste/grade.py:223 — skills/taste-application/scripts/taste/grade.py:223-224 | skills/taste-application/scripts/taste/grade.py:619-625 | skills/taste-distillation/scripts/taste/grade.py:223-224 | skills/taste-distillation/scripts/taste/grade.py:619-625 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) skills/taste-application/scripts/taste/grade.py:225 — skills/taste-application/scripts/taste/grade.py:225-232 | skills/taste-application/scripts/taste/grade.py:627-634 | skills/taste-distillation/scripts/taste/grade.py:225-232 | skills/taste-distillation/scripts/taste/grade.py:627-634 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 546 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.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Node.js 20 .tool-versions:1 — .tool-versions declares Node.js 20 as this project's version file, and Node.js 20, support ended 2026-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: Config (LCOM4 4) ecc2/src/config/mod.rs:220 — Config'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.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 4 typed · 1011 plain JS — the untyped files are docker/context-profiles/ai-eval-lib.js, docker/context-profiles/ai-eval.js, docker/context-profiles/complex-eval/build-corpus.js, docker/context-profiles/complex-eval/calibrate-stats.js, docker/context-profiles/complex-eval/cases/incident-triage/check.cjs, docker/context-profiles/complex-eval/cases/incident-triage/files/src/inventory-client.js (+1005 more).
R10 · Code Duplication · Forked directory tree (31 identical files, ~848 lines × 2 trees) · ×1
  • Forked directory tree (31 identical files, ~848 lines × 2 trees) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:1 — docker/context-profiles/complex-eval/cases3/ and docker/context-profiles/complex-eval/cases4/ are near-verbatim copies of each other: 31 files are byte-identical under the same relative paths (~848 lines; the trees hold 32 and 48 files). That is one structural fact, not 31 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Forked directory tree (15 identical files, ~674 lines × 2 trees) · ×1
  • Forked directory tree (15 identical files, ~674 lines × 2 trees) docker/context-profiles/complex-eval/reference3/chained-tickets/test/links.test.js:1 — docker/context-profiles/complex-eval/reference3/ and docker/context-profiles/complex-eval/reference4/ are near-verbatim copies of each other: 15 files are byte-identical under the same relative paths (~674 lines; the trees hold 15 and 21 files). That is one structural fact, not 15 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Duplication concentrated across 8 sibling directories (24 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (24 clone groups) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 — 24 duplicated blocks under docker/context-profiles/complex-eval/ have copies in at least two of the sibling directories cases, cases2, cases3, cases4, reference, reference2 (+2 more sibling(s) not listed) — 23 of them are reported below, and 1 is 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 · Duplication concentrated across 3 sibling directories (22 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (22 clone groups) docker/gateguard-effectiveness/run-intent.js:375 — 22 duplicated blocks under the repository root have copies in at least two of the sibling directories docker, scripts, skills — 19 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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 4 sibling directories (18 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (18 clone groups) scripts/hooks/ecc-context-monitor.js:64 — 18 duplicated blocks under scripts/ have copies in at least two of the sibling directories ci, codemaps, hooks, lib — 13 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (7 clone groups) scripts/lib/install-targets/claude-home.js:57 — 7 duplicated blocks under scripts/lib/ have copies in at least two of the sibling directories control-pane, eval-harness, install, install-targets, skill-evolution — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (200 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (200 matched lines × 2 locations) scripts/preview-pack-smoke.js:91 — scripts/preview-pack-smoke.js:91 · scripts/release-approval-gate.js:104 — the two spans are one implementation copied and then locally edited — 1146 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 (192 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (192 matched lines × 2 locations) scripts/lib/session-adapters/codex-worktree.js:12 — scripts/lib/session-adapters/codex-worktree.js:12 · scripts/lib/session-adapters/opencode.js:12 — the two spans are one implementation copied and then locally edited — 1189 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 (122 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (122 matched lines × 2 locations) docker/gateguard-effectiveness/run-intent.js:51 — docker/gateguard-effectiveness/run-intent.js:51 · docker/gateguard-effectiveness/run.js:36 — the two spans are one implementation copied and then locally edited — 1310 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 (109 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (109 matched lines × 2 locations) scripts/discussion-audit.js:217 — scripts/discussion-audit.js:217 · scripts/operator-readiness-dashboard.js:965 — the two spans are one implementation copied and then locally edited — 607 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (93 identical lines × 2 files) · ×1
  • Wholesale file copy (93 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 · docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:4 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (88 identical lines × 2 files) · ×1
  • Wholesale file copy (88 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:5 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (79 identical lines × 2 files) · ×1
  • Wholesale file copy (79 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:4 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (77 identical lines × 2 files) · ×1
  • Wholesale file copy (77 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:3 — these 2 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (69 identical lines × 2 files) · ×1
  • Wholesale file copy (69 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 · docker/context-profiles/complex-eval/reference4/production-ready/src/app.js:2 — these 2 files are line-for-line copies of one another — 69 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) scripts/discussion-audit.js:65 — scripts/discussion-audit.js:65 · scripts/platform-audit.js:77 — the two spans are one implementation copied and then locally edited — 428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (67 identical lines × 2 files) · ×1
  • Wholesale file copy (67 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs:4 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (64 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (64 matched lines × 2 locations) REDACTED:29 — REDACTED:29 · REDACTED:45 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (62 identical lines × 2 files) · ×1
  • Wholesale file copy (62 identical lines × 2 files) REDACTED:4 — REDACTED:4 · REDACTED:4 — these 2 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (62 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (62 matched lines × 2 locations) scripts/lib/install-targets/claude-home.js:15 — scripts/lib/install-targets/claude-home.js:15 · scripts/lib/install-targets/claude-project.js:12 — the two spans are one implementation copied and then locally edited — 326 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (59 identical lines × 2 files) · ×1
  • Wholesale file copy (59 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 · docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.js:2 — these 2 files are line-for-line copies of one another — 59 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) scripts/repair.js:20 — scripts/repair.js:20 · scripts/uninstall.js:30 — the two spans are one implementation copied and then locally edited — 407 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 (54 lines × 2 locations) · ×1
  • Duplicated block (54 lines × 2 locations) REDACTED:251 — REDACTED:251 · REDACTED: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.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (42 matched lines × 2 locations) scripts/lib/install/excluded-paths-reconciliation.js:116 — scripts/lib/install/excluded-paths-reconciliation.js:116 · scripts/lib/install/opencode-legacy-migration.js:114 — the two spans are one implementation copied and then locally edited — 300 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 (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 — docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/production-ready/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (35 matched lines × 2 locations) scripts/ci/issue-submission-guard.js:80 — scripts/ci/issue-submission-guard.js:80 · scripts/ci/pr-burst-guard.js:179 — the two spans are one implementation copied and then locally edited — 390 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 (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) scripts/hooks/pre-bash-git-push-reminder.js:17 — scripts/hooks/pre-bash-git-push-reminder.js:17 · scripts/hooks/pre-bash-tmux-reminder.js:22 — 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 (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) scripts/lib/github-discussions.js:15 — scripts/lib/github-discussions.js:15 · scripts/platform-audit.js:222 — 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 (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) REDACTED:495 — REDACTED:495 · REDACTED:584 — both copies are in the same file, so extract the 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 with local edits (28 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (28 matched lines × 2 locations) scripts/harness-audit.js:129 — scripts/harness-audit.js:129 · scripts/observability-readiness.js:68 — the two spans are one implementation copied and then locally edited — 146 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 (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) scripts/operator-readiness-dashboard.js:29 — scripts/operator-readiness-dashboard.js:29 · scripts/platform-audit.js:37 — 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.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 280, cognitive 539) · ×1
  • Complex function runTests (cyclomatic 280, cognitive 539) tests/hooks/gateguard-fact-force.test.js:794 — runTests has cyclomatic complexity 280 and cognitive complexity 539; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 270, cognitive 529) · ×1
  • Complex function runTests (cyclomatic 270, cognitive 529) tests/hooks/hooks.test.js:389 — runTests has cyclomatic complexity 270 and cognitive complexity 529; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 197, cognitive 391) · ×1
  • Complex function runTests (cyclomatic 197, cognitive 391) tests/lib/utils.test.js:30 — runTests has cyclomatic complexity 197 and cognitive complexity 391; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 180, cognitive 352) · ×1
  • Complex function runTests (cyclomatic 180, cognitive 352) tests/lib/session-manager.test.js:42 — runTests has cyclomatic complexity 180 and cognitive complexity 352; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 119, cognitive 235) · ×1
  • Complex function runTests (cyclomatic 119, cognitive 235) tests/lib/package-manager.test.js:77 — runTests has cyclomatic complexity 119 and cognitive complexity 235; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 117, cognitive 230) · ×1
  • Complex function runTests (cyclomatic 117, cognitive 230) tests/lib/session-aliases.test.js:52 — runTests has cyclomatic complexity 117 and cognitive complexity 230; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 75, cognitive 147) · ×1
  • Complex function runTests (cyclomatic 75, cognitive 147) tests/lib/install-lifecycle.test.js:334 — runTests has cyclomatic complexity 75 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 66, cognitive 129) · ×1
  • Complex function runTests (cyclomatic 66, cognitive 129) tests/hooks/hook-flags.test.js:64 — runTests has cyclomatic complexity 66 and cognitive complexity 129; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 resolveTaskContext (cyclomatic 64, cognitive 46) · ×1
  • Complex function resolveTaskContext (cyclomatic 64, cognitive 46) scripts/lib/context-selection.js:333 — resolveTaskContext has cyclomatic complexity 64 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validate (cyclomatic 60, cognitive 114) · ×1
  • Complex function validate (cyclomatic 60, cognitive 114) scripts/lib/install-state.js:43 — validate has cyclomatic complexity 60 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 53, cognitive 104) · ×1
  • Complex function runTests (cyclomatic 53, cognitive 104) tests/scripts/install-apply.test.js:104 — runTests has cyclomatic complexity 53 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 execute (cyclomatic 52, cognitive 73) · ×1
  • Complex function execute (cyclomatic 52, cognitive 73) scripts/lib/context-profile-commands.js:81 — execute has cyclomatic complexity 52 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handle (cyclomatic 52, cognitive 55) · ×1
  • Complex function handle (cyclomatic 52, cognitive 55) scripts/memory-mcp.mjs:365 — handle has cyclomatic complexity 52 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateInstallManifests (cyclomatic 51, cognitive 90) · ×1
  • Complex function validateInstallManifests (cyclomatic 51, cognitive 90) scripts/ci/validate-install-manifests.js:71 — validateInstallManifests has cyclomatic complexity 51 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 50, cognitive 97) · ×1
  • Complex function runTests (cyclomatic 50, cognitive 97) tests/hooks/suggest-compact.test.js:90 — runTests has cyclomatic complexity 50 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 48, cognitive 93) · ×1
  • Complex function runTests (cyclomatic 48, cognitive 93) tests/lib/selective-install.test.js:46 — runTests has cyclomatic complexity 48 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 uninstallLegacyCodexSync (cyclomatic 47, cognitive 78) · ×1
  • Complex function uninstallLegacyCodexSync (cyclomatic 47, cognitive 78) scripts/lib/codex-legacy-sync.js:521 — uninstallLegacyCodexSync has cyclomatic complexity 47 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 main (cyclomatic 46, cognitive 76) · ×1
  • Complex function main (cyclomatic 46, cognitive 76) scripts/codex/merge-mcp-config.js:207 — main has cyclomatic complexity 46 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 parse (cyclomatic 46, cognitive 51) · ×1
  • Complex function parse (cyclomatic 46, cognitive 51) scripts/lib/context-profile-commands.js:12 — parse has cyclomatic complexity 46 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function blankCommentsAndLiterals (cyclomatic 45, cognitive 97) · ×1
  • Complex function blankCommentsAndLiterals (cyclomatic 45, cognitive 97) tests/ci/gateguard-env-documented.test.js:72 — blankCommentsAndLiterals has cyclomatic complexity 45 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 44, cognitive 85) · ×1
  • Complex function runTests (cyclomatic 44, cognitive 85) tests/lib/claude-settings.test.js:146 — runTests has cyclomatic complexity 44 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 44, cognitive 54) · ×1
  • Complex function (anonymous) (cyclomatic 44, cognitive 54) REDACTED:195 — (anonymous) has cyclomatic complexity 44 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 handleApi (cyclomatic 43, cognitive 74) · ×1
  • Complex function handleApi (cyclomatic 43, cognitive 74) REDACTED:398 — handleApi has cyclomatic complexity 43 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 applyInstallPlanLocked (cyclomatic 43, cognitive 63) · ×1
  • Complex function applyInstallPlanLocked (cyclomatic 43, cognitive 63) scripts/lib/install/apply.js:808 — applyInstallPlanLocked has cyclomatic complexity 43 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 42, cognitive 68) · ×1
  • Complex function runTests (cyclomatic 42, cognitive 68) tests/hooks/pre-bash-dev-server-block.test.js:35 — runTests has cyclomatic complexity 42 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 normalizeInstallRequest (cyclomatic 41, cognitive 32) · ×1
  • Complex function normalizeInstallRequest (cyclomatic 41, cognitive 32) scripts/lib/install/request.js:101 — normalizeInstallRequest has cyclomatic complexity 41 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 push (cyclomatic 40, cognitive 73) · ×1
  • Complex function push (cyclomatic 40, cognitive 73) scripts/hooks/hook-input-limits.js:33 — push has cyclomatic complexity 40 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function transition (cyclomatic 40, cognitive 52) · ×1
  • Complex function transition (cyclomatic 40, cognitive 52) scripts/lib/agent-proximity/shadow-trail.js:211 — transition has cyclomatic complexity 40 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function scanCurrentTurn (cyclomatic 39, cognitive 62) · ×1
  • Complex function scanCurrentTurn (cyclomatic 39, cognitive 62) scripts/lib/gateguard-turn-scan.js:101 — scanCurrentTurn 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 buildChecks (cyclomatic 39, cognitive 35) · ×1
  • Complex function buildChecks (cyclomatic 39, cognitive 35) scripts/observability-readiness.js:113 — buildChecks has cyclomatic complexity 39 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 38, cognitive 73) · ×1
  • Complex function runTests (cyclomatic 38, cognitive 73) tests/scripts/skill-create-output.test.js:50 — runTests has cyclomatic complexity 38 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseArgs (cyclomatic 38, cognitive 35) · ×1
  • Complex function parseArgs (cyclomatic 38, cognitive 35) docker/gateguard-effectiveness/run-intent.js:45 — parseArgs has cyclomatic complexity 38 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 37, cognitive 71) · ×1
  • Complex function runTests (cyclomatic 37, cognitive 71) tests/hooks/governance-capture.test.js:27 — runTests has cyclomatic complexity 37 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runTests (cyclomatic 37, cognitive 47) · ×1
  • Complex function runTests (cyclomatic 37, cognitive 47) tests/lib/opencode-hook-consent-safety.test.js:169 — runTests has cyclomatic complexity 37 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · docker/context-profiles/ai-eval-lib.js · ×1
  • docker/context-profiles/ai-eval-lib.js: 895 lines of code docker/context-profiles/ai-eval-lib.js:1 — docker/context-profiles/ai-eval-lib.js has 895 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 · docker/gateguard-effectiveness/lib.js · ×1
  • docker/gateguard-effectiveness/lib.js: 447 lines of code docker/gateguard-effectiveness/lib.js:1 — docker/gateguard-effectiveness/lib.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 — This repository declares test tooling, and the ✓ above records that declaration — but docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×1
  • Untrusted text written into markup unescaped REDACTED:21 — `paste.content` is text this program did not author, and it is written into the text of an element 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. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Minor — 161 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate scripts/ci/issue-submission-guard.js:70 — `!/^[a-z\d-]+\/[a-z\d_.-]+$/i.test(repository) || !Number.isSafeInteger(number) || number < 1` appears character-identically in 2 files — scripts/ci/issue-submission-guard.js, scripts/ci/pr-burst-guard.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 scripts/hooks/bash-hook-dispatcher.js:90 — `!Number.isInteger(output.exitCode) || output.exitCode === 0` appears character-identically in 2 files — scripts/hooks/bash-hook-dispatcher.js, scripts/hooks/observe-runner.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 docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:31 — `!Number.isInteger(ttlSeconds) || ttlSeconds < 1 || ttlSeconds > MAX_TTL_SECONDS` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js, docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.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 scripts/hooks/hook-input.js:17 — `!Number.isSafeInteger(parsed) || parsed <= 0` appears character-identically in 2 files — scripts/hooks/hook-input.js, scripts/hooks/lifecycle-hook-bootstrap.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 docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:145 — `!bareImport && !pkg.dependencies && !pkg.devDependencies` appears character-identically in 2 files — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs, docker/context-profiles/complex-eval/cases2/keccak-selector/check.cjs. 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 scripts/lib/install/hook-consent.js:62 — `!config || typeof config !== 'object' || Array.isArray(config)` appears character-identically in 2 files — scripts/lib/install/hook-consent.js, scripts/lib/mcp-config.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 scripts/lib/context-profile-commands.js:151 — `!current.configured || current.recoveryRequired` appears character-identically in 2 files — scripts/lib/context-profile-commands.js, scripts/lib/context-profile-native.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 scripts/ci/check-hooks-schema-keys.js:117 — `!data || typeof data !== 'object' || Array.isArray(data)` appears character-identically in 2 files — scripts/ci/check-hooks-schema-keys.js, scripts/ci/validate-hooks.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 scripts/ci/issue-submission-guard.js:127 — `!dryRun && process.env.PR_MODERATION_BLOCK_TOKEN` appears character-identically in 2 files — scripts/ci/issue-submission-guard.js, scripts/ci/pr-burst-guard.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 scripts/gemini-adapt-agents.js:234 — `!entry.isFile() || !entry.name.endsWith('.md')` appears character-identically in 2 files — scripts/gemini-adapt-agents.js, scripts/qwen-adapt-agents.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 .codebuddy/install.js:127 — `!extension || entry.name.endsWith(extension)` appears character-identically in 2 files — .codebuddy/install.js, scripts/harness-audit.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 scripts/lib/install/antigravity-agent.js:36 — `!frontmatter || typeof frontmatter !== 'object' || Array.isArray(frontmatter)` appears character-identically in 3 files — scripts/lib/install/antigravity-agent.js, scripts/lib/install/copilot-agent.js, scripts/lib/install/copilot-rule.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 docker/gateguard-effectiveness/evidence.js:86 — `!fs.existsSync(file) || !fs.statSync(file).isFile()` appears character-identically in 2 files — docker/gateguard-effectiveness/evidence.js, scripts/lib/context-pack-registry.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 scripts/lib/install-targets/cursor-project.js:40 — `!fs.existsSync(sourcePath) || !fs.statSync(sourcePath).isFile()` appears character-identically in 2 files — scripts/lib/install-targets/cursor-project.js, scripts/lib/install-targets/kimi-project.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 docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:53 — `!input || typeof input.title !== 'string' || !input.title.trim()` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js, docker/context-profiles/complex-eval/reference4/production-ready/src/app.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 scripts/lib/install/apply.js:199 — `!isPlainObject(baseValue) || !isPlainObject(patchValue)` appears character-identically in 2 files — scripts/lib/install/apply.js, scripts/lib/install/json-ops.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 scripts/lib/install/apply.js:334 — `!operation || operation.kind !== 'copy-file'` appears character-identically in 2 files — scripts/lib/install/apply.js, scripts/lib/install/claude-skill-migration.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 scripts/lib/context-carriers.js:24 — `!options || typeof options !== 'object' || Array.isArray(options)` appears character-identically in 3 files — scripts/lib/context-carriers.js, scripts/lib/context-profile-native.js, scripts/lib/context-profile-store.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 .cursor/hooks/adapter.js:135 — `!parsed || typeof parsed !== 'object' || Array.isArray(parsed)` appears character-identically in 11 files — .cursor/hooks/adapter.js, scripts/lib/agent-data-home.js, scripts/lib/astra-review/fix.js, scripts/lib/astra-review/prompt.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 docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:40 — `!parsed || typeof parsed.eventId !== 'string' || !parsed.eventId || typeof parsed.orderId !== 'string' || !parsed.orderId || !Number.isInteg…` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js, docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.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 docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs:114 — `!pkg.dependencies && !pkg.devDependencies` appears character-identically in 5 files — docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs, docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs, docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs. 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 scripts/lib/install/antigravity-legacy-migration.js:69 — `!rootStat.isDirectory() || rootStat.isSymbolicLink() || !stateStat.isFile() || stateStat.isSymbolicLink()` appears character-identically in 2 files — scripts/lib/install/antigravity-legacy-migration.js, scripts/lib/install/opencode-legacy-migration.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 docker/gateguard-effectiveness/evidence.js:43 — `!row.providerError && !row.timedOut && !row.judgeFailed` appears character-identically in 2 files — docker/gateguard-effectiveness/evidence.js, docker/gateguard-effectiveness/lib.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 scripts/lib/gateguard-search-evidence.js:511 — `!scan || !Array.isArray(scan.searches) || scan.searches.length === 0` appears character-identically in 2 files — scripts/lib/gateguard-search-evidence.js, scripts/lib/gateguard-turn-scan.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 scripts/lib/skill-evolution/provenance.js:30 — `!skillPath || typeof skillPath !== 'string'` appears character-identically in 2 files — scripts/lib/skill-evolution/provenance.js, scripts/lib/skill-evolution/versioning.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.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging skills/delivery-gate/hooks/quality-gate.py:214 — `warning` at line 214 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 ecc2/src/main.rs:4048 — `warn!` at line 4048 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 ecc2/src/notifications.rs:268 — `warn!` at line 268 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 ecc2/src/notifications.rs:305 — `warn!` at line 305 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 ecc2/src/notifications.rs:333 — `warn!` at line 333 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 ecc2/src/worktree/mod.rs:129 — `info!` at line 129 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/worktree/mod.rs:142 — `warn!` at line 142 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 ecc2/src/worktree/mod.rs:182 — `warn!` at line 182 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 ecc2/src/worktree/mod.rs:188 — `warn!` at line 188 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 ecc2/src/worktree/mod.rs:207 — `warn!` at line 207 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 ecc2/src/worktree/mod.rs:210 — `warn!` at line 210 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 ecc2/src/worktree/mod.rs:227 — `warn!` at line 227 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 ecc2/src/worktree/mod.rs:987 — `warn!` at line 987 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 ecc2/src/worktree/mod.rs:1017 — `warn!` at line 1017 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 ecc2/src/worktree/mod.rs:1042 — `warn!` at line 1042 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 ecc2/src/worktree/mod.rs:1112 — `warn!` at line 1112 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 ecc2/src/worktree/mod.rs:1452 — `warn!` at line 1452 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 ecc2/src/tui/dashboard.rs:2183 — `warn!` at line 2183 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 ecc2/src/tui/dashboard.rs:2217 — `warn!` at line 2217 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 ecc2/src/tui/dashboard.rs:2249 — `warn!` at line 2249 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 ecc2/src/tui/dashboard.rs:2386 — `warn!` at line 2386 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 ecc2/src/tui/dashboard.rs:2414 — `warn!` at line 2414 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 ecc2/src/tui/dashboard.rs:2445 — `warn!` at line 2445 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 ecc2/src/tui/dashboard.rs:2521 — `warn!` at line 2521 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 ecc2/src/tui/dashboard.rs:2540 — `warn!` at line 2540 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×34
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/files/src/charge.js:44 — `readLedger` 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 docker/context-profiles/complex-eval/cases4/recurring-incident/files/src/store.js:11 — `load` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:71 — `readLedger` 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 docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:67 — `readLedger` 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 REDACTED:92 — `resolveSandboxCli` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/eval-harness/receipt.js:92 — `projectionMatches` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/install/plan.js:42 — `getManifestVersion` swallows every exception into `return 1` — 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 scripts/ci/scan-supply-chain-iocs.js:500 — `readText` 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 scripts/ci/scan-supply-chain-iocs.js:508 — `sha256File` 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 scripts/ci/scan-supply-chain-iocs.js:595 — `claudePermissionDenyRanges` 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 scripts/claw.js:44 — `loadHistory` 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 scripts/codemaps/generate.ts:157 — `buildTree` 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 scripts/codex/check-plugin-cache.js:134 — `listInstalledVersions` 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 scripts/codex/check-plugin-cache.js:171 — `pathExists` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/codex-legacy-sync.js:444 — `defaultGetHooksPath` 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 scripts/lib/control-pane/proximity.js:96 — `untrackedFiles` 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 scripts/lib/control-pane/proximity.js:137 — `defaultChangedFilesFor` 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 REDACTED:79 — `readFrontmatter` 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 REDACTED:100 — `loadSkills` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:118 — `loadRules` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:952 — `loadActivity` 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 scripts/gateguard-report.js:60 — `loadMetrics.files` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/harness-audit-consumer.js:32 — `safeRead` 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 scripts/lib/harness-audit-consumer.js:44 — `visit` (in `walkFiles`) 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 scripts/lib/harness-audit-consumer.js:80 — `walkFiles` 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.
  • + 9 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×26
  • redundant comment scripts/ci/validate-hooks.js:494 — "Validate against JSON schema" repeats the code it sits on: 4 of its 4 words (validate, against, json, schema) are already in `if (validateAgainstSchema(data, HOOKS_SCHEMA_PATH, 'hooks.json'))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment scripts/codemaps/generate.ts:303 — "Classify files into areas" repeats the code it sits on: 3 of its 3 words (classify, files, areas) are already in `const areas = classifyFiles(allFiles);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment scripts/hooks/gateguard-fact-force.js:810 — "One short-option cluster of a dd launcher, same contract as above." repeats the code it sits on: 5 of its 6 words (short, option, cluster, dd, launcher) are already in `function ddLauncherShortClusterStep(arg, options)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:101 — "Check for console.log" repeats the code it sits on: 3 of its 3 words (check, console, log) are already in `if (line.includes('console.log') && !line.trim().startsWith('//') && !line.trim().startsWith('*') && !line.trim().starts …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:195 — "Check message length" repeats the code it sits on: 3 of its 3 words (check, message, length) are already in `if (message.length > 72)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:427 — "Get staged files" repeats the code it sits on: 3 of its 3 words (get, staged, files) are already in `const stagedFiles = getStagedFiles();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:437 — "Check each staged file" repeats the code it sits on: 3 of its 3 words (check, staged, file) are already in `const filesToCheck = stagedFiles.filter(shouldCheckFile);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/evaluate-session.test.js:343 — "Write corrupt JSON to the config file" repeats the code it sits on: 5 of its 5 words (write, corrupt, json, config, file) are already in `fs.writeFileSync(configPath, 'NOT VALID JSON {{{ corrupt data !!!', 'utf8');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/governance-capture.test.js:638 — "Bash command with force push AND secret in command" repeats the code it sits on: 4 of its 5 words (bash, command, force, push) are already in `const events = analyzeForGovernanceEvents({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/hook-flags.test.js:365 — "getDisabledHookIds tests" repeats the code it sits on: 4 of its 5 words (get, disabled, hook, ids) are already in `console.log('\ngetDisabledHookIds:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/hooks.test.js:418 — 13 comments in this file only repeat the code they sit on (lines 418, 1185, 1887, 2003, 2227, 2776, 3156, 5071, 5254, 5965, 6241, 6560, 6563), for example "session-start.js edge cases". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/suggest-compact.test.js:174 — "Environment variable handling" repeats the code it sits on: 3 of its 3 words (environment, variable, handling) are already in `console.log('\nEnvironment variable handling:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/suggest-compact.test.js:220 — "Corrupted counter file" repeats the code it sits on: 3 of its 3 words (corrupted, counter, file) are already in `console.log('\nCorrupted counter file:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/hooks/suggest-compact.test.js:442 — "── Round 64: default session ID fallback ──" repeats the code it sits on: 6 of its 6 words (round, 64, default, session, id, fallback) are already in `console.log('\nDefault session ID fallback (Round 64):');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/gateguard-target-class.test.js:153 — "── canonicalPathKey ──" repeats the code it sits on: 3 of its 3 words (canonical, path, key) are already in `console.log('\ncanonicalPathKey:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/package-manager.test.js:243 — 24 comments in this file only repeat the code they sit on (lines 243, 404, 431, 441, 468, 487, 548, 571, 615, 654, 688, 776, 859, 877, 968, 1196, 1344, 1372, 1521, 1574, 1591, 1609, 1630, 1737), for example "getAvailablePackageManagers tests". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/project-detect.test.js:191 — "TypeScript/JavaScript detection" repeats the code it sits on: 4 of its 4 words (type, script, java, detection) are already in `console.log('\nTypeScript/JavaScript Detection:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/project-detect.test.js:496 — "Dart/Flutter detection" repeats the code it sits on: 3 of its 3 words (dart, flutter, detection) are already in `console.log('\nDart/Flutter Detection:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/session-aliases.test.js:442 — 13 comments in this file only repeat the code they sit on (lines 442, 492, 534, 562, 619, 642, 701, 785, 1212, 1558, 1592, 1727, 1770), for example "listAliases edge cases". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/session-bridge.test.js:105 — "writeBridgeAtomic + readBridge roundtrip" repeats the code it sits on: 4 of its 5 words (write, bridge, atomic, read) are already in `console.log('\nwriteBridgeAtomic / readBridge:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/session-manager.test.js:534 — 21 comments in this file only repeat the code they sit on (lines 534, 580, 630, 878, 904, 1001, 1311, 1373, 1554, 1615, 1631, 1642, 1658, 1692, 2005, 2154, 2287, 2317, 2377, 2415, 2572), for example "parseSessionMetadata edge cases". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/shell-split.test.js:77 — "Escaped operators outside quotes" repeats the code it sits on: 4 of its 4 words (escaped, operators, outside, quotes) are already in `console.log('\nEscaped operators outside quotes:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/transcript-context.test.js:83 — 8 comments in this file only repeat the code they sit on (lines 83, 200, 353, 386, 432, 449, 474, 488), for example "── readLatestContextTokens ──". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/lib/utils.test.js:772 — 23 comments in this file only repeat the code they sit on (lines 772, 797, 885, 1017, 1046, 1108, 1134, 1150, 1158, 1310, 1361, 1468, 1515, 1538, 1586, 1602, 1696, 1948, 2109, 2235, 2271, 2376, 2617), for example "getGitModifiedFiles() tests". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/scripts/setup-package-manager.test.js:164 — "--detect output completeness" repeats the code it sits on: 3 of its 3 words (detect, output, completeness) are already in `console.log('\n--detect output completeness:');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 1 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×4
  • Silent fallback default on Err ecc2/src/tui/dashboard.rs:5410 — `session_graph_metrics_lines` 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 ecc2/src/tui/dashboard.rs:5454 — `session_graph_recall_lines` 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 ecc2/src/session/manager.rs:2888 — `graph_context_matched_terms` 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 ecc2/src/tui/dashboard.rs:8869 — `extract_tool_command` turns every `Err` into `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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×2
  • Silent fallback default on parse failure skills/continuous-learning-v2/scripts/instinct-cli.py:483 — `load_registry` returns `{}` when `(FileNotFoundError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure skills/continuous-learning-v2/scripts/instinct-cli.py:683 — `_append_observations` returns `0` when `(OSError, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: ecc2/src/tui/dashboard.rs, ecc2/src/session/mod.rs, ecc2/src/notifications.rs, ecc2/src/observability/mod.rs, ecc2/src/session/runtime.rs, ecc2/src/tui/widgets.rs, ecc2/src/tui/app.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 5 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 (13 single-owned of 107 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; 107 of the 134 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: hooks/hermes/config-protection.py, hooks/hermes/check-console-log.py, skills/docs-governance/scripts/audit-docs.py, pi/core/skills/agent-self-evaluation/scripts/evaluate.py, skills/ios-icon-gen/scripts/generate_icons.swift, src/llm/providers/openai_compat.py.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 28 project(s) overshoot their size bounds, lowering Project Cohesion to 8.6/10. The most over is `(repository root)` (111146 LoC, 569 module-visible types across 133 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `docker/context-profiles/complex-eval/cases/sentinel-api/files`, `docker/context-profiles/complex-eval/cases/webhook-relay/files`, `docker/context-profiles/complex-eval/cases2/event-stats-api/files`, `docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files` and 3 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 15 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
R7 · Dead Code · Unused module-local declaration '_test' · ×1
  • Unused module-local declaration '_test' tests/integration/hooks.test.js:19 — 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.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 1/5 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex skills/delivery-gate/hooks/quality-gate.py:128 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
Minor — 23 finding(s)
D10 · Test Quality · Skipped (documented) · ×15
  • Skipped (documented): (unnamed test) tests/scripts/profile.test.js:198 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): real file symlink resources fail closed when host privileges permit tests/lib/context-pack-registry.test.js:127 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): native executable FIFO is rejected without opening a blocking descriptor tests/lib/context-profile-native.test.js:257 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): managed ${corruption} files block status, apply, and rollback tests/lib/context-profile-store.test.js:81 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) tests/hooks/ecc-statusline-project-plugins.test.js:53 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): permission changes during reading invalidate the pinned rule snapshot tests/hooks/hookify-file-race.test.js:210 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): replacement of the rule directory cannot read outside-project rule data tests/hooks/hookify-file-race.test.js:233 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): platforms without O_NOFOLLOW reject a raced leaf symlink before any read tests/hooks/hookify-file-race.test.js:249 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a FIFO is opened nonblocking and rejected without consuming bytes tests/hooks/hookify-file-race.test.js:312 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) tests/docs/story-lifecycle-errors.test.js:112 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/docs/story-lifecycle-table-projection.test.js:174 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/agent-payment-x402-doc.test.js:192 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/agent-payment-x402-seller-guard.test.js:323 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/context-profiles.test.js:37 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/run-all.test.js:276 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D12 · Dependency Hygiene · Outdated · ×7
  • Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: sha2 — `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.1.6+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.26.1 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names scripts/lib/package-manager.js:162 — 7 of 222 documented parameters and 5 of 898 summaries in `ecc-universal` only repeat the member or parameter name (e.g. "Options" for `options`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

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

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

Run 01a1d581-83c0-7c15-b05b-24ef638b999e · 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