codmap 0.0.50__tar.gz → 0.0.52__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codmap-0.0.50/codmap.egg-info → codmap-0.0.52}/PKG-INFO +4 -4
- {codmap-0.0.50 → codmap-0.0.52}/README.md +3 -3
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/__init__.py +2 -2
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/agents_block.md +3 -2
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/agents_block.ru.md +3 -2
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/behavior.py +14 -7
- codmap-0.0.52/codemap/extract/external.py +145 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/griffe_extractor.py +7 -2
- codmap-0.0.52/codemap/extract/named_dispatch.py +481 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/roots.py +25 -19
- {codmap-0.0.50 → codmap-0.0.52}/codemap/incremental.py +6 -6
- {codmap-0.0.50 → codmap-0.0.52}/codemap/model.py +4 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/query.py +50 -19
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/audit.py +7 -8
- {codmap-0.0.50 → codmap-0.0.52/codmap.egg-info}/PKG-INFO +4 -4
- {codmap-0.0.50 → codmap-0.0.52}/codmap.egg-info/SOURCES.txt +4 -0
- {codmap-0.0.50 → codmap-0.0.52}/pyproject.toml +1 -1
- codmap-0.0.52/tests/test_r1c106_dead_code.py +282 -0
- codmap-0.0.52/tests/test_r1c107_named_dispatch.py +265 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c39_edge_resolution.py +6 -6
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c46_shadowed_definitions.py +1 -1
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c86_incremental_repo_scope.py +37 -0
- {codmap-0.0.50 → codmap-0.0.52}/LICENSE +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/__init__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/__main__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/advise/__init__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/advise/data/feed.json +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/advise/data/matrix.toml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/advise/refresh.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/advise/render.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/apidiff.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/arch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/atomic.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/cli.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/artifacts.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/hooks.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/install.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/ratchet.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/state.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/brief.txt +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/claude_hooks.json +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/codex_region.toml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/contract_head.toml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/cycles_region.toml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/github-workflow.yml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/gitlab-ci.yml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/mcp_claude.args +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/post-commit.sh +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/templates/ratchet_region.toml +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/devkit/usage.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/diagnostics.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/__init__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/attrflow.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/dataflow.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/dispatch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/gsource.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/probe.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/extract/union.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/freshness.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/__init__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/base.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/cocoindex.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/gate.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/gitnexus.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/registry.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/integrations/transport.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/provenance.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/scope.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/__init__.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/_scip_pb2.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/api_surface.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/apidiff.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/architecture.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/check.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/ctags.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/currency.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/impact.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/limits.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/livingdocs.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/mcp_server.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/mermaid.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/pack.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/rag.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/review.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/scip.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/semantic.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/server.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/session.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/subsystems.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/serve/vault.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/store.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/tomlio.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codemap/watch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codmap.egg-info/dependency_links.txt +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codmap.egg-info/entry_points.txt +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codmap.egg-info/requires.txt +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/codmap.egg-info/top_level.txt +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/setup.cfg +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_epistemic.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_fast_field_and_usage.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_gitnexus_router.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_impact_depth.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_integrations.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_issue3_serve_freshness.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_livingdocs.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m0_api_surface.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m11_argcontract.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m12_dataflow.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m15_review.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m16_architecture.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m17_mcp.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m18_freshness.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m1_5_semantics.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m1_query.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m2_views.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m32_watch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m3_serve.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m4_behavior.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m5_deep.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m6_repo_scope.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m7_dispatch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_m9_family.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_mcp_surface_contract.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_pack_honesty.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c108_devkit.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c109_namespace_source.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c110_advise.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c111_recipe.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c114_devkit_graph.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c115_agents_block.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c116_known_cycles.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c118_dead_code.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c119_first_build.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c120_dispatch_absorbed.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c121_devkit_trust.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c122_serve_robust.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c124_atomic_writes.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c125_graph_trust.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c126_scope_roles.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c127_require_current.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c132_harness.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c133_pin_links.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c134_refresh_recipe.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c135_advise_generations.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c13_callgraph_accuracy.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c13_grep_vs_graph.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c151_pack_projection.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c16_semantic.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c20_attribute_edges.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c21_flat_layout.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c22_source_visible_refs.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c23_hard_python.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c24_test_mapping.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c25_provenance.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c26_deep_union.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c27_config_honesty.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c28_limit_envelope.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c29_lazy_imports.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c2_ctags.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c30_local_import_calls.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c30f1_reexport_calls.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c30f2_check_scope.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c31_path_origin.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c32_report_json.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c33_query_signature.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c34_signature_kinds.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c35_contract_location.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c36_target_resolution.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c37_rule_mutation.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c38_tool_drift.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c3_arch_contract.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c3_dogfood.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c40_flow_reach.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c41_scope_membership.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c42_deep_tier_stability.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c43_incremental_splice.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c44_absent_answers.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c45_repeat_union.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c47_incremental_resample.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c48_type_checking_imports.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c49_type_only_cycles.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c4_complexity.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c50_flow_entry_points.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c53_narrowing_declared.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c54_deterministic_rendering.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c55_override_grade.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c56_stub_files.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c57_facade_package.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c58_cycle_tangles.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c59_completeness_drop.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c5_apidiff.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c60_nested_definitions.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c62_phantom_rules.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c63_answer_format.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c64_dependency_probe.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c66_pack_direction.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c68_dotted_imports.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c69_contract_validation.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c6_pack.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c70_check_graph_currency.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c71_attribute_chain_calls.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c72_flat_inference_in_packages.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c73_cli_version.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c74_call_site_conservation.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c75_reexported_class_calls.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c76_contract_table_typo.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c77_gate_probe_battery.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c78_forbidden_chains.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c7_edge_vocab.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c80_tests_through_helpers.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c81_protocol_dispatch.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c82_review_changed_lines.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c83_foreign_graph_paths.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c84_missing_roots.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c85_mcp_graph_currency.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c87_review_path_base.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c89_review_docs.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c8_deadcode.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c90_currency_without_recipe.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c91_route_vocabulary.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c92_sidecar_pair.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c94_root_builds.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c95_r1c96_foreign_trees.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_r1c9_incremental.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_scip_export.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_scope.py +0 -0
- {codmap-0.0.50 → codmap-0.0.52}/tests/test_subsystems.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codmap
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.52
|
|
4
4
|
Summary: Static analyzer that turns a package's source into a queryable code graph.
|
|
5
5
|
Author-email: kogriv <kogriv@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -54,9 +54,9 @@ without a release.
|
|
|
54
54
|
|
|
55
55
|
[](https://github.com/kogriv/codemap/actions/workflows/ci.yml)
|
|
56
56
|
|
|
57
|
-
**Status:** 🟢 M0–M20 implemented + research track (R1/R2) — schema 0.13, **
|
|
58
|
-
Python 3.
|
|
59
|
-
wheel smoke
|
|
57
|
+
**Status:** 🟢 M0–M20 implemented + research track (R1/R2) — schema 0.13, **1576 tests with no failures in
|
|
58
|
+
the Python 3.12 acceptance run** ([CI](docs/ci.md) runs the full suite on Python 3.11–3.14, including the
|
|
59
|
+
dogfood pass, determinism, wheel smoke, and ctags/SCIP interop with the real CLIs), warm serve surface with 32 ops (29 exposed
|
|
60
60
|
as MCP tools), and SCIP export. See **[DESIGN.md](DESIGN.md)** (product design &
|
|
61
61
|
v1 boundaries), **[BACKLOG.md](BACKLOG.md)** (roadmap), and **[research/](research/)** (tool landscape).
|
|
62
62
|
|
|
@@ -18,9 +18,9 @@ without a release.
|
|
|
18
18
|
|
|
19
19
|
[](https://github.com/kogriv/codemap/actions/workflows/ci.yml)
|
|
20
20
|
|
|
21
|
-
**Status:** 🟢 M0–M20 implemented + research track (R1/R2) — schema 0.13, **
|
|
22
|
-
Python 3.
|
|
23
|
-
wheel smoke
|
|
21
|
+
**Status:** 🟢 M0–M20 implemented + research track (R1/R2) — schema 0.13, **1576 tests with no failures in
|
|
22
|
+
the Python 3.12 acceptance run** ([CI](docs/ci.md) runs the full suite on Python 3.11–3.14, including the
|
|
23
|
+
dogfood pass, determinism, wheel smoke, and ctags/SCIP interop with the real CLIs), warm serve surface with 32 ops (29 exposed
|
|
24
24
|
as MCP tools), and SCIP export. See **[DESIGN.md](DESIGN.md)** (product design &
|
|
25
25
|
v1 boundaries), **[BACKLOG.md](BACKLOG.md)** (roadmap), and **[research/](research/)** (tool landscape).
|
|
26
26
|
|
|
@@ -16,11 +16,11 @@ import hashlib
|
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
|
|
18
18
|
#: Raised whenever a template changes; adopting projects see "outdated" in `codemap devkit status`.
|
|
19
|
-
DEVKIT_VERSION =
|
|
19
|
+
DEVKIT_VERSION = 9
|
|
20
20
|
|
|
21
21
|
#: sha256 over the templates (name + content, sorted). The suite recomputes it: a template edited without
|
|
22
22
|
#: bumping DEVKIT_VERSION and updating this value fails there, in the same commit (D7).
|
|
23
|
-
TEMPLATES_SHA256 = "
|
|
23
|
+
TEMPLATES_SHA256 = "7b0207095df06222d94e67fa2fa421089be7617aecd9b63f4ad94edfafd10e43"
|
|
24
24
|
|
|
25
25
|
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
|
26
26
|
|
|
@@ -12,8 +12,9 @@ reaches — ask the graph instead of reading files or grepping.
|
|
|
12
12
|
`source` (MCP), instead of opening a long file.
|
|
13
13
|
- Before changing a public function, a model or a signature → `impact` (MCP). Write the reach (modules,
|
|
14
14
|
callers, tests) into the task or the review.
|
|
15
|
-
- Which tests to run for X → `tests` (MCP).
|
|
16
|
-
|
|
15
|
+
- Which tests to run for X → `tests` (MCP). Dispatch by name, such as calls with computed keys or through
|
|
16
|
+
framework-managed registries, can be invisible to static analysis. A missing match does not prove
|
|
17
|
+
the symbol is untested.
|
|
17
18
|
- The shape of the system → `architecture` (MCP) and `communities` (MCP).
|
|
18
19
|
- Before a merge → `git diff main... | codemap review --graph {{graph}}`, and attach the output.
|
|
19
20
|
|
|
@@ -12,8 +12,9 @@ codemap отвечает на вопросы о структуре `{{package}}`
|
|
|
12
12
|
(MCP), вместо чтения длинного файла.
|
|
13
13
|
- Перед изменением публичной функции, модели или сигнатуры → `impact` (MCP). Охват (модули, вызывающие,
|
|
14
14
|
тесты) запишите в задачу или ревью.
|
|
15
|
-
- Какие тесты гонять для X → `tests` (MCP).
|
|
16
|
-
|
|
15
|
+
- Какие тесты гонять для X → `tests` (MCP). Диспетчеризация по имени может быть не видна статическому
|
|
16
|
+
анализу, например при вызовах с вычисляемым ключом или через реестр фреймворка. Отсутствие
|
|
17
|
+
совпадения не доказывает, что символ не протестирован.
|
|
17
18
|
- Форма системы → `architecture` (MCP) и `communities` (MCP).
|
|
18
19
|
- Перед слиянием → `git diff main... | codemap review --graph {{graph}}`, и приложите вывод.
|
|
19
20
|
|
|
@@ -418,17 +418,19 @@ def _shadow_map(tree) -> tuple[set[int], dict, list[tuple[int, int]]]:
|
|
|
418
418
|
|
|
419
419
|
R1-C46: griffe keeps the **last** body of a name defined twice and drops the first
|
|
420
420
|
without a word; the AST walkers here used to visit *both* and attribute both bodies'
|
|
421
|
-
calls to the one surviving node
|
|
422
|
-
|
|
421
|
+
calls to the one surviving node. Every walker skips the replaced subtree,
|
|
422
|
+
and the surviving node records which bindings it replaced. A decorator on
|
|
423
|
+
an earlier definition can retain its object independently of that binding.
|
|
423
424
|
|
|
424
425
|
Only a *direct* statement of a module, class or function body shadows or is
|
|
425
426
|
shadowed. A definition under ``if`` / ``try`` / ``with`` is conditional on either
|
|
426
427
|
side (``if TYPE_CHECKING:``, an ``except ImportError`` fallback): it neither replaces
|
|
427
428
|
nor is replaced, and both bodies keep being walked — the honest over-approximation.
|
|
428
429
|
|
|
429
|
-
Returns ``(ids of AST nodes to skip, records,
|
|
430
|
-
``(scope chain, name)
|
|
431
|
-
|
|
430
|
+
Returns ``(ids of AST nodes to skip, records, replaced line ranges)``; ``records`` maps
|
|
431
|
+
``(scope chain, name)`` to all replaced ``linenos`` and, when present, a
|
|
432
|
+
``decorated`` subset. ``node`` marks a class-only scope chain, where the survivor
|
|
433
|
+
has a canonical definition node.
|
|
432
434
|
"""
|
|
433
435
|
skip: set[int] = set()
|
|
434
436
|
records: dict[tuple[tuple[str, ...], str], dict] = {}
|
|
@@ -447,6 +449,8 @@ def _shadow_map(tree) -> tuple[set[int], dict, list[tuple[int, int]]]:
|
|
|
447
449
|
rec = records.setdefault((tuple(scope), stmt.name),
|
|
448
450
|
{"linenos": [], "node": all(k == "c" for k in kinds)})
|
|
449
451
|
rec["linenos"].append(prev.lineno)
|
|
452
|
+
if prev.decorator_list:
|
|
453
|
+
rec.setdefault("decorated", []).append(prev.lineno)
|
|
450
454
|
last[stmt.name] = stmt
|
|
451
455
|
for child in ast.iter_child_nodes(node):
|
|
452
456
|
if id(child) in skip:
|
|
@@ -463,13 +467,16 @@ def _shadow_map(tree) -> tuple[set[int], dict, list[tuple[int, int]]]:
|
|
|
463
467
|
|
|
464
468
|
|
|
465
469
|
def _stamp_shadows(graph, tree, prefix: str) -> None:
|
|
466
|
-
"""
|
|
470
|
+
"""Record replaced bindings and any earlier decorated lines on the survivor."""
|
|
467
471
|
for (scope, name), rec in _shadow_map(tree)[1].items():
|
|
468
472
|
if not rec["node"]:
|
|
469
473
|
continue
|
|
470
474
|
nid = ".".join([prefix, *scope, name])
|
|
471
475
|
if nid in graph.nodes:
|
|
472
|
-
graph.nodes[nid].extras
|
|
476
|
+
extras = graph.nodes[nid].extras
|
|
477
|
+
extras["shadows"] = sorted(rec["linenos"])
|
|
478
|
+
if rec.get("decorated"):
|
|
479
|
+
extras["decorated_shadows"] = sorted(rec["decorated"])
|
|
473
480
|
|
|
474
481
|
|
|
475
482
|
def _named_functions(tree):
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Source-only evidence of private methods declared on external ancestors."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
import tokenize
|
|
7
|
+
from collections import defaultdict, deque
|
|
8
|
+
from importlib.machinery import EXTENSION_SUFFIXES
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
import griffe
|
|
12
|
+
|
|
13
|
+
_SUFFIXES = (*EXTENSION_SUFFIXES, ".py", ".pyc", ".pyi")
|
|
14
|
+
_SOURCE_SUFFIXES = {".py", ".pyi"}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class _ExternalSource:
|
|
18
|
+
"""Resolve qualified names using only direct file probes and Griffe's AST visitor."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, search_path: Path):
|
|
21
|
+
self.paths = (search_path, *(Path(p) for p in sys.path if isinstance(p, str)))
|
|
22
|
+
self.locations = {}
|
|
23
|
+
self.modules = {}
|
|
24
|
+
|
|
25
|
+
def _location(self, name: str) -> tuple[Path | None, tuple[Path, ...]]:
|
|
26
|
+
if name not in self.locations:
|
|
27
|
+
parent, _, leaf = name.rpartition(".")
|
|
28
|
+
paths = self._location(parent)[1] if parent else self.paths
|
|
29
|
+
self.locations[name] = (
|
|
30
|
+
(None, ()) if name in sys.builtin_module_names else self._find(leaf, paths)
|
|
31
|
+
)
|
|
32
|
+
return self.locations[name]
|
|
33
|
+
|
|
34
|
+
@staticmethod
|
|
35
|
+
def _find(name, paths) -> tuple[Path | None, tuple[Path, ...]]:
|
|
36
|
+
namespaces = []
|
|
37
|
+
for path in paths:
|
|
38
|
+
folder = path / name
|
|
39
|
+
try:
|
|
40
|
+
if folder.is_dir():
|
|
41
|
+
for suffix in _SUFFIXES:
|
|
42
|
+
init = folder / ("__init__" + suffix)
|
|
43
|
+
if init.is_file():
|
|
44
|
+
return init, (folder,)
|
|
45
|
+
namespaces.append(folder)
|
|
46
|
+
for suffix in _SUFFIXES:
|
|
47
|
+
module = path / (name + suffix)
|
|
48
|
+
if module.is_file():
|
|
49
|
+
return module, ()
|
|
50
|
+
except OSError:
|
|
51
|
+
return None, ()
|
|
52
|
+
return None, tuple(namespaces)
|
|
53
|
+
|
|
54
|
+
def _module(self, name: str):
|
|
55
|
+
if name not in self.modules:
|
|
56
|
+
path, _ = self._location(name)
|
|
57
|
+
module = None
|
|
58
|
+
if path is not None and path.suffix in _SOURCE_SUFFIXES:
|
|
59
|
+
parent, _, leaf = name.rpartition(".")
|
|
60
|
+
try:
|
|
61
|
+
with tokenize.open(path) as source:
|
|
62
|
+
module = griffe.visit(
|
|
63
|
+
leaf, path, source.read(),
|
|
64
|
+
parent=griffe.Module(parent) if parent else None,
|
|
65
|
+
)
|
|
66
|
+
except (OSError, UnicodeError, SyntaxError, ValueError):
|
|
67
|
+
pass
|
|
68
|
+
self.modules[name] = module
|
|
69
|
+
return self.modules[name]
|
|
70
|
+
|
|
71
|
+
def find_class(self, target: str):
|
|
72
|
+
seen = set()
|
|
73
|
+
# Bound re-export chains, including aliases that keep lengthening the path.
|
|
74
|
+
while target not in seen and len(seen) < 32:
|
|
75
|
+
parts = target.split(".")
|
|
76
|
+
if len(parts) < 2 or len(parts) > 32 or not all(p.isidentifier() for p in parts):
|
|
77
|
+
return None
|
|
78
|
+
seen.add(target)
|
|
79
|
+
obj = None
|
|
80
|
+
for i, part in enumerate(parts):
|
|
81
|
+
prefix = ".".join(parts[:i + 1])
|
|
82
|
+
member = obj.members.get(part) if obj is not None else None
|
|
83
|
+
if member is not None and member.is_alias:
|
|
84
|
+
if not member.runtime:
|
|
85
|
+
return None
|
|
86
|
+
if member.target_path != prefix:
|
|
87
|
+
target = ".".join([member.target_path, *parts[i + 1:]])
|
|
88
|
+
break
|
|
89
|
+
member = None # e.g. a package importing its own submodule
|
|
90
|
+
if member is not None and member.is_class and member.runtime:
|
|
91
|
+
obj = member
|
|
92
|
+
elif member is None and (obj is None or obj.is_module):
|
|
93
|
+
obj = self._module(prefix)
|
|
94
|
+
path, locations = self._location(prefix)
|
|
95
|
+
if obj is None and (path is not None or not locations):
|
|
96
|
+
return None
|
|
97
|
+
else:
|
|
98
|
+
return None
|
|
99
|
+
else:
|
|
100
|
+
return obj if obj is not None and obj.is_class else None
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def stamp_external_overrides(graph, external_bases, search_path: Path) -> None:
|
|
105
|
+
"""Record one canonical external declaration for each matching private method."""
|
|
106
|
+
if not external_bases:
|
|
107
|
+
return
|
|
108
|
+
parents = defaultdict(list)
|
|
109
|
+
for edge in graph.edges:
|
|
110
|
+
if edge.type == "inherits" and not edge.extras.get("external"):
|
|
111
|
+
parents[edge.source].append(edge.target)
|
|
112
|
+
|
|
113
|
+
source = _ExternalSource(search_path)
|
|
114
|
+
methods = defaultdict(dict)
|
|
115
|
+
for node in graph.nodes.values():
|
|
116
|
+
if node.kind == "function" and node.visibility == "private":
|
|
117
|
+
parent, _, name = node.id.rpartition(".")
|
|
118
|
+
if parent in parents or parent in external_bases:
|
|
119
|
+
methods[parent][name] = node
|
|
120
|
+
|
|
121
|
+
for cls, pending in methods.items():
|
|
122
|
+
local = [cls]
|
|
123
|
+
local_seen = {cls}
|
|
124
|
+
queue = deque()
|
|
125
|
+
for base in local:
|
|
126
|
+
queue.extend(external_bases.get(base, ()))
|
|
127
|
+
for parent in parents.get(base, ()):
|
|
128
|
+
if parent not in local_seen:
|
|
129
|
+
local_seen.add(parent)
|
|
130
|
+
local.append(parent)
|
|
131
|
+
seen = set()
|
|
132
|
+
while queue and pending:
|
|
133
|
+
target = queue.popleft()
|
|
134
|
+
if target in seen:
|
|
135
|
+
continue
|
|
136
|
+
seen.add(target)
|
|
137
|
+
ancestor = source.find_class(target)
|
|
138
|
+
if ancestor is None or ancestor.path in graph.nodes:
|
|
139
|
+
continue
|
|
140
|
+
for name in pending.keys() & ancestor.members.keys():
|
|
141
|
+
method = ancestor.members[name]
|
|
142
|
+
if not method.is_alias and method.is_function and method.runtime:
|
|
143
|
+
pending.pop(name).extras["external_override"] = method.path
|
|
144
|
+
queue.extend(path for base in ancestor.bases
|
|
145
|
+
if (path := getattr(base, "reference_path", None)))
|
|
@@ -32,6 +32,7 @@ from codemap.extract.behavior import add_behavior
|
|
|
32
32
|
from codemap.extract.dataflow import add_dataflow
|
|
33
33
|
from codemap.extract.dispatch import (add_dispatch, add_family_links, add_protocol_dispatch,
|
|
34
34
|
add_structural_implements)
|
|
35
|
+
from codemap.extract.external import stamp_external_overrides
|
|
35
36
|
from codemap.extract.gsource import (DOTTED_IMPORT_HINT, NESTED_IMPORT_HINT, KnownModules,
|
|
36
37
|
deepest_module, flat_resolve, module_file, module_identity)
|
|
37
38
|
from codemap.extract.union import merge_samples
|
|
@@ -50,6 +51,7 @@ SKIP_ENCODING, SKIP_SYNTAX, SKIP_IO, SKIP_UNREAD = "encoding", "syntax", "io", "
|
|
|
50
51
|
class _Walk:
|
|
51
52
|
"""What one structural walk accumulates besides nodes and edges."""
|
|
52
53
|
|
|
54
|
+
external_bases: dict[str, list[str]] = field(default_factory=dict)
|
|
53
55
|
aliases: list = field(default_factory=list) # (parent_module, name, target, public)
|
|
54
56
|
#: (module_id, target_symbol_path, scope) — scope is "module" or, since R1-C29,
|
|
55
57
|
#: "function" for an import written inside a function body.
|
|
@@ -255,6 +257,7 @@ def build_structural(package_path: str | Path):
|
|
|
255
257
|
|
|
256
258
|
_collect(graph, root, search_path, module_name, walk)
|
|
257
259
|
_resolve_edges(graph, module_name, walk.aliases, walk.imports)
|
|
260
|
+
stamp_external_overrides(graph, walk.external_bases, search_path)
|
|
258
261
|
# R1-C23/D2: an input the extractor could not read used to vanish without a word,
|
|
259
262
|
# and the graph then reported on a tree it had not fully seen. Record what was
|
|
260
263
|
# missed *in the artifact*, so a consumer holding only the graph is told.
|
|
@@ -648,7 +651,7 @@ def _collect(graph, obj, root, target_pkg, walk) -> None:
|
|
|
648
651
|
graph.add_edge(Edge("contains", obj.canonical_path, member.canonical_path))
|
|
649
652
|
_emit_decorated_by(graph, member)
|
|
650
653
|
if member.kind.value == "class":
|
|
651
|
-
_emit_inherits(graph, member, target_pkg)
|
|
654
|
+
_emit_inherits(graph, member, target_pkg, walk)
|
|
652
655
|
if member.kind.value in {"module", "class"}:
|
|
653
656
|
_collect(graph, member, root, target_pkg, walk)
|
|
654
657
|
|
|
@@ -676,11 +679,13 @@ def _claim(module, walk) -> bool:
|
|
|
676
679
|
|
|
677
680
|
# -- semantic edges resolvable inline (griffe gives absolute targets) --------
|
|
678
681
|
|
|
679
|
-
def _emit_inherits(graph, cls, target_pkg) -> None:
|
|
682
|
+
def _emit_inherits(graph, cls, target_pkg, walk) -> None:
|
|
680
683
|
"""One `inherits` edge per base; griffe resolves the base to a canonical path."""
|
|
681
684
|
for base in getattr(cls, "bases", None) or []:
|
|
682
685
|
target = getattr(base, "canonical_path", None) or str(base)
|
|
683
686
|
internal = target == target_pkg or target.startswith(target_pkg + ".")
|
|
687
|
+
if not internal and "." in target and getattr(base, "reference_path", None) == target:
|
|
688
|
+
walk.external_bases.setdefault(cls.canonical_path, []).append(target)
|
|
684
689
|
graph.add_edge(
|
|
685
690
|
Edge(
|
|
686
691
|
"inherits",
|