769 files · 263,911 lines · 4,662 callables · 689 classes. Thresholds: func 6/4 · block 20/8 · seg 20/10
Type/docstring adoption and public API surface are shown as facts, not style pressure.
Directories with the highest concentration of findings by category.
codeclone/surfaces/cli Productioncodeclone/surfaces/cli/setup Productioncodeclone/memory/ingest Productioncodeclone/memory/retrieval Productioncodeclone/analytics/clustering Productioncodeclone/surfaces/cli Productioncodeclone/surfaces/cli/setup Productioncodeclone/memory/ingest Productioncodeclone/memory/retrieval Productioncodeclone/analytics/clustering Production43 candidates across 769 ranked modules — disproportionate size, complexity, or coupling.
tests/test_cli_setup.pyTeststests/test_cli_audit.pyTeststests/test_analytics_integration.pyTeststests/test_mcp_service.pyTeststests/test_analytics_foundation.pyTestsDimension scores across all quality axes.
| Class ? | File ? | CBO ? | Risk ? | Coupled classes ? |
|---|---|---|---|---|
| AggregatesView | codeclone/observability/views.py | 9 | medium | AgentViewAnalysisPhaseRowDbCostRow(+6 more) |
| FileMetrics | codeclone/models.py | 9 | medium | ClassMetricsDeadCandidateFunction..hipFacts(+6 more) |
| ProjectMetrics | codeclone/models.py | 7 | medium | ApiSurfaceSnapshotDeadItemHealthScore(+4 more) |
| LaneProjectionProbePayload | codeclone/memory/semantic/projection_probe.py | 6 | medium | _Distrib..nPayload_Overflo..ePayload_TokenDi..nPayload(+3 more) |
| PhaseLedger | codeclone/analysis/phase_ledger.py | 6 | medium | AnalysisPhaseKeyAnalysisVolumeKeyPhaseSnapshot(+3 more) |
| _FileEntryV29 | codeclone/cache/entries.py | 5 | low | _FileEnt..sisFacts_FileEntryBase_FileEnt..ityFacts(+2 more) |
| _RuntimeReachabilityVisitor | codeclone/analysis/reachability.py | 5 | low | _Provide..stration_RouteDe..rFactory_RouteRegistration(+2 more) |
| _FakeTable | tests/test_lancedb_backend_mocked.py | 4 | low | _FakeArrowTable_FakeMergeInsert_FakeSchema(+1 more) |
| FastEmbedEmbeddingProvider | codeclone/memory/embedding/fastembed_provider.py | 4 | low | _TextEmb..ingModel_Tokeniz..extModelimportlib(+1 more) |
| AnalyticsVectorStore | codeclone/analytics/store/vectors_lancedb.py | 4 | low | _LanceConnection_LanceTableimportlib(+1 more) |
| _MCPSessionIntentMixin | codeclone/surfaces/mcp/_session_intent_mixin.py | 4 | low | _RecoveryRun_RecoveryTargetdatetime(+1 more) |
| PatchTrailInputs | codeclone/memory/trajectory/dto.py | 4 | low | BlastRad..SnapshotHygieneSnapshotPatchTra..nceInput(+1 more) |
| RecordBatch | codeclone/memory/models.py | 4 | low | MemoryEvidenceMemoryLinkMemoryRecord(+1 more) |
| _FileEntryQualityFacts | codeclone/cache/entries.py | 4 | low | ClassMetricsDictModuleDo..rageDictModuleTy..rageDict(+1 more) |
| _FileEntryAnalysisFacts | codeclone/cache/entries.py | 4 | low | DeadCandidateDictModuleDepDictRuntimeR..FactDict(+1 more) |
| ClusteringProfileManifest | codeclone/analytics/profiles/models.py | 4 | low | ProfileA..cabilityProfileR..ngPolicyProfileSearchSpace(+1 more) |
| _ManifestModel | codeclone/analytics/profiles/loader.py | 4 | low | _Applica..ityModel_RankingModel_SearchSpaceModel(+1 more) |
| _ArgumentParser | codeclone/config/argparse_builder.py | 3 | low | _TextWriterargparsesys |
| SqliteWorkspaceIntentStore | codeclone/surfaces/mcp/_workspace_intent_store.py | 3 | low | datetimesqlite3threading |
| AuditIndexSource | codeclone/memory/semantic/sources.py | 3 | low | SourceScanSourceScanErrorsqlite3 |
| AstNormalizer | codeclone/analysis/normalizer.py | 3 | low | Normaliz..onConfigastcopy |
| WorkspaceHygieneResult | codeclone/surfaces/mcp/_workspace_hygiene.py | 3 | low | DirtyAttributionDirtySnapshotForeignD..yOverlap |
| CodeCloneMCPRunStore | codeclone/surfaces/mcp/_session_shared.py | 3 | low | MCPRunNo..undErrorMCPRunRecordMCPServi..actError |
| IntentRecord | codeclone/surfaces/mcp/_intent.py | 3 | low | IntentCheckResultIntentScopeIntentStatus |
| TraceView | codeclone/observability/views.py | 3 | low | AggregatesViewOperationViewWaterfallGroup |
| Trajectory | codeclone/memory/trajectory/models.py | 3 | low | TrajectoryEvidenceTrajectoryStepTrajectorySubject |
| _LanceTable | codeclone/memory/semantic/lancedb_backend.py | 3 | low | _LanceMergeInsert_LanceSchema_LanceSearchQuery |
| LanceDbSemanticIndex | codeclone/memory/semantic/lancedb_backend.py | 3 | low | _LanceConnection_LanceTableimportlib |
| _FunctionStructureScanner | codeclone/findings/structural/detectors.py | 3 | low | Function..ureFactsastsys |
| PayloadFootprint | codeclone/audit/reader.py | 3 | low | TopPayloadTypeTokenProfileWorkflow..nProfile |
| _LanceTable | codeclone/analytics/store/vectors_lancedb.py | 3 | low | _ArrowSchema_LanceMergeInsert_LanceSearchQuery |
| TestControllerQueryFlagValidation | tests/test_cli_audit.py | 2 | low | pytestwf |
| TrajectoryIndexSource | codeclone/memory/semantic/sources.py | 2 | low | SourceScan_Traject..eadStore |
| MemoryIndexSource | codeclone/memory/semantic/sources.py | 2 | low | SourceScan_MemoryReadStore |
| DeterministicHashEmbeddingProvider | codeclone/memory/embedding/__init__.py | 2 | low | hashlibmath |
| _FixedExecutor | tests/test_cli_inprocess.py | 2 | low | _FalseExitContext_FixedFuture |
| _Harness | tests/test_semantic_incremental_sourcing.py | 2 | low | _CountingWriter_Instrum..edSource |
| _FakeInnerModel | tests/test_semantic_embedding.py | 2 | low | _FakeEncoding_FakeTokenizer |
| _OpenTableFailsDb | tests/test_lancedb_backend_mocked.py | 2 | low | _FakeDb_FakeTable |
| _DummyExecutor | tests/test_cli_inprocess.py | 2 | low | _DummyFuture_FalseExitContext |
| TestRunPreAnalysisControllerQuery | tests/test_cli_audit.py | 2 | low | pytestwf |
| _Table | tests/test_analytics_store.py | 2 | low | _Merge_Query |
| SimpleMCPTool | codeclone/surfaces/mcp/tools/_base.py | 2 | low | MCPToolSchemaMCPToolSession |
| MCPTool | codeclone/surfaces/mcp/tools/_base.py | 2 | low | MCPToolSchemaMCPToolSession |
| MCPSession | codeclone/surfaces/mcp/session.py | 2 | low | ostime |
| WorkspaceIntentDocument | codeclone/surfaces/mcp/_workspace_intent_models.py | 2 | low | IntentIn..ityModelIntentScopeModel |
| MCPRunRecord | codeclone/surfaces/mcp/_session_shared.py | 2 | low | MCPAnalysisRequestMCPUnitLocation |
| ProbedCapability | codeclone/surfaces/cli/setup/engine/capabilities.py | 2 | low | CapabilityAxesCapabilityMeta |
| OperationRecord | codeclone/observability/models.py | 2 | low | ProfileSampleSpanRecord |
| MetricFamily | codeclone/metrics/_base.py | 2 | low | MetricAggregateMetricPr..tContext |
| Category ? | Capability | Evidence | Source | Location ? | Review |
|---|---|---|---|---|---|
| Process boundary | Subprocess import | subprocess | Production | .github/actions/codeclone/_action_impl.py:22 | Module · capability present |
| Filesystem mutation | Builtin open write | open[mode=a] | Production | .github/actions/codeclone/_action_impl.py:152 | Callable · exact evidence |
| Process boundary | Subprocess run | subprocess.run | Production | .github/actions/codeclone/_action_impl.py:205 | Callable · exact evidence |
| Filesystem mutation | Builtin open write | open[mode=a] | Production | .github/actions/codeclone/_action_impl.py:262 | Callable · exact evidence |
| Process boundary | Subprocess import | subprocess | Production | benchmarks/run_benchmark.py:15 | Module · capability present |
| Process boundary | Subprocess run | subprocess.run | Production | benchmarks/run_benchmark.py:282-288 | Callable · exact evidence |
| Filesystem mutation | Shutil rmtree | shutil.rmtree | Production | benchmarks/run_benchmark.py:392 | Callable · exact evidence |
| Process boundary | Subprocess run | subprocess.run | Production | benchmarks/run_benchmark.py:499-505 | Callable · exact evidence |
| Filesystem mutation | Shutil rmtree | shutil.rmtree | Production | benchmarks/run_benchmark.py:883 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib.metadata.PackageNotFoundError | Production | codeclone/__init__.py:7 | Module · capability present |
| Dynamic loading | Importlib import | importlib.metadata.version | Production | codeclone/__init__.py:7 | Module · capability present |
| Dynamic loading | Importlib import | importlib | Production | codeclone/analytics/capabilities.py:9 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/capabilities.py:24 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib | Production | codeclone/analytics/clustering/pipeline.py:9 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/clustering/pipeline.py:77 | Callable · exact evidence |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/clustering/pipeline.py:88 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib.metadata.PackageNotFoundError | Production | codeclone/analytics/clustering/sweep.py:12 | Module · capability present |
| Dynamic loading | Importlib import | importlib.metadata.version | Production | codeclone/analytics/clustering/sweep.py:12 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/analytics/corpus/adapters/intent_historical.py:10 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/analytics/corpus/registry_overlay.py:10 | Module · capability present |
| Dynamic loading | Importlib import | importlib | Production | codeclone/analytics/embedding/generation.py:9 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/embedding/generation.py:34 | Callable · exact evidence |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/embedding/generation.py:50 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib.resources.files | Production | codeclone/analytics/profiles/loader.py:12 | Module · capability present |
| Dynamic loading | Importlib import | importlib.resources.files | Production | codeclone/analytics/profiles/registry.py:11 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/analytics/schema.py:11 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/analytics/store/sqlite.py:10 | Module · capability present |
| Dynamic loading | Importlib import | importlib | Production | codeclone/analytics/store/vectors_lancedb.py:10 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/store/vectors_lancedb.py:78 | Callable · exact evidence |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/analytics/store/vectors_lancedb.py:112 | Callable · exact evidence |
| Crypto transport | Secrets import | secrets | Production | codeclone/audit/events.py:11 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/audit/reader.py:10 | Module · capability present |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/audit/schema.py:9 | Module · capability present |
| Crypto transport | Hmac import | hmac | Production | codeclone/baseline/clone_baseline.py:9 | Module · capability present |
| Crypto transport | Hmac import | hmac | Production | codeclone/baseline/metrics_baseline.py:9 | Module · capability present |
| Crypto transport | Hmac import | hmac | Production | codeclone/cache/integrity.py:10 | Module · capability present |
| Dynamic loading | Importlib import | importlib.util.find_spec | Production | codeclone/config/observability.py:21 | Module · capability present |
| Dynamic loading | Importlib import | importlib | Production | codeclone/config/pyproject_loader.py:8 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/config/pyproject_loader.py:373 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib | Production | codeclone/core/entrypoints.py:9 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/core/entrypoints.py:50 | Callable · exact evidence |
| Dynamic loading | Importlib import | importlib | Production | codeclone/memory/embedding/fastembed_provider.py:9 | Module · capability present |
| Dynamic loading | Import module | importlib.import_module | Production | codeclone/memory/embedding/fastembed_provider.py:188 | Callable · exact evidence |
| Database boundary | Sqlite3 import | sqlite3 | Production | codeclone/memory/experience/store.py:13 | Module · capability present |
| Crypto transport | Hmac import | hmac | Production | codeclone/memory/ide_governance.py:10 | Module · capability present |
| Crypto transport | Secrets import | secrets | Production | codeclone/memory/ide_governance.py:11 | Module · capability present |
| Network boundary | Urllib import | urllib.parse.quote | Production | codeclone/memory/identity.py:9 | Module · capability present |
| Process boundary | Subprocess import | subprocess | Production | codeclone/memory/ingest/extractors.py:11 | Module · capability present |
| Process boundary | Subprocess run | subprocess.run | Production | codeclone/memory/ingest/extractors.py:801-814 | Callable · exact evidence |
| Process boundary | Subprocess import | subprocess | Production | codeclone/memory/jobs/spawn.py:10 | Module · capability present |
| Module | Fan-in | Fan-out | Score | Status | Signals |
|---|---|---|---|---|---|
| tests.test_mcp_service | 0 | 63 | candidate | dependency_pressurerepeated_import_pressurechain_bottleneckhigh_instability | |
| tests.test_cli_setup | 0 | 26 | candidate | dependency_pressurerepeated_import_pressurechain_bottleneckhigh_instability | |
| codeclone.memory.sqlite_store | 42 | 12 | candidate | dependency_pressurerepeated_import_pressurechain_bottleneckcentral_sink | |
| codeclone.surfaces.mcp._session_workflow_mixin | 2 | 19 | candidate | dependency_pressurerepeated_import_pressurechain_bottleneckhigh_instability | |
| tests.test_analytics_foundation | 0 | 33 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| codeclone.surfaces.cli.workflow | 8 | 30 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_analytics_integration | 0 | 26 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_cli_audit | 0 | 10 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| codeclone.surfaces.mcp._session_memory_mixin | 5 | 26 | candidate | dependency_pressurechain_bottleneckhigh_instability | |
| codeclone.report.meta | 44 | 5 | non candidate | dependency_pressurechain_bottleneckcentral_sink | |
| tests.test_cli_inprocess | 1 | 20 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_report_contract_coverage | 0 | 16 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_cli_mascot_help | 0 | 12 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_audit_writer | 0 | 5 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| codeclone.utils.json_io | 33 | 0 | non candidate | dependency_pressurechain_bottleneckcentral_sink | |
| codeclone.memory.retrieval.service | 4 | 21 | candidate | dependency_pressurechain_bottleneckhigh_instability | |
| tests.test_report | 0 | 21 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| codeclone.audit.reader | 27 | 4 | candidate | dependency_pressurechain_bottleneckcentral_sink | |
| tests.test_memory_jobs_coverage | 0 | 19 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_html_report | 0 | 18 | candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_semantic_rebuild_workflow | 0 | 9 | non candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| codeclone.surfaces.cli.types | 26 | 1 | non candidate | dependency_pressurerepeated_import_pressurecentral_sink | |
| codeclone.surfaces.cli.memory_analysis | 2 | 17 | non candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_memory_staleness | 0 | 13 | non candidate | dependency_pressurerepeated_import_pressurehigh_instability | |
| tests.test_semantic_embedding | 0 | 10 | candidate | dependency_pressurerepeated_import_pressurehigh_instability |
| Module | File ? | Score | Status | LOC | Fan-in/out | Complexity total |
|---|---|---|---|---|---|---|
| tests.test_cli_setup | tests/test_cli_setup.py | candidate | 3132 | 0/26 | 125 | |
| tests.test_cli_audit | tests/test_cli_audit.py | candidate | 1269 | 0/10 | 40 | |
| tests.test_analytics_integration | tests/test_analytics_integration.py | candidate | 2010 | 0/26 | 36 | |
| tests.test_mcp_service | tests/test_mcp_service.py | candidate | 14675 | 0/63 | 293 | |
| tests.test_analytics_foundation | tests/test_analytics_foundation.py | candidate | 2033 | 0/33 | 52 | |
| codeclone.memory.sqlite_store | codeclone/memory/sqlite_store.py | candidate | 1544 | 42/12 | 71 | |
| tests.test_audit_writer | tests/test_audit_writer.py | candidate | 1128 | 0/5 | 42 | |
| tests.test_report_contract_coverage | tests/test_report_contract_coverage.py | candidate | 3109 | 0/16 | 35 | |
| tests.test_cli_inprocess | tests/test_cli_inprocess.py | candidate | 4554 | 1/20 | 161 | |
| tests.test_semantic_embedding | tests/test_semantic_embedding.py | candidate | 926 | 0/10 | 38 | |
| tests.test_html_report | tests/test_html_report.py | candidate | 4554 | 0/18 | 89 | |
| codeclone.surfaces.mcp._session_workflow_mixin | codeclone/surfaces/mcp/_session_workflow_mixin.py | candidate | 1833 | 2/19 | 152 | |
| tests.test_report | tests/test_report.py | candidate | 3301 | 0/21 | 77 | |
| tests.test_workspace_intents | tests/test_workspace_intents.py | candidate | 1533 | 7/9 | 42 | |
| codeclone.surfaces.mcp._session_patch_contract_mixin | codeclone/surfaces/mcp/_session_patch_contract_mixin.py | candidate | 1265 | 3/12 | 84 | |
| codeclone.surfaces.mcp._session_shared | codeclone/surfaces/mcp/_session_shared.py | candidate | 880 | 25/25 | 31 | |
| tests.test_cache | tests/test_cache.py | candidate | 3118 | 0/18 | 75 | |
| codeclone.audit.reader | codeclone/audit/reader.py | candidate | 1199 | 27/4 | 96 | |
| codeclone.surfaces.mcp._session_helpers | codeclone/surfaces/mcp/_session_helpers.py | candidate | 1011 | 2/17 | 84 | |
| tests.test_cli_unit | tests/test_cli_unit.py | candidate | 2937 | 0/28 | 75 | |
| codeclone.surfaces.mcp._session_memory_mixin | codeclone/surfaces/mcp/_session_memory_mixin.py | candidate | 1072 | 5/26 | 77 | |
| tests.test_cli_mascot_help | tests/test_cli_mascot_help.py | candidate | 560 | 0/12 | 23 | |
| tests.test_memory_jobs_coverage | tests/test_memory_jobs_coverage.py | candidate | 1298 | 0/19 | 14 | |
| codeclone.surfaces.cli.memory | codeclone/surfaces/cli/memory.py | candidate | 1515 | 9/31 | 187 | |
| codeclone.surfaces.mcp._workspace_intents | codeclone/surfaces/mcp/_workspace_intents.py | candidate | 742 | 12/7 | 35 | |
| codeclone.surfaces.mcp._session_intent_mixin | codeclone/surfaces/mcp/_session_intent_mixin.py | candidate | 1616 | 6/12 | 100 | |
| codeclone.surfaces.cli.workflow | codeclone/surfaces/cli/workflow.py | candidate | 850 | 8/30 | 46 | |
| codeclone.memory.retrieval.service | codeclone/memory/retrieval/service.py | candidate | 2177 | 4/21 | 159 | |
| codeclone.controller_insights.session_stats | codeclone/controller_insights/session_stats.py | candidate | 640 | 2/8 | 65 | |
| tests.test_core_branch_coverage | tests/test_core_branch_coverage.py | candidate | 1431 | 0/21 | 18 | |
| tests.test_pipeline_metrics | tests/test_pipeline_metrics.py | candidate | 1791 | 0/12 | 24 | |
| codeclone.surfaces.mcp.server | codeclone/surfaces/mcp/server.py | candidate | 1723 | 8/10 | 27 | |
| tests.test_cli_session_stats | tests/test_cli_session_stats.py | candidate | 1487 | 0/12 | 64 | |
| tests.test_analytics_reporting | tests/test_analytics_reporting.py | candidate | 1235 | 0/14 | 23 | |
| codeclone.surfaces.mcp._workspace_intent_store | codeclone/surfaces/mcp/_workspace_intent_store.py | candidate | 683 | 13/10 | 18 | |
| codeclone.cache.store | codeclone/cache/store.py | candidate | 761 | 17/12 | 67 | |
| codeclone.memory.trajectory.store | codeclone/memory/trajectory/store.py | candidate | 1215 | 10/12 | 45 | |
| tests.test_cli_memory_semantic | tests/test_cli_memory_semantic.py | candidate | 611 | 0/13 | 25 | |
| codeclone.report.document.derived | codeclone/report/document/derived.py | candidate | 1116 | 3/10 | 73 | |
| tests.test_observability_query | tests/test_observability_query.py | candidate | 748 | 1/7 | 22 | |
| tests.test_html_report_helpers | tests/test_html_report_helpers.py | candidate | 808 | 0/22 | 20 | |
| tests.test_analytics_profiles | tests/test_analytics_profiles.py | candidate | 872 | 0/15 | 16 | |
| tests.test_metrics_modules | tests/test_metrics_modules.py | candidate | 830 | 0/11 | 18 | |
| tests.test_memory_staleness | tests/test_memory_staleness.py | non candidate | 751 | 0/13 | 6 | |
| tests.test_memory_trajectory_projector | tests/test_memory_trajectory_projector.py | non candidate | 769 | 3/10 | 12 | |
| codeclone.report.document._common | codeclone/report/document/_common.py | non candidate | 414 | 7/7 | 66 | |
| tests.memory_fixtures | tests/memory_fixtures.py | non candidate | 700 | 63/13 | 31 | |
| codeclone.report.renderers.sarif | codeclone/report/renderers/sarif.py | non candidate | 972 | 5/8 | 77 | |
| codeclone.report.overview | codeclone/report/overview.py | non candidate | 765 | 4/6 | 87 | |
| tests.test_config_semantic | tests/test_config_semantic.py | non candidate | 338 | 0/3 | 11 |
| Longest chain ? | Length ? |
|---|---|
| __main__→server→service→session→_session..ow_mixin→_session..ry_mixin→coverage→service→status_report→sqlite_store→store→export_context→retrieval→quality→projector→reader→schema→meta→metrics_baseline→_metrics..lidation→_metrics.._payload→projection→integrity→json_io | 24 |
| test_cli_setup→main→wizard→apply→plan→discover→rollup→capabilities→status_report→sqlite_store→store→export_context→retrieval→quality→projector→reader→schema→meta→metrics_baseline→_metrics..lidation→_metrics.._payload→projection→integrity→json_io | 24 |
| test_con..insights→server→service→session→_session..ow_mixin→_session..ry_mixin→coverage→service→status_report→sqlite_store→store→export_context→retrieval→quality→projector→reader→schema→meta→metrics_baseline→_metrics..lidation→_metrics.._payload→projection→integrity→json_io | 24 |
| test_mcp_server→server→service→session→_session..ow_mixin→_session..ry_mixin→coverage→service→status_report→sqlite_store→store→export_context→retrieval→quality→projector→reader→schema→meta→metrics_baseline→_metrics..lidation→_metrics.._payload→projection→integrity→json_io | 24 |
| test_mcp_service→server→service→session→_session..ow_mixin→_session..ry_mixin→coverage→service→status_report→sqlite_store→store→export_context→retrieval→quality→projector→reader→schema→meta→metrics_baseline→_metrics..lidation→_metrics.._payload→projection→integrity→json_io | 24 |
| Name ? | File ? | Line ? | Kind ? | Confidence ? | Rule | Source |
|---|---|---|---|---|---|---|
| resolve_install_target | .github/actions/codeclone/_action_impl.py | 158 | function | high | dead-code | Inline_Codeclone |
| StaticBearerTokenVerifier.verify_token | codeclone/surfaces/mcp/auth.py | 36 | method | high | dead-code | Inline_Codeclone |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 823-825 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 827-829 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 831-833 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 835-837 |
| File | Location | Lines |
|---|---|---|
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1073-1076 |
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1081-1084 |
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1089-1094 |
| File | Location | Lines |
|---|---|---|
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 60-60 |
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 68-68 |
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 70-70 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/clustering/canonicalize.py | Production codeclone.analytics.clustering.canonicalize:medoid_item_id | 79-79 |
| codeclone/analytics/clustering/canonicalize.py | Production codeclone.analytics.clustering.canonicalize:medoid_item_id | 82-82 |
| File | Location | Lines |
|---|---|---|
| codeclone/observability/store/schema.py | Production codeclone.observability.store.schema:validate_observability_schema | 151-156 |
| codeclone/observability/store/schema.py | Production codeclone.observability.store.schema:validate_observability_schema | 158-163 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_agents | 989-990 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_agents | 992-993 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/corpus/adapters/intent_historical.py | Production codeclone.analytics.corpus.adapters.intent_historical:extract_historical_intent_items | 170-170 |
| codeclone/analytics/corpus/adapters/intent_historical.py | Production codeclone.analytics.corpus.adapters.intent_historical:extract_historical_intent_items | 194-194 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/setup/wizard.py | Production codeclone.surfaces.cli.setup.wizard:run_setup_wizard | 62-63 |
| codeclone/surfaces/cli/setup/wizard.py | Production codeclone.surfaces.cli.setup.wizard:run_setup_wizard | 67-68 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/ui/help_tour.py | Production codeclone.surfaces.cli.ui.help_tour:_run_rich_step | 255-258 |
| codeclone/surfaces/cli/ui/help_tour.py | Production codeclone.surfaces.cli.ui.help_tour:_run_rich_step | 261-264 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_dashboard | 1053-1054 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_dashboard | 1056-1057 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/corpus/representations/intent.py | Production codeclone.analytics.corpus.representations.intent:declared_path_families_from_patch_trail | 81-81 |
| codeclone/analytics/corpus/representations/intent.py | Production codeclone.analytics.corpus.representations.intent:declared_path_families_from_patch_trail | 86-86 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_anomalies | 1021-1022 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_anomalies | 1024-1025 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/setup/render.py | Production codeclone.surfaces.cli.setup.render:_render_apply_rich | 265-266 |
| codeclone/surfaces/cli/setup/render.py | Production codeclone.surfaces.cli.setup.render:_render_apply_rich | 269-270 |
| File | Location | Lines |
|---|---|---|
| scripts/build_docs_example_report.py | Production scripts.build_docs_example_report:_published_artifact_href | 155-156 |
| scripts/build_docs_example_report.py | Production scripts.build_docs_example_report:_published_artifact_href | 159-160 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 823-825 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 827-829 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 831-833 |
| codeclone/surfaces/cli/workflow.py | Production codeclone.surfaces.cli.workflow:main | 835-837 |
| File | Location | Lines |
|---|---|---|
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1073-1076 |
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1081-1084 |
| codeclone/memory/retrieval/service.py | Production codeclone.memory.retrieval.service:_parse_filters | 1089-1094 |
| File | Location | Lines |
|---|---|---|
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 60-60 |
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 68-68 |
| codeclone/memory/ingest/extractors.py | Production codeclone.memory.ingest.extractors:_parse_contract_constants | 70-70 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/clustering/canonicalize.py | Production codeclone.analytics.clustering.canonicalize:medoid_item_id | 79-79 |
| codeclone/analytics/clustering/canonicalize.py | Production codeclone.analytics.clustering.canonicalize:medoid_item_id | 82-82 |
| File | Location | Lines |
|---|---|---|
| codeclone/observability/store/schema.py | Production codeclone.observability.store.schema:validate_observability_schema | 151-156 |
| codeclone/observability/store/schema.py | Production codeclone.observability.store.schema:validate_observability_schema | 158-163 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_agents | 989-990 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_agents | 992-993 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/corpus/adapters/intent_historical.py | Production codeclone.analytics.corpus.adapters.intent_historical:extract_historical_intent_items | 170-170 |
| codeclone/analytics/corpus/adapters/intent_historical.py | Production codeclone.analytics.corpus.adapters.intent_historical:extract_historical_intent_items | 194-194 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/setup/wizard.py | Production codeclone.surfaces.cli.setup.wizard:run_setup_wizard | 62-63 |
| codeclone/surfaces/cli/setup/wizard.py | Production codeclone.surfaces.cli.setup.wizard:run_setup_wizard | 67-68 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/ui/help_tour.py | Production codeclone.surfaces.cli.ui.help_tour:_run_rich_step | 255-258 |
| codeclone/surfaces/cli/ui/help_tour.py | Production codeclone.surfaces.cli.ui.help_tour:_run_rich_step | 261-264 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_dashboard | 1053-1054 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_dashboard | 1056-1057 |
| File | Location | Lines |
|---|---|---|
| codeclone/analytics/corpus/representations/intent.py | Production codeclone.analytics.corpus.representations.intent:declared_path_families_from_patch_trail | 81-81 |
| codeclone/analytics/corpus/representations/intent.py | Production codeclone.analytics.corpus.representations.intent:declared_path_families_from_patch_trail | 86-86 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_anomalies | 1021-1022 |
| codeclone/surfaces/cli/memory.py | Production codeclone.surfaces.cli.memory:_run_trajectory_anomalies | 1024-1025 |
| File | Location | Lines |
|---|---|---|
| codeclone/surfaces/cli/setup/render.py | Production codeclone.surfaces.cli.setup.render:_render_apply_rich | 265-266 |
| codeclone/surfaces/cli/setup/render.py | Production codeclone.surfaces.cli.setup.render:_render_apply_rich | 269-270 |
| File | Location | Lines |
|---|---|---|
| scripts/build_docs_example_report.py | Production scripts.build_docs_example_report:_published_artifact_href | 155-156 |
| scripts/build_docs_example_report.py | Production scripts.build_docs_example_report:_published_artifact_href | 159-160 |
This group points to repeated guard or validation exits inside one function. Consolidating the shared exit policy usually reduces branch noise.
CodeClone reported this group because it found 4 structurally matching branch bodies inside codeclone.surfaces.cli.workflow:main.
820 | 821 | def main() -> None: 822 | if len(sys.argv) > 1 and sys.argv[1] == "setup": 823 | from .setup import setup_main 824 | 825 | raise SystemExit(setup_main(sys.argv[2:])) 826 | if len(sys.argv) > 1 and sys.argv[1] == "analytics": 827 | from .analytics import analytics_main 828 | 824 | 825 | raise SystemExit(setup_main(sys.argv[2:])) 826 | if len(sys.argv) > 1 and sys.argv[1] == "analytics": 827 | from .analytics import analytics_main 828 | 829 | raise SystemExit(analytics_main(sys.argv[2:])) 830 | if len(sys.argv) > 1 and sys.argv[1] == "memory": 831 | from .memory import memory_main 832 | This group reports 3 branches with the same local shape (Try). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 3 structurally matching branch bodies inside codeclone.memory.retrieval.service:_parse_filters.
1070 | ) 1071 | raw_types = filters.get("types") 1072 | if isinstance(raw_types, list): 1073 | try: 1074 | types.extend(validate_memory_record_type(item) for item in raw_types) 1075 | except ValueError as exc: 1076 | raise MemoryContractError(str(exc)) from exc 1077 | elif raw_types is not None: 1078 | raise MemoryContractError("memory filter types must be a list of strings.") 1079 | raw_statuses = filters.get("statuses") 1078 | raise MemoryContractError("memory filter types must be a list of strings.") 1079 | raw_statuses = filters.get("statuses") 1080 | if isinstance(raw_statuses, list): 1081 | try: 1082 | statuses.extend(validate_memory_status(item) for item in raw_statuses) 1083 | except ValueError as exc: 1084 | raise MemoryContractError(str(exc)) from exc 1085 | elif raw_statuses is not None: 1086 | raise MemoryContractError("memory filter statuses must be a list of strings.") 1087 | raw_confidences = filters.get("confidences")This group reports 3 branches with the same local shape (Continue). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 3 structurally matching branch bodies inside codeclone.memory.ingest.extractors:_parse_contract_constants.
57 | if isinstance(node, ast.Assign): 58 | value = _literal_constant_value(node.value) 59 | if value is None: 60 | continue 61 | for target in node.targets: 62 | if isinstance(target, ast.Name) and target.id.endswith( 63 | _CONTRACT_CONSTANT_SUFFIX 65 | constants[target.id] = value 66 | elif isinstance(node, ast.AnnAssign) and isinstance(node.target, ast.Name): 67 | if not node.target.id.endswith(_CONTRACT_CONSTANT_SUFFIX): 68 | continue 69 | if node.value is None: 70 | continue 71 | value = _literal_constant_value(node.value)This group reports 2 branches with the same local shape (Continue). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.analytics.clustering.canonicalize:medoid_item_id.
76 | count = 0 77 | for other_id in member_ids: 78 | if other_id == item_id: 79 | continue 80 | other = coordinates.get(other_id) 81 | if other is None: 82 | continue 79 | continue 80 | other = coordinates.get(other_id) 81 | if other is None: 82 | continue 83 | total += _euclidean(anchor, other) 84 | count += 1 85 | return total / count if count else float("inf")This group points to repeated guard or validation exits inside one function. Consolidating the shared exit policy usually reduces branch noise.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.observability.store.schema:validate_observability_schema.
148 | stored_key = _schema_version_key(stored) 149 | current_key = _schema_version_key(PLATFORM_OBSERVABILITY_SCHEMA_VERSION) 150 | if stored_key is None or current_key is None: 151 | msg = ( 152 | "Unsupported Platform Observability schema version " 153 | f"{stored!r}; current supported version is " 154 | f"{PLATFORM_OBSERVABILITY_SCHEMA_VERSION!r}." 155 | ) 156 | raise RuntimeError(msg) 157 | if stored_key > current_key: 158 | msg = ( 159 | "Platform Observability store schema " 155 | ) 156 | raise RuntimeError(msg) 157 | if stored_key > current_key: 158 | msg = ( 159 | "Platform Observability store schema " 160 | f"{stored!r} is newer than this CodeClone build supports " 161 | f"({PLATFORM_OBSERVABILITY_SCHEMA_VERSION!r})." 162 | ) 163 | raise RuntimeError(msg) 164 | 165 | 166 | def create_observability_schema(conn: sqlite3.Connection) -> None:This group reports 2 branches with the same local shape (Expr,Return). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.memory:_run_trajectory_agents.
986 | store.close() 987 | payload = result.get("payload") 988 | if not is_payload_dict(payload): 989 | console.print("Unexpected trajectory agents payload.") 990 | return int(ExitCode.INTERNAL_ERROR) 991 | if bool(getattr(args, "json", False)): 992 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 993 | return int(ExitCode.SUCCESS) 989 | console.print("Unexpected trajectory agents payload.") 990 | return int(ExitCode.INTERNAL_ERROR) 991 | if bool(getattr(args, "json", False)): 992 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 993 | return int(ExitCode.SUCCESS) 994 | render_trajectory_agents(console=console, payload=payload) 995 | return int(ExitCode.SUCCESS) 996 | This group reports 2 branches with the same local shape (Continue). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.analytics.corpus.adapters.intent_historical:extract_historical_intent_items.
167 | for record in records: 168 | intent_id = record.intent_id 169 | if not intent_id: 170 | continue 171 | grouped[(project_id, intent_id)].append(record) 172 | 173 | memory_path = memory_db_path or resolve_memory_db_path(resolved_root) 191 | payload = _payload_mapping(canonical) 192 | description = _intent_description(payload) 193 | if not description.strip(): 194 | continue 195 | trajectories: tuple[Trajectory, ...] = () 196 | patch_trail_payload: dict[str, object] | None = None 197 | selected_trajectory = NoneThis group reports 2 branches with the same local shape (Expr,Return). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.setup.wizard:run_setup_wizard.
59 | """Run the interactive hub session until the operator quits.""" 60 | 61 | if not _interactive_terminal_available(): 62 | print(setup_ui.SETUP_WIZARD_TTY_REQUIRED, file=sys.stderr) 63 | return int(ExitCode.CONTRACT_ERROR) 64 | 65 | resolved_console = console or make_query_console() 66 | if not supports_rich_console(resolved_console): 64 | 65 | resolved_console = console or make_query_console() 66 | if not supports_rich_console(resolved_console): 67 | print(setup_ui.SETUP_WIZARD_RICH_REQUIRED, file=sys.stderr) 68 | return int(ExitCode.CONTRACT_ERROR) 69 | 70 | resolved_prompts = prompts or _default_wizard_prompts(resolved_console) 71 | while True:This group reports 2 branches with the same local shape (AugAssign,If). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.ui.help_tour:_run_rich_step.
252 | elapsed += tick_interval 253 | 254 | if anim_frames: 255 | since_anim += tick_interval 256 | if since_anim >= frame_interval: 257 | anim_index += 1 258 | since_anim = 0.0 259 | 260 | if typed < total_chars: 261 | since_char += tick_interval 258 | since_anim = 0.0 259 | 260 | if typed < total_chars: 261 | since_char += tick_interval 262 | if since_char >= char_interval: 263 | typed += 1 264 | since_char = 0.0 265 | 266 | if typed >= total_chars: 267 | if typing_done_at is None:This group reports 2 branches with the same local shape (Expr,Return). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.memory:_run_trajectory_dashboard.
1050 | store.close() 1051 | payload = result.get("payload") 1052 | if not is_payload_dict(payload): 1053 | console.print("Unexpected trajectory dashboard payload.") 1054 | return int(ExitCode.INTERNAL_ERROR) 1055 | if bool(getattr(args, "json", False)): 1056 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 1057 | return int(ExitCode.SUCCESS) 1053 | console.print("Unexpected trajectory dashboard payload.") 1054 | return int(ExitCode.INTERNAL_ERROR) 1055 | if bool(getattr(args, "json", False)): 1056 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 1057 | return int(ExitCode.SUCCESS) 1058 | status_raw = payload.get("status") 1059 | if is_payload_dict(status_raw): 1060 | status = status_rawThis group reports 2 branches with the same local shape (Continue). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.analytics.corpus.representations.intent:declared_path_families_from_patch_trail.
78 | families: set[str] = set() 79 | for item in declared: 80 | if not isinstance(item, str): 81 | continue 82 | path = item.strip().replace("\\", "/") 83 | while path.startswith("./"): 84 | path = path[2:] 83 | while path.startswith("./"): 84 | path = path[2:] 85 | if not path: 86 | continue 87 | top = path.split("/", 1)[0] 88 | if top: 89 | families.add(top)This group reports 2 branches with the same local shape (Expr,Return). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.memory:_run_trajectory_anomalies.
1018 | store.close() 1019 | payload = result.get("payload") 1020 | if not is_payload_dict(payload): 1021 | console.print("Unexpected trajectory anomalies payload.") 1022 | return int(ExitCode.INTERNAL_ERROR) 1023 | if bool(getattr(args, "json", False)): 1024 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 1025 | return int(ExitCode.SUCCESS) 1021 | console.print("Unexpected trajectory anomalies payload.") 1022 | return int(ExitCode.INTERNAL_ERROR) 1023 | if bool(getattr(args, "json", False)): 1024 | console.print(json.dumps(payload, indent=2, sort_keys=True)) 1025 | return int(ExitCode.SUCCESS) 1026 | render_trajectory_anomalies(console=console, payload=payload) 1027 | return int(ExitCode.SUCCESS) 1028 | This group reports 2 branches with the same local shape (Expr,Return). Review whether the local branch logic should stay duplicated or be simplified in place.
CodeClone reported this group because it found 2 structurally matching branch bodies inside codeclone.surfaces.cli.setup.render:_render_apply_rich.
262 | 263 | status = str(result.get("status", "")) 264 | if status == "blocked": 265 | console.print(setup_ui.SETUP_APPLY_BLOCKED) 266 | return 267 | results = _apply_results(result) 268 | if not results: 269 | console.print(setup_ui.SETUP_APPLY_NOOP) 266 | return 267 | results = _apply_results(result) 268 | if not results: 269 | console.print(setup_ui.SETUP_APPLY_NOOP) 270 | return 271 | 272 | _print_kind_path_status_table( 273 | console,This group points to repeated guard or validation exits inside one function. Consolidating the shared exit policy usually reduces branch noise.
CodeClone reported this group because it found 2 structurally matching branch bodies inside scripts.build_docs_example_report:_published_artifact_href.
152 | 153 | def _published_artifact_href(site_url: str, artifact_name: str) -> str: 154 | if artifact_name not in _ARTIFACT_NAMES: 155 | msg = f"unsupported sample-report artifact: {artifact_name}" 156 | raise ValueError(msg) 157 | parsed = urlparse(site_url) 158 | if not parsed.scheme or not parsed.netloc: 159 | msg = f"project.site_url must be an absolute URL, got {site_url!r}" 156 | raise ValueError(msg) 157 | parsed = urlparse(site_url) 158 | if not parsed.scheme or not parsed.netloc: 159 | msg = f"project.site_url must be an absolute URL, got {site_url!r}" 160 | raise ValueError(msg) 161 | base_path = parsed.path.rstrip("/") 162 | artifact_path = f"{base_path}/examples/report/live/{artifact_name}" 163 | return f"{parsed.scheme}://{parsed.netloc}{artifact_path}"