gitnexus 1.6.9 → 1.6.10-aptos.0
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.
- package/README.md +211 -53
- package/dist/_shared/graph/types.d.ts +67 -3
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +1 -0
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts +3 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js +4 -3
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +2 -0
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/languages.d.ts +2 -0
- package/dist/_shared/languages.d.ts.map +1 -1
- package/dist/_shared/languages.js +2 -0
- package/dist/_shared/languages.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +2 -2
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +8 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/pipeline.d.ts +1 -1
- package/dist/_shared/pipeline.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts +110 -0
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js +11 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.js +1 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +7 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +9 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +20 -3
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +1 -1
- package/dist/cli/ai-context.js +25 -44
- package/dist/cli/analyze.d.ts +5 -2
- package/dist/cli/analyze.js +197 -11
- package/dist/cli/clean.js +17 -3
- package/dist/cli/cli-message.d.ts +1 -1
- package/dist/cli/doctor.d.ts +18 -0
- package/dist/cli/doctor.js +96 -5
- package/dist/cli/editor-targets.d.ts +17 -2
- package/dist/cli/editor-targets.js +44 -0
- package/dist/cli/embeddings.d.ts +12 -0
- package/dist/cli/embeddings.js +49 -0
- package/dist/cli/eval-server.d.ts +23 -1
- package/dist/cli/eval-server.js +126 -8
- package/dist/cli/help-i18n.js +6 -0
- package/dist/cli/i18n/en.d.ts +18 -8
- package/dist/cli/i18n/en.js +18 -8
- package/dist/cli/i18n/resources.d.ts +28 -8
- package/dist/cli/i18n/zh-CN.d.ts +10 -0
- package/dist/cli/i18n/zh-CN.js +18 -8
- package/dist/cli/index.js +21 -7
- package/dist/cli/lazy-action.d.ts +7 -0
- package/dist/cli/lazy-action.js +27 -0
- package/dist/cli/mcp.js +6 -3
- package/dist/cli/move-availability.d.ts +5 -0
- package/dist/cli/move-availability.js +11 -0
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +230 -32
- package/dist/cli/skill-gen.js +38 -18
- package/dist/cli/standard-skills.d.ts +76 -0
- package/dist/cli/standard-skills.js +45 -0
- package/dist/cli/status.d.ts +4 -1
- package/dist/cli/status.js +57 -4
- package/dist/cli/tool.js +11 -0
- package/dist/cli/uninstall.js +77 -18
- package/dist/cli/wiki.d.ts +1 -0
- package/dist/cli/wiki.js +7 -1
- package/dist/config/ignore-service.d.ts +2 -0
- package/dist/config/ignore-service.js +27 -0
- package/dist/core/analysis-features.d.ts +21 -0
- package/dist/core/analysis-features.js +59 -0
- package/dist/core/analyzer-identity.d.ts +74 -0
- package/dist/core/analyzer-identity.js +1820 -0
- package/dist/core/augmentation/engine.js +13 -8
- package/dist/core/embeddings/embedder.d.ts +3 -2
- package/dist/core/embeddings/embedder.js +24 -7
- package/dist/core/embeddings/embedding-identity.d.ts +11 -0
- package/dist/core/embeddings/embedding-identity.js +24 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +36 -1
- package/dist/core/embeddings/embedding-pipeline.js +100 -9
- package/dist/core/embeddings/http-client.d.ts +33 -3
- package/dist/core/embeddings/http-client.js +237 -25
- package/dist/core/embeddings/node-module-compat.d.ts +25 -0
- package/dist/core/embeddings/node-module-compat.js +25 -0
- package/dist/core/embeddings/onnxruntime-common-resolver.js +8 -5
- package/dist/core/embeddings/onnxruntime-node-resolver.js +33 -7
- package/dist/core/embeddings/runtime-install.d.ts +119 -0
- package/dist/core/embeddings/runtime-install.js +372 -0
- package/dist/core/embeddings/runtime-support.d.ts +48 -17
- package/dist/core/embeddings/runtime-support.js +96 -0
- package/dist/core/git-staleness.js +1 -1
- package/dist/core/group/bridge-db.js +2 -0
- package/dist/core/group/extractors/http-patterns/python.js +246 -108
- package/dist/core/group/extractors/manifest-extractor.js +4 -0
- package/dist/core/incremental/escalation-gate.d.ts +38 -0
- package/dist/core/incremental/escalation-gate.js +48 -0
- package/dist/core/incremental/shadow-candidates.d.ts +3 -3
- package/dist/core/incremental/shadow-candidates.js +3 -3
- package/dist/core/incremental/subgraph-extract.d.ts +2 -2
- package/dist/core/incremental/subgraph-extract.js +2 -2
- package/dist/core/index-freshness.d.ts +5 -0
- package/dist/core/index-freshness.js +13 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.js +29 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1 -1
- package/dist/core/ingestion/cobol/jcl-processor.js +9 -8
- package/dist/core/ingestion/cobol-processor.js +27 -26
- package/dist/core/ingestion/community-processor.d.ts +51 -1
- package/dist/core/ingestion/community-processor.js +323 -64
- package/dist/core/ingestion/emit-references.js +7 -2
- package/dist/core/ingestion/filesystem-walker.js +4 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +3 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +7 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.d.ts +30 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.js +182 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.d.ts +12 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.js +26 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +24 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +115 -0
- package/dist/core/ingestion/languages/c/captures.js +56 -0
- package/dist/core/ingestion/languages/c/query.js +17 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +6 -0
- package/dist/core/ingestion/languages/cobol/captures.js +93 -0
- package/dist/core/ingestion/languages/cobol/scope-resolver.js +7 -0
- package/dist/core/ingestion/languages/cpp/captures.js +365 -75
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +14 -0
- package/dist/core/ingestion/languages/csharp/captures.js +25 -0
- package/dist/core/ingestion/languages/dart/captures.js +90 -2
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.d.ts +7 -0
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.js +30 -0
- package/dist/core/ingestion/languages/dart.js +2 -0
- package/dist/core/ingestion/languages/go/captures.js +34 -0
- package/dist/core/ingestion/languages/index.d.ts +1 -0
- package/dist/core/ingestion/languages/index.js +2 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +3 -0
- package/dist/core/ingestion/languages/java/analysis-features.js +13 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +22 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +58 -0
- package/dist/core/ingestion/languages/java/captures.d.ts +4 -3
- package/dist/core/ingestion/languages/java/captures.js +193 -17
- package/dist/core/ingestion/languages/java/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/java/package-facts.js +9 -0
- package/dist/core/ingestion/languages/java/package-siblings.d.ts +3 -16
- package/dist/core/ingestion/languages/java/package-siblings.js +8 -147
- package/dist/core/ingestion/languages/java/query.js +23 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +23 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.d.ts +23 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.js +215 -0
- package/dist/core/ingestion/languages/java.js +3 -0
- package/dist/core/ingestion/languages/javascript/captures.js +16 -0
- package/dist/core/ingestion/languages/javascript/query.js +21 -0
- package/dist/core/ingestion/languages/jvm/package-facts.d.ts +35 -0
- package/dist/core/ingestion/languages/jvm/package-facts.js +40 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.d.ts +14 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.js +129 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +17 -3
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +42 -8
- package/dist/core/ingestion/languages/kotlin/captures.js +59 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.js +9 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.js +8 -0
- package/dist/core/ingestion/languages/kotlin/query.js +19 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +9 -1
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/kotlin.js +5 -6
- package/dist/core/ingestion/languages/move.d.ts +1 -0
- package/dist/core/ingestion/languages/move.js +27 -0
- package/dist/core/ingestion/languages/php/captures.js +40 -0
- package/dist/core/ingestion/languages/php/import-decomposer.js +12 -0
- package/dist/core/ingestion/languages/php/import-target.d.ts +2 -1
- package/dist/core/ingestion/languages/php/import-target.js +110 -2
- package/dist/core/ingestion/languages/php/interpret.js +10 -0
- package/dist/core/ingestion/languages/php/scope-resolver.js +1 -1
- package/dist/core/ingestion/languages/python/captures.d.ts +3 -4
- package/dist/core/ingestion/languages/python/captures.js +24 -5
- package/dist/core/ingestion/languages/python/interpret.js +4 -0
- package/dist/core/ingestion/languages/python/receiver-binding.d.ts +15 -2
- package/dist/core/ingestion/languages/python/receiver-binding.js +96 -2
- package/dist/core/ingestion/languages/python/simple-hooks.d.ts +5 -5
- package/dist/core/ingestion/languages/python/simple-hooks.js +15 -5
- package/dist/core/ingestion/languages/ruby/captures.js +42 -0
- package/dist/core/ingestion/languages/rust/captures.js +13 -0
- package/dist/core/ingestion/languages/rust/interpret.js +18 -0
- package/dist/core/ingestion/languages/rust/query.js +9 -0
- package/dist/core/ingestion/languages/rust/range-binding.js +6 -2
- package/dist/core/ingestion/languages/swift/captures.js +12 -0
- package/dist/core/ingestion/languages/typescript/captures.js +21 -0
- package/dist/core/ingestion/languages/typescript/nuxt-auto-imports.js +2 -1
- package/dist/core/ingestion/languages/typescript/query.js +37 -0
- package/dist/core/ingestion/markdown-processor.js +3 -2
- package/dist/core/ingestion/model/registration-table.js +1 -0
- package/dist/core/ingestion/parsing-processor.d.ts +3 -1
- package/dist/core/ingestion/parsing-processor.js +36 -1
- package/dist/core/ingestion/pipeline-phases/index.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/index.js +2 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +56 -2
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +0 -2
- package/dist/core/ingestion/pipeline-phases/parse.js +12 -3
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +8 -0
- package/dist/core/ingestion/pipeline-phases/processes.js +11 -1
- package/dist/core/ingestion/pipeline-phases/spring-config.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/spring-config.js +433 -0
- package/dist/core/ingestion/pipeline-phases/standalone-ingest.d.ts +10 -0
- package/dist/core/ingestion/pipeline-phases/standalone-ingest.js +6 -0
- package/dist/core/ingestion/pipeline.d.ts +4 -2
- package/dist/core/ingestion/pipeline.js +5 -2
- package/dist/core/ingestion/resolve-references.js +12 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +83 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +131 -0
- package/dist/core/ingestion/route-extractors/python-const-resolver.d.ts +75 -0
- package/dist/core/ingestion/route-extractors/python-const-resolver.js +299 -0
- package/dist/core/ingestion/scope-extractor.js +306 -43
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +71 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +7 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +8 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +3 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +6 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +1 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +4 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +7 -2
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +47 -0
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +1138 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +16 -4
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +97 -1
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.d.ts +60 -0
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.js +111 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +4 -3
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +5 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +25 -38
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +6 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +147 -35
- package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +1 -1
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +73 -44
- package/dist/core/ingestion/taint/typescript-model.js +34 -2
- package/dist/core/ingestion/tree-sitter-queries.d.ts +2 -2
- package/dist/core/ingestion/tree-sitter-queries.js +23 -2
- package/dist/core/ingestion/type-extractors/jvm.js +17 -2
- package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -0
- package/dist/core/ingestion/utils/ast-helpers.js +153 -2
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +94 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +878 -0
- package/dist/core/ingestion/utils/line-base.d.ts +20 -0
- package/dist/core/ingestion/utils/line-base.js +20 -0
- package/dist/core/ingestion/utils/symbol-labels.d.ts +21 -0
- package/dist/core/ingestion/utils/symbol-labels.js +45 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +34 -0
- package/dist/core/ingestion/workers/parse-worker.js +40 -5
- package/dist/core/ingestion/workers/result-merge.js +4 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +28 -0
- package/dist/core/ingestion/workers/worker-pool.js +128 -28
- package/dist/core/lbug/csv-generator.d.ts +15 -0
- package/dist/core/lbug/csv-generator.js +124 -27
- package/dist/core/lbug/cypher-escape.d.ts +20 -0
- package/dist/core/lbug/cypher-escape.js +20 -0
- package/dist/core/lbug/extension-load-error.d.ts +67 -0
- package/dist/core/lbug/extension-load-error.js +326 -0
- package/dist/core/lbug/extension-loader.d.ts +17 -2
- package/dist/core/lbug/extension-loader.js +38 -13
- package/dist/core/lbug/lbug-adapter.d.ts +203 -2
- package/dist/core/lbug/lbug-adapter.js +527 -86
- package/dist/core/lbug/lbug-config.d.ts +56 -2
- package/dist/core/lbug/lbug-config.js +267 -7
- package/dist/core/lbug/move-columns.d.ts +7 -0
- package/dist/core/lbug/move-columns.js +86 -0
- package/dist/core/lbug/native-check.d.ts +40 -0
- package/dist/core/lbug/native-check.js +90 -0
- package/dist/core/lbug/node-table-layout.d.ts +29 -0
- package/dist/core/lbug/node-table-layout.js +119 -0
- package/dist/core/lbug/pool-adapter.d.ts +23 -1
- package/dist/core/lbug/pool-adapter.js +115 -8
- package/dist/core/lbug/schema.d.ts +4 -3
- package/dist/core/lbug/schema.js +16 -16
- package/dist/core/lbug/sidecar-recovery.d.ts +172 -0
- package/dist/core/lbug/sidecar-recovery.js +418 -16
- package/dist/core/lbug/wal-checkpoint-driver.js +3 -0
- package/dist/core/move/artifact-download.d.ts +19 -0
- package/dist/core/move/artifact-download.js +179 -0
- package/dist/core/move/compiler-facts.d.ts +120 -0
- package/dist/core/move/compiler-facts.js +9 -0
- package/dist/core/move/consistency.d.ts +28 -0
- package/dist/core/move/consistency.js +98 -0
- package/dist/core/move/constants.d.ts +98 -0
- package/dist/core/move/constants.js +136 -0
- package/dist/core/move/discovery.d.ts +10 -0
- package/dist/core/move/discovery.js +22 -0
- package/dist/core/move/entry-points.d.ts +14 -0
- package/dist/core/move/entry-points.js +40 -0
- package/dist/core/move/facts-mapper.d.ts +75 -0
- package/dist/core/move/facts-mapper.js +534 -0
- package/dist/core/move/install-lock.d.ts +14 -0
- package/dist/core/move/install-lock.js +102 -0
- package/dist/core/move/install.d.ts +39 -0
- package/dist/core/move/install.js +391 -0
- package/dist/core/move/mcp-client.d.ts +115 -0
- package/dist/core/move/mcp-client.js +436 -0
- package/dist/core/move/move-ingest.d.ts +49 -0
- package/dist/core/move/move-ingest.js +320 -0
- package/dist/core/move/provision.d.ts +19 -0
- package/dist/core/move/provision.js +91 -0
- package/dist/core/move/release.d.ts +6 -0
- package/dist/core/move/release.js +10 -0
- package/dist/core/move/symbol-id.d.ts +35 -0
- package/dist/core/move/symbol-id.js +65 -0
- package/dist/core/move/type-parser.d.ts +11 -0
- package/dist/core/move/type-parser.js +38 -0
- package/dist/core/platform/capabilities.d.ts +0 -1
- package/dist/core/platform/capabilities.js +39 -8
- package/dist/core/run-analyze.d.ts +3 -3
- package/dist/core/run-analyze.js +1001 -184
- package/dist/core/search/fts-indexes.d.ts +31 -0
- package/dist/core/search/fts-indexes.js +73 -0
- package/dist/core/search/fts-schema.js +2 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +8 -3
- package/dist/core/tree-sitter/safe-parse.js +21 -7
- package/dist/core/wiki/graph-queries.js +6 -5
- package/dist/core/wiki/llm-client.d.ts +8 -2
- package/dist/core/wiki/llm-client.js +41 -5
- package/dist/mcp/core/embedder.js +16 -2
- package/dist/mcp/http-transport.d.ts +5 -0
- package/dist/mcp/http-transport.js +19 -5
- package/dist/mcp/local/bean-metadata.d.ts +2 -0
- package/dist/mcp/local/bean-metadata.js +25 -0
- package/dist/mcp/local/line-display.d.ts +22 -0
- package/dist/mcp/local/line-display.js +3 -0
- package/dist/mcp/local/local-backend.d.ts +19 -1
- package/dist/mcp/local/local-backend.js +402 -155
- package/dist/mcp/local/pdg-impact.d.ts +5 -3
- package/dist/mcp/local/pdg-impact.js +5 -2
- package/dist/mcp/output-budget.d.ts +5 -0
- package/dist/mcp/output-budget.js +52 -0
- package/dist/mcp/read-only-policy.d.ts +12 -0
- package/dist/mcp/read-only-policy.js +102 -0
- package/dist/mcp/repository-policy.d.ts +34 -0
- package/dist/mcp/repository-policy.js +328 -0
- package/dist/mcp/resources.js +32 -5
- package/dist/mcp/server.d.ts +5 -2
- package/dist/mcp/server.js +29 -9
- package/dist/mcp/tools.d.ts +0 -8
- package/dist/mcp/tools.js +102 -5
- package/dist/server/analyze-job.d.ts +3 -0
- package/dist/server/analyze-job.js +17 -0
- package/dist/server/analyze-launch.d.ts +6 -0
- package/dist/server/analyze-launch.js +82 -6
- package/dist/server/analyze-worker-core.d.ts +2 -1
- package/dist/server/analyze-worker-core.js +5 -2
- package/dist/server/analyze-worker.js +29 -6
- package/dist/server/api.d.ts +30 -0
- package/dist/server/api.js +120 -34
- package/dist/server/mcp-http.d.ts +1 -1
- package/dist/server/mcp-http.js +4 -2
- package/dist/server/upload-ingest.js +2 -1
- package/dist/server/validation.js +2 -1
- package/dist/storage/git.d.ts +31 -0
- package/dist/storage/git.js +111 -1
- package/dist/storage/parse-cache.js +7 -1
- package/dist/storage/parsedfile-store.d.ts +8 -0
- package/dist/storage/parsedfile-store.js +165 -1
- package/dist/storage/repo-manager.d.ts +194 -2
- package/dist/storage/repo-manager.js +56 -1
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +50 -3
- package/hooks/claude/gitnexus-hook.cjs +59 -9
- package/hooks/claude/pre-tool-use.sh +0 -0
- package/hooks/claude/session-start.sh +0 -0
- package/package.json +21 -15
- package/scripts/cross-platform-tests.ts +56 -0
- package/scripts/ensure-fts.ts +43 -0
- package/scripts/install-duckdb-extension.mjs +85 -24
- package/scripts/run-cross-platform.ts +61 -6
- package/scripts/shard-arg.ts +30 -0
- package/scripts/sync-plugin-manifests.mjs +192 -0
- package/skills/gitnexus-lfg/README.md +55 -0
- package/skills/gitnexus-lfg/SKILL.md +86 -0
- package/skills/gitnexus-plan/README.md +142 -0
- package/skills/gitnexus-plan/SKILL.md +348 -0
- package/skills/gitnexus-plan/references/context-ledger.md +137 -0
- package/skills/gitnexus-plan/references/context-pack.md +126 -0
- package/skills/gitnexus-plan/references/evidence-provenance.md +272 -0
- package/skills/gitnexus-plan/references/pdg-slice.md +109 -0
- package/skills/gitnexus-plan/references/plan-template.md +201 -0
- package/skills/gitnexus-plan/scripts/evidence-provenance.mjs +2084 -0
- package/skills/gitnexus-review/SKILL.md +273 -0
- package/skills/gitnexus-review/ci-personas/ci-adversarial-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-blast-radius-lens.md +39 -0
- package/skills/gitnexus-review/ci-personas/ci-correctness-lens.md +37 -0
- package/skills/gitnexus-review/ci-personas/ci-coverage-lens.md +40 -0
- package/skills/gitnexus-review/ci-personas/ci-critic-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-security-lens.md +39 -0
- package/skills/gitnexus-work/README.md +71 -0
- package/skills/gitnexus-work/SKILL.md +269 -0
- package/skills/gitnexus-work/references/evidence-provenance.md +272 -0
- package/skills/gitnexus-work/scripts/evidence-provenance.mjs +2084 -0
- package/web/assets/ProcessFlowModal-B_bfBySy.js +22 -0
- package/web/assets/__vite-browser-external-bMKyYQkO.js +1 -0
- package/web/assets/agent-Bqxn-abU.js +626 -0
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-BVWFvYz2.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-CmG3uPWf.js +36 -0
- package/web/assets/{blockDiagram-7IZFK4PR-BkWhpzWB.js → blockDiagram-7IZFK4PR-DBefcjof.js} +7 -7
- package/web/assets/{c4Diagram-Y2BXMSZH-DtBvpzWD.js → c4Diagram-Y2BXMSZH-EjWnjEJl.js} +6 -6
- package/web/assets/chunk-2T2R6R2M-Bb6Sy3_j.js +4 -0
- package/web/assets/chunk-2UTLFMKG-CXlhF3Pt.js +1 -0
- package/web/assets/chunk-3SSMPTDK-rPsRM1x0.js +321 -0
- package/web/assets/chunk-4R4BOZG6-Be_F0JoX.js +159 -0
- package/web/assets/{chunk-6764PJDD-DpIS7hxD.js → chunk-6764PJDD-C7xxk063.js} +1 -1
- package/web/assets/chunk-67TQ5CYL-CA7OhIEf.js +124 -0
- package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +32 -0
- package/web/assets/chunk-7J6CGLKN-BlKwgXKs.js +10 -0
- package/web/assets/chunk-7W6UQGC5-pyKGssV3.js +1 -0
- package/web/assets/chunk-C62D2QBJ-3gdL8EKc.js +1 -0
- package/web/assets/chunk-CEXFNPSA-CjwtMDkc.js +1 -0
- package/web/assets/{chunk-INKRHTLW-Nu4ri9P-.js → chunk-INKRHTLW-Ckl3_KkO.js} +13 -13
- package/web/assets/chunk-J5EP6P6S-L19oz55R.js +1 -0
- package/web/assets/{chunk-KGFNY3KK-JGMJvKCK.js → chunk-KGFNY3KK-BZeP-55u.js} +17 -17
- package/web/assets/chunk-KGYTTC2M-zm6n242I.js +1 -0
- package/web/assets/{chunk-KRXBNO2N-BW5o0KUN.js → chunk-KRXBNO2N-C-UNuKKf.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-CfLLCywY.js → chunk-LCXTWHL2-C162wE5z.js} +5 -5
- package/web/assets/chunk-LII3EMHJ-BL6lKJ_P.js +1 -0
- package/web/assets/chunk-LRIF4GLE-n59lhprL.js +1 -0
- package/web/assets/chunk-QA3QBVWF-DVXPOIxe.js +2 -0
- package/web/assets/chunk-RERM46MO-B5dAdWpP.js +1 -0
- package/web/assets/chunk-RG4AUYOV-ZNgyLFq6.js +206 -0
- package/web/assets/chunk-RKZBBQEN-MyIQbGgD.js +1 -0
- package/web/assets/chunk-RLI5ZMPA-CkXZ0y0U.js +1 -0
- package/web/assets/chunk-T2UQINTJ-BEyXhZWe.js +1 -0
- package/web/assets/chunk-UP6H54XL-BG-n7qDp.js +1 -0
- package/web/assets/chunk-UXSXWOXI-CW1_r5cS.js +1 -0
- package/web/assets/chunk-UY5QBCOK-ByqTVLvh.js +1 -0
- package/web/assets/chunk-VU6ZFW4Y-BLeasdkU.js +2 -0
- package/web/assets/{chunk-W44A43WB-JqMLIpR0.js → chunk-W44A43WB-BN8EQc_u.js} +1 -1
- package/web/assets/chunk-ZXARS5L4-C3v-4Fsw.js +1 -0
- package/web/assets/classDiagram-KGZ6W3CR-olpO3fMe.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-olpO3fMe.js +1 -0
- package/web/assets/cose-bilkent-UX7MHV2Q-BmnZ7Mvj.js +1 -0
- package/web/assets/dagre-ND4H6XIP-CY4iIF7v.js +4 -0
- package/web/assets/diagram-3NCE3AQN-CO6QpzEE.js +43 -0
- package/web/assets/diagram-GF46GFSD-B2atbzmU.js +24 -0
- package/web/assets/diagram-HNR7UZ2L-DVRltWbL.js +3 -0
- package/web/assets/diagram-QXG6HAR7-DR6AHD2h.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-DkpoMwTL.js +10 -0
- package/web/assets/erDiagram-L5TCEMPS-n8g_90bc.js +85 -0
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-CgFBM7e-.js +1 -0
- package/web/assets/flowDiagram-H6V6AXG4-SGMDiCkB.js +162 -0
- package/web/assets/ganttDiagram-JCBTUEKG-Cb3UBqRS.js +292 -0
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DCJv7SII.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-Bs9CR7tq.js +106 -0
- package/web/assets/index-CX_fADmQ.css +2 -0
- package/web/assets/index-D1Z3dGGz.js +575 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-BfNy-9Nd.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-T368on4D.js +2 -0
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-DfYpxnE5.js → ishikawaDiagram-BNXS4ZKH-XpjJRU9h.js} +6 -6
- package/web/assets/journeyDiagram-M6C3CM3L-C6wjooas.js +139 -0
- package/web/assets/kanban-definition-75IXJCU3-5_UVY79g.js +89 -0
- package/web/assets/{katex-K3KEBU37-CTc5BslQ.js → katex-K3KEBU37-qRQBy-EZ.js} +2 -2
- package/web/assets/{mindmap-definition-2TDM6QVE-DypvbOMQ.js → mindmap-definition-2TDM6QVE-8xDLzk2e.js} +29 -29
- package/web/assets/node-Ct_zna8U.js +8 -0
- package/web/assets/packet-YPE3B663-LP52Z2RK-D4qkeG9k.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-B_yMKyQa.js +1 -0
- package/web/assets/pieDiagram-CU6KROY3-Bv4LpAbr.js +30 -0
- package/web/assets/preload-helper-Czpn1I53.js +1 -0
- package/web/assets/{quadrantDiagram-VICAPDV7-yXSZ2lLz.js → quadrantDiagram-VICAPDV7-DR54jOeR.js} +6 -6
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DeD6yN_0.js +1 -0
- package/web/assets/requirementDiagram-JXO7QTGE-PEkg7sKC.js +84 -0
- package/web/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/assets/sankeyDiagram-URQDO5SZ-DDWEtjcs.js +40 -0
- package/web/assets/sdk-CzHHH8tD.js +37 -0
- package/web/assets/sequenceDiagram-VS2MUI6T-Bv-uwANx.js +162 -0
- package/web/assets/src-JV30wyV8.js +1 -0
- package/web/assets/stateDiagram-7D4R322I-DVNjmkEq.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-CyN4Fh7_.js +1 -0
- package/web/assets/timeline-definition-O6YCAMPW-Qmsuo7qS.js +120 -0
- package/web/assets/treeView-BLDUP644-QA4HXRO3-CDuSYnd4.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-imazucyJ.js +1 -0
- package/web/assets/vennDiagram-MWXL3ELB-BD1iK1SX.js +34 -0
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-DqrT9tB8.js +1 -0
- package/web/assets/wardleyDiagram-CUQ6CDDI-D6TzLVob.js +78 -0
- package/web/assets/{xychartDiagram-N2JHSOCM-BOLm0eNm.js → xychartDiagram-N2JHSOCM-CoZ_Tits.js} +6 -6
- package/web/index.html +18 -10
- package/skills/gitnexus-pr-review.md +0 -163
- package/web/assets/agent-Dli_x7bU.js +0 -660
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-DxJw65fT.js +0 -1
- package/web/assets/architectureDiagram-UL44E2DR-dEkqUZN9.js +0 -36
- package/web/assets/chunk-3SSMPTDK-B4_etUhr.js +0 -321
- package/web/assets/chunk-67TQ5CYL-4sNPJU1q.js +0 -124
- package/web/assets/chunk-7W6UQGC5-KyEG0HQg.js +0 -1
- package/web/assets/chunk-KGYTTC2M-CWC_c3H9.js +0 -161
- package/web/assets/chunk-LII3EMHJ-D-jm-dLa.js +0 -1
- package/web/assets/chunk-QA3QBVWF-BgRW3SXd.js +0 -2
- package/web/assets/chunk-RG4AUYOV-CqWzWsV3.js +0 -206
- package/web/assets/chunk-T2UQINTJ-DSBqkzH7.js +0 -1
- package/web/assets/chunk-UY5QBCOK-DyF0vyGd.js +0 -1
- package/web/assets/chunk-ZXARS5L4-CxN8oiwI.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-CMne4tG9.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-CMne4tG9.js +0 -1
- package/web/assets/cose-bilkent-UX7MHV2Q-D71wNYRJ.js +0 -1
- package/web/assets/dagre-ND4H6XIP-Co5rRx9X.js +0 -4
- package/web/assets/diagram-3NCE3AQN-DBp4O00j.js +0 -43
- package/web/assets/diagram-GF46GFSD-6N_8yS0i.js +0 -24
- package/web/assets/diagram-HNR7UZ2L-DFCfd5LI.js +0 -3
- package/web/assets/diagram-QXG6HAR7-Di093rFg.js +0 -24
- package/web/assets/diagram-WEQXMOUZ-DZWi4SUN.js +0 -10
- package/web/assets/erDiagram-L5TCEMPS-8X1y6R4Y.js +0 -85
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BQm9QzEa.js +0 -1
- package/web/assets/flowDiagram-H6V6AXG4-CMpY8Ufn.js +0 -162
- package/web/assets/ganttDiagram-JCBTUEKG-D3iL2Aet.js +0 -292
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-Cr_Bm2Nb.js +0 -1
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CPIDgxGm.js +0 -106
- package/web/assets/index-KctnI3Vq.js +0 -635
- package/web/assets/index-_lgn7hs5.css +0 -2
- package/web/assets/info-J43DQDTF-KCYPFFUO-Cs4p2oyk.js +0 -1
- package/web/assets/infoDiagram-3YFTVSEB-BaLMZkUg.js +0 -2
- package/web/assets/journeyDiagram-M6C3CM3L-CvArszLo.js +0 -139
- package/web/assets/kanban-definition-75IXJCU3-CpfVLLf9.js +0 -89
- package/web/assets/packet-YPE3B663-LP52Z2RK-CKCrztD2.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BB7pHqoD.js +0 -1
- package/web/assets/pieDiagram-CU6KROY3-s27EFWgP.js +0 -30
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DhoTOcuK.js +0 -1
- package/web/assets/requirementDiagram-JXO7QTGE-CWhqInuf.js +0 -84
- package/web/assets/sankeyDiagram-URQDO5SZ-1qEjlFIB.js +0 -40
- package/web/assets/sequenceDiagram-VS2MUI6T-RyTlZ5cR.js +0 -162
- package/web/assets/stateDiagram-7D4R322I-DTjVfX4A.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-xY9_k9_Q.js +0 -1
- package/web/assets/timeline-definition-O6YCAMPW-DrrqLYAf.js +0 -120
- package/web/assets/treeView-BLDUP644-QA4HXRO3-ODehyGKL.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-BfpgC-7o.js +0 -1
- package/web/assets/vennDiagram-MWXL3ELB-B0RkWAim.js +0 -34
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-CNeL6VHE.js +0 -1
- package/web/assets/wardleyDiagram-CUQ6CDDI-boUxiQ5F.js +0 -78
|
@@ -57,11 +57,23 @@ export declare function emitFreeCallFallback(graph: KnowledgeGraph, scopes: Scop
|
|
|
57
57
|
* fail at the call site. Three-valued; `'unknown'` keeps the
|
|
58
58
|
* candidate (monotonicity). */
|
|
59
59
|
readonly constraintCompatibility?: ScopeResolver['constraintCompatibility'];
|
|
60
|
+
/** Platform/language built-in names (e.g. `fetch`, `setTimeout`) that
|
|
61
|
+
* are never real repository declarations. Gates the finalize-bucket
|
|
62
|
+
* guard below (#2545) -- see `hasGenuineLexicalBinding`. */
|
|
63
|
+
readonly isBuiltInName?: (name: string) => boolean;
|
|
64
|
+
/** Instance-ownership gate (#2550): a free call may resolve to a
|
|
65
|
+
* `Method` only when the caller's enclosing class chain (self + MRO)
|
|
66
|
+
* contains the method's owner. See
|
|
67
|
+
* `ScopeResolver.freeCallsRequireInstanceOwnership`. */
|
|
68
|
+
readonly freeCallsRequireInstanceOwnership?: boolean;
|
|
60
69
|
readonly recordResolutionOutcome?: ResolutionOutcomeRecorder;
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*
|
|
70
|
+
/** Call sites owned by a later precise pass (for example callable-value-flow). */
|
|
71
|
+
readonly skipSites?: ReadonlySet<string>;
|
|
72
|
+
/** Resolved-callee-id capture sink (#2227 U2). Threaded in under `--pdg`
|
|
73
|
+
* OR for callable-flow's direct-target index (#2437, position-filtered);
|
|
74
|
+
* `undefined` ⇒ zero overhead, byte-identity (R4). Captured at the CALLS
|
|
75
|
+
* emit below BEFORE the collapsed `seen` dedup (KTD6) so same-target
|
|
76
|
+
* multi-line calls are still recorded per site. */
|
|
65
77
|
readonly calleeIdSink?: CalleeIdSink;
|
|
66
78
|
}): number;
|
|
67
79
|
/**
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* generalization plan.
|
|
18
18
|
*/
|
|
19
19
|
import { resolveCallerGraphId, resolveDefGraphId } from '../graph-bridge/ids.js';
|
|
20
|
-
import { findAllCallableBindingsInScope, findCallableBindingInScope, findCallableBindingsAndAdlBlocker, resolveInheritanceBaseInScope, } from '../scope/walkers.js';
|
|
20
|
+
import { findAllCallableBindingsInScope, findCallableBindingInScope, findCallableBindingsAndAdlBlocker, findEnclosingClassDef, resolveInheritanceBaseInScope, } from '../scope/walkers.js';
|
|
21
21
|
import { isOverloadAmbiguousAfterNormalization, narrowOverloadCandidates, } from './overload-narrowing.js';
|
|
22
22
|
export function emitFreeCallFallback(graph, scopes, parsedFiles, nodeLookup, _referenceIndex, handledSites, model, workspaceIndex, options = {}) {
|
|
23
23
|
let emitted = 0;
|
|
@@ -46,6 +46,8 @@ export function emitFreeCallFallback(graph, scopes, parsedFiles, nodeLookup, _re
|
|
|
46
46
|
continue;
|
|
47
47
|
if (site.explicitReceiver !== undefined)
|
|
48
48
|
continue;
|
|
49
|
+
if (options.skipSites?.has(siteKey(parsed.filePath, site)) === true)
|
|
50
|
+
continue;
|
|
49
51
|
// Constructor form (`new User(...)`): resolve the class, then
|
|
50
52
|
// emit CALLS to its explicit Constructor def (when present) or
|
|
51
53
|
// to the Class node itself (implicit constructor). Legacy emits
|
|
@@ -107,6 +109,72 @@ export function emitFreeCallFallback(graph, scopes, parsedFiles, nodeLookup, _re
|
|
|
107
109
|
// available AND the binding scope contains multiple overloads,
|
|
108
110
|
// refine with narrowOverloadCandidates (#1578).
|
|
109
111
|
fnDef = findCallableBindingInScope(site.inScope, site.name, scopes);
|
|
112
|
+
if (fnDef !== undefined &&
|
|
113
|
+
options.isBuiltInName?.(site.name) === true &&
|
|
114
|
+
fnDef.filePath === parsed.filePath &&
|
|
115
|
+
!hasGenuineLexicalBinding(site.inScope, site.name, scopes)) {
|
|
116
|
+
// A platform/language built-in (e.g. `fetch`, `setTimeout`)
|
|
117
|
+
// with no binding reachable via the TRUE lexical scope chain
|
|
118
|
+
// (Scope.bindings only) -- the match came solely from
|
|
119
|
+
// finalize's per-file "local + imports + wildcards" bucket,
|
|
120
|
+
// which flattens every declaration in the file onto the
|
|
121
|
+
// module scope regardless of true nesting depth
|
|
122
|
+
// (gitnexus-shared's `materializeBindings`). That flattening
|
|
123
|
+
// is correct for its purpose (cross-file import targets) but
|
|
124
|
+
// over-matches same-file built-in-shadowing declarations that
|
|
125
|
+
// were never really module-scope-visible -- e.g. a Cloudflare
|
|
126
|
+
// Worker's `export default { fetch(req) {} }` handler (#2545).
|
|
127
|
+
// Leave the call unresolved rather than emit a false edge.
|
|
128
|
+
//
|
|
129
|
+
// `fnDef.filePath === parsed.filePath` is the load-bearing
|
|
130
|
+
// guard against a real regression: `materializeBindings`'s
|
|
131
|
+
// flat bucket is per-file, so the leak this guard targets is
|
|
132
|
+
// ALWAYS same-file. A cross-file match at this point can only
|
|
133
|
+
// come from a genuine import/namespace/workspace-FQN channel
|
|
134
|
+
// (the separate, gated `pickUniqueGlobalCallable` global
|
|
135
|
+
// fallback runs later and isn't what populated `fnDef` here)
|
|
136
|
+
// -- e.g. `import { fetch } from './fetch-polyfill'` must
|
|
137
|
+
// keep resolving. Without this check, that import silently
|
|
138
|
+
// stopped resolving (verified via a scratch probe fixture).
|
|
139
|
+
fnDef = undefined;
|
|
140
|
+
}
|
|
141
|
+
// Instance-ownership gate (#2550). Placement matters: after the
|
|
142
|
+
// scope-chain lookup, BEFORE overload narrowing -- a suppressed
|
|
143
|
+
// candidate must not participate in overload selection. The
|
|
144
|
+
// legitimate same-class bare call already resolved earlier via
|
|
145
|
+
// `pickImplicitThisOverload`; an inherited bare call passes the
|
|
146
|
+
// MRO arm here; what remains is the finalize-bucket leak (an
|
|
147
|
+
// unrelated same-file method matched by bare name).
|
|
148
|
+
//
|
|
149
|
+
// Same-file only (mirrors the #2545 guard's load-bearing
|
|
150
|
+
// condition): the `materializeBindings` bucket is per-file, so
|
|
151
|
+
// the leak is ALWAYS same-file. A cross-file Method match here
|
|
152
|
+
// came through a genuine import channel -- e.g. the arity-
|
|
153
|
+
// narrowing parity fixtures resolve a bare `writeAudit(u)` to
|
|
154
|
+
// an imported class's method, which must keep working
|
|
155
|
+
// (suppressing it broke `java.test.ts`'s arity-filtering suite,
|
|
156
|
+
// verified empirically).
|
|
157
|
+
if (fnDef !== undefined &&
|
|
158
|
+
options.freeCallsRequireInstanceOwnership === true &&
|
|
159
|
+
fnDef.type === 'Method' &&
|
|
160
|
+
fnDef.ownerId !== undefined &&
|
|
161
|
+
fnDef.filePath === parsed.filePath) {
|
|
162
|
+
const enclosing = findEnclosingClassDef(site.inScope, scopes);
|
|
163
|
+
const ownerReachable = enclosing !== undefined &&
|
|
164
|
+
(enclosing.nodeId === fnDef.ownerId ||
|
|
165
|
+
scopes.methodDispatch.mroFor(enclosing.nodeId).includes(fnDef.ownerId));
|
|
166
|
+
if (!ownerReachable) {
|
|
167
|
+
recordSuppressedOutcome(options.recordResolutionOutcome, {
|
|
168
|
+
phase: 'free-call-fallback',
|
|
169
|
+
filePath: parsed.filePath,
|
|
170
|
+
name: site.name,
|
|
171
|
+
range: site.atRange,
|
|
172
|
+
reason: 'free-call-instance-ownership',
|
|
173
|
+
candidates: [fnDef],
|
|
174
|
+
});
|
|
175
|
+
fnDef = undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
110
178
|
if (fnDef !== undefined && options.conversionRankFn !== undefined) {
|
|
111
179
|
const allCallables = findAllCallableBindingsInScope(site.inScope, site.name, scopes);
|
|
112
180
|
if (allCallables.length > 1) {
|
|
@@ -707,3 +775,31 @@ export function pickImplicitThisOverload(site, scopes, workspaceIndex, model, ho
|
|
|
707
775
|
return undefined;
|
|
708
776
|
return candidates[0];
|
|
709
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* True when `name` is bound somewhere along the TRUE lexical scope
|
|
780
|
+
* chain from `startScope` -- i.e. via `Scope.bindings` (the raw,
|
|
781
|
+
* nesting-aware per-scope map built during extraction), NOT via
|
|
782
|
+
* finalize's `indexes.bindings` module-scope bucket (which flattens
|
|
783
|
+
* every declaration in the file onto the module scope regardless of
|
|
784
|
+
* true nesting -- see `hasGenuineLexicalBinding`'s caller for why that
|
|
785
|
+
* distinction matters, #2545).
|
|
786
|
+
*/
|
|
787
|
+
function hasGenuineLexicalBinding(startScope, name, scopes) {
|
|
788
|
+
let currentId = startScope;
|
|
789
|
+
const visited = new Set();
|
|
790
|
+
while (currentId !== null) {
|
|
791
|
+
if (visited.has(currentId))
|
|
792
|
+
return false;
|
|
793
|
+
visited.add(currentId);
|
|
794
|
+
const scope = scopes.scopeTree.getScope(currentId);
|
|
795
|
+
if (scope === undefined)
|
|
796
|
+
return false;
|
|
797
|
+
// `Object` scopes (object/record literal bodies) are a hoist
|
|
798
|
+
// boundary only -- never a genuine lexical binding, not even to
|
|
799
|
+
// their own nested children (#2551, mirrors scope/walkers.ts).
|
|
800
|
+
if (scope.kind !== 'Object' && scope.bindings.get(name) !== undefined)
|
|
801
|
+
return true;
|
|
802
|
+
currentId = scope.parent;
|
|
803
|
+
}
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `emitPropertyDispatchCalls` — value-ref registration edges + field-based
|
|
3
|
+
* dispatch for functions registered as object-literal property values
|
|
4
|
+
* (#2437).
|
|
5
|
+
*
|
|
6
|
+
* A provider-hook registration (`{ emitScopeCaptures: emitCppScopeCaptures }`)
|
|
7
|
+
* emits a USES reference edge — a registration is not an invocation (Kythe
|
|
8
|
+
* `ref` vs `ref/call`; Joern `METHOD_REF`). The invocation happens later
|
|
9
|
+
* through the property (`provider.emitScopeCaptures(...)`) — a dispatch the
|
|
10
|
+
* receiver-bound pass cannot resolve because object literals are not
|
|
11
|
+
* IMPLEMENTS-linked implementors. This pass closes that soundness gap the
|
|
12
|
+
* field-based way (Feldthaus et al., ICSE'13; CodeQL `impliedReceiverStep`):
|
|
13
|
+
* key registrations by property name and connect every member-call site
|
|
14
|
+
* `x.<key>(...)` to every function registered under `<key>`.
|
|
15
|
+
*
|
|
16
|
+
* This pass is the SINGLE owner of `value-ref` resolution. The shared
|
|
17
|
+
* registries only consult pre-finalize local bindings — imported names live
|
|
18
|
+
* in finalized bindings (the same reason free calls need
|
|
19
|
+
* `emitFreeCallFallback`) — so `resolveReferenceSites` skips `value-ref`
|
|
20
|
+
* sites and this pass resolves them post-finalize via
|
|
21
|
+
* `findCallableBindingInScope` (Function/Method/Constructor only — the
|
|
22
|
+
* callable gate that keeps `{ port: DEFAULT_PORT }` from emitting anything).
|
|
23
|
+
*
|
|
24
|
+
* Precision posture (mirrors `emitInterfaceDispatchFor`):
|
|
25
|
+
* - reason `'property-dispatch'` keeps synthesized CALLS auditable;
|
|
26
|
+
* - dispatch confidence 0.7 sits below the 0.85 resolved baseline;
|
|
27
|
+
* - a per-key fan-out cap drops promiscuous names (`handler`, `callback`)
|
|
28
|
+
* entirely rather than truncating silently — property-name collisions
|
|
29
|
+
* across unrelated objects are the documented field-based failure mode.
|
|
30
|
+
*
|
|
31
|
+
* Ordering: runs AFTER the precise emit passes. `graph.addRelationship` is
|
|
32
|
+
* first-write-wins on the position-keyed edge id, so a site that already
|
|
33
|
+
* resolved precisely to the same target keeps its precise edge.
|
|
34
|
+
*
|
|
35
|
+
* Language-neutral: consumes only `value-ref` sites (any language that
|
|
36
|
+
* emits the capture participates) and generic member-call sites.
|
|
37
|
+
*/
|
|
38
|
+
import type { ParsedFile } from '../../../../_shared/index.js';
|
|
39
|
+
import type { KnowledgeGraph } from '../../../graph/types.js';
|
|
40
|
+
import type { ScopeResolutionIndexes } from '../../model/scope-resolution-indexes.js';
|
|
41
|
+
import type { GraphNodeLookup } from '../graph-bridge/node-lookup.js';
|
|
42
|
+
import type { CalleeIdSink } from '../graph-bridge/callee-id-sink.js';
|
|
43
|
+
/**
|
|
44
|
+
* Keys registered by more than this many distinct functions are skipped —
|
|
45
|
+
* dispatch through such a name says nothing about which function runs.
|
|
46
|
+
* Calibrated on this repo's own provider tables: `emitScopeCaptures` has 16
|
|
47
|
+
* legitimate registrations (one per language provider), so the cap sits at
|
|
48
|
+
* 2× that — dropping the motivating key was the failure the first value (8)
|
|
49
|
+
* had. ponytail: flat cap; revisit with per-receiver narrowing if real
|
|
50
|
+
* repos show useful keys being dropped (§12 of the #2437 plan).
|
|
51
|
+
*/
|
|
52
|
+
export declare const MAX_PROPERTY_DISPATCH_FANOUT = 32;
|
|
53
|
+
/** Below the 0.85 resolved baseline; same discount idea as interface-dispatch. */
|
|
54
|
+
export declare const PROPERTY_DISPATCH_CONFIDENCE = 0.7;
|
|
55
|
+
export declare function emitPropertyDispatchCalls(graph: KnowledgeGraph, scopes: ScopeResolutionIndexes, parsedFiles: readonly ParsedFile[], nodeLookup: GraphNodeLookup, calleeIdSink?: CalleeIdSink): {
|
|
56
|
+
usesEmitted: number;
|
|
57
|
+
callsEmitted: number;
|
|
58
|
+
skippedKeys: number;
|
|
59
|
+
skippedKeyNames: readonly string[];
|
|
60
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `emitPropertyDispatchCalls` — value-ref registration edges + field-based
|
|
3
|
+
* dispatch for functions registered as object-literal property values
|
|
4
|
+
* (#2437).
|
|
5
|
+
*
|
|
6
|
+
* A provider-hook registration (`{ emitScopeCaptures: emitCppScopeCaptures }`)
|
|
7
|
+
* emits a USES reference edge — a registration is not an invocation (Kythe
|
|
8
|
+
* `ref` vs `ref/call`; Joern `METHOD_REF`). The invocation happens later
|
|
9
|
+
* through the property (`provider.emitScopeCaptures(...)`) — a dispatch the
|
|
10
|
+
* receiver-bound pass cannot resolve because object literals are not
|
|
11
|
+
* IMPLEMENTS-linked implementors. This pass closes that soundness gap the
|
|
12
|
+
* field-based way (Feldthaus et al., ICSE'13; CodeQL `impliedReceiverStep`):
|
|
13
|
+
* key registrations by property name and connect every member-call site
|
|
14
|
+
* `x.<key>(...)` to every function registered under `<key>`.
|
|
15
|
+
*
|
|
16
|
+
* This pass is the SINGLE owner of `value-ref` resolution. The shared
|
|
17
|
+
* registries only consult pre-finalize local bindings — imported names live
|
|
18
|
+
* in finalized bindings (the same reason free calls need
|
|
19
|
+
* `emitFreeCallFallback`) — so `resolveReferenceSites` skips `value-ref`
|
|
20
|
+
* sites and this pass resolves them post-finalize via
|
|
21
|
+
* `findCallableBindingInScope` (Function/Method/Constructor only — the
|
|
22
|
+
* callable gate that keeps `{ port: DEFAULT_PORT }` from emitting anything).
|
|
23
|
+
*
|
|
24
|
+
* Precision posture (mirrors `emitInterfaceDispatchFor`):
|
|
25
|
+
* - reason `'property-dispatch'` keeps synthesized CALLS auditable;
|
|
26
|
+
* - dispatch confidence 0.7 sits below the 0.85 resolved baseline;
|
|
27
|
+
* - a per-key fan-out cap drops promiscuous names (`handler`, `callback`)
|
|
28
|
+
* entirely rather than truncating silently — property-name collisions
|
|
29
|
+
* across unrelated objects are the documented field-based failure mode.
|
|
30
|
+
*
|
|
31
|
+
* Ordering: runs AFTER the precise emit passes. `graph.addRelationship` is
|
|
32
|
+
* first-write-wins on the position-keyed edge id, so a site that already
|
|
33
|
+
* resolved precisely to the same target keeps its precise edge.
|
|
34
|
+
*
|
|
35
|
+
* Language-neutral: consumes only `value-ref` sites (any language that
|
|
36
|
+
* emits the capture participates) and generic member-call sites.
|
|
37
|
+
*/
|
|
38
|
+
import { tryEmitEdge } from '../graph-bridge/edges.js';
|
|
39
|
+
import { findCallableBindingInScope } from '../scope/walkers.js';
|
|
40
|
+
/**
|
|
41
|
+
* Keys registered by more than this many distinct functions are skipped —
|
|
42
|
+
* dispatch through such a name says nothing about which function runs.
|
|
43
|
+
* Calibrated on this repo's own provider tables: `emitScopeCaptures` has 16
|
|
44
|
+
* legitimate registrations (one per language provider), so the cap sits at
|
|
45
|
+
* 2× that — dropping the motivating key was the failure the first value (8)
|
|
46
|
+
* had. ponytail: flat cap; revisit with per-receiver narrowing if real
|
|
47
|
+
* repos show useful keys being dropped (§12 of the #2437 plan).
|
|
48
|
+
*/
|
|
49
|
+
export const MAX_PROPERTY_DISPATCH_FANOUT = 32;
|
|
50
|
+
/** Below the 0.85 resolved baseline; same discount idea as interface-dispatch. */
|
|
51
|
+
export const PROPERTY_DISPATCH_CONFIDENCE = 0.7;
|
|
52
|
+
export function emitPropertyDispatchCalls(graph, scopes, parsedFiles, nodeLookup, calleeIdSink) {
|
|
53
|
+
const seen = new Set();
|
|
54
|
+
let usesEmitted = 0;
|
|
55
|
+
// Sweep 1 — resolve every value-ref site: emit the USES registration edge
|
|
56
|
+
// and index dispatchable registrations by property key.
|
|
57
|
+
const registrations = new Map();
|
|
58
|
+
for (const parsed of parsedFiles) {
|
|
59
|
+
for (const site of parsed.referenceSites) {
|
|
60
|
+
if (site.kind !== 'value-ref')
|
|
61
|
+
continue;
|
|
62
|
+
const def = findCallableBindingInScope(site.inScope, site.name, scopes);
|
|
63
|
+
if (def === undefined)
|
|
64
|
+
continue;
|
|
65
|
+
const ok = tryEmitEdge(graph, scopes, nodeLookup, site, def, 'scope-resolution: value-ref', seen);
|
|
66
|
+
if (ok)
|
|
67
|
+
usesEmitted++;
|
|
68
|
+
if (site.propertyKey === undefined)
|
|
69
|
+
continue;
|
|
70
|
+
let byDef = registrations.get(site.propertyKey);
|
|
71
|
+
if (byDef === undefined) {
|
|
72
|
+
byDef = new Map();
|
|
73
|
+
registrations.set(site.propertyKey, byDef);
|
|
74
|
+
}
|
|
75
|
+
byDef.set(def.nodeId, def);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Keep the dropped key NAMES (bounded) — an over-cap key means no CALLS
|
|
79
|
+
// are synthesized through it, and a count alone leaves the operator unable
|
|
80
|
+
// to tell WHICH hook table lost coverage (#2522 review).
|
|
81
|
+
let skippedKeys = 0;
|
|
82
|
+
const skippedKeyNames = [];
|
|
83
|
+
for (const [key, defs] of registrations) {
|
|
84
|
+
if (defs.size > MAX_PROPERTY_DISPATCH_FANOUT) {
|
|
85
|
+
registrations.delete(key);
|
|
86
|
+
skippedKeys++;
|
|
87
|
+
if (skippedKeyNames.length < 20)
|
|
88
|
+
skippedKeyNames.push(key);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Sweep 2 — synthesize CALLS from member-call sites through registered keys.
|
|
92
|
+
let callsEmitted = 0;
|
|
93
|
+
if (registrations.size > 0) {
|
|
94
|
+
for (const parsed of parsedFiles) {
|
|
95
|
+
const calleeCapture = calleeIdSink !== undefined ? { sink: calleeIdSink, filePath: parsed.filePath } : undefined;
|
|
96
|
+
for (const site of parsed.referenceSites) {
|
|
97
|
+
if (site.kind !== 'call' || site.callForm !== 'member')
|
|
98
|
+
continue;
|
|
99
|
+
const defs = registrations.get(site.name);
|
|
100
|
+
if (defs === undefined)
|
|
101
|
+
continue;
|
|
102
|
+
for (const def of defs.values()) {
|
|
103
|
+
const ok = tryEmitEdge(graph, scopes, nodeLookup, site, def, 'property-dispatch', seen, PROPERTY_DISPATCH_CONFIDENCE, false, calleeCapture);
|
|
104
|
+
if (ok)
|
|
105
|
+
callsEmitted++;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return { usesEmitted, callsEmitted, skippedKeys, skippedKeyNames };
|
|
111
|
+
}
|
|
@@ -58,9 +58,10 @@ import type { ResolutionOutcomeRecorder } from '../resolution-outcome.js';
|
|
|
58
58
|
type ReceiverBoundProviderSubset = Pick<ScopeResolver, 'isSuperReceiver' | 'isSuperReceiverInContext' | 'fieldFallbackOnMethodLookup' | 'collapseMemberCallsByCallerTarget' | 'unwrapCollectionAccessor' | 'hoistTypeBindingsToModule' | 'stripReceiverCastExpressions' | 'resolveQualifiedReceiverMember' | 'resolveReceiverMember' | 'resolveThisViaEnclosingClass' | 'conversionRankFn' | 'conversionOnlyArgTypePrefixes' | 'constraintCompatibility' | 'isStaticOnly'>;
|
|
59
59
|
export declare function emitReceiverBoundCalls(graph: KnowledgeGraph, scopes: ScopeResolutionIndexes, parsedFiles: readonly ParsedFile[], nodeLookup: GraphNodeLookup, handledSites: Set<string>, provider: ReceiverBoundProviderSubset, index: WorkspaceResolutionIndex, model: SemanticModel, options?: {
|
|
60
60
|
readonly recordResolutionOutcome?: ResolutionOutcomeRecorder;
|
|
61
|
-
/** Resolved-callee-id capture sink (#2227 U2). Threaded in
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
/** Resolved-callee-id capture sink (#2227 U2). Threaded in under `--pdg`
|
|
62
|
+
* OR for callable-flow's direct-target index (#2437, position-filtered);
|
|
63
|
+
* `undefined` ⇒ zero overhead, byte-identity (R4). Per-file capture
|
|
64
|
+
* contexts are built from this + `parsed.filePath` in the loop. */
|
|
64
65
|
readonly calleeIdSink?: CalleeIdSink;
|
|
65
66
|
}): number;
|
|
66
67
|
/**
|
|
@@ -29,6 +29,7 @@ import type { ResolutionOutcome } from '../resolution-outcome.js';
|
|
|
29
29
|
import type { FunctionSummary } from '../../taint/summary-model.js';
|
|
30
30
|
import type { CallSummary } from '../../taint/call-summary-model.js';
|
|
31
31
|
import { type PdgEmitManifest } from '../../../lbug/pdg-emit-sink.js';
|
|
32
|
+
import type { ScopeResolver } from '../contract/scope-resolver.js';
|
|
32
33
|
export interface ScopeResolutionOutput {
|
|
33
34
|
/** True when at least one language ran. */
|
|
34
35
|
readonly ran: boolean;
|
|
@@ -68,4 +69,8 @@ export interface ScopeResolutionOutput {
|
|
|
68
69
|
*/
|
|
69
70
|
readonly pdgEmitManifest?: PdgEmitManifest;
|
|
70
71
|
}
|
|
72
|
+
/** Select source files that must be materialized for one resolver pass. */
|
|
73
|
+
export declare function selectScopeSourcePathsToRead(provider: ScopeResolver, primaryFilePaths: readonly string[], preExtractedByPath: {
|
|
74
|
+
readonly has: (filePath: string) => boolean;
|
|
75
|
+
}): string[];
|
|
71
76
|
export declare const scopeResolutionPhase: PipelinePhase<ScopeResolutionOutput>;
|
|
@@ -47,6 +47,17 @@ const NOOP_OUTPUT = Object.freeze({
|
|
|
47
47
|
functionSummaries: [],
|
|
48
48
|
callSummaries: [],
|
|
49
49
|
});
|
|
50
|
+
/** Select source files that must be materialized for one resolver pass. */
|
|
51
|
+
export function selectScopeSourcePathsToRead(provider, primaryFilePaths, preExtractedByPath) {
|
|
52
|
+
const hasPostExtractHooks = provider.populateWorkspaceOwners !== undefined ||
|
|
53
|
+
provider.populateNamespaceSiblings !== undefined ||
|
|
54
|
+
provider.populateRangeBindings !== undefined ||
|
|
55
|
+
provider.emitPostResolutionEdges !== undefined;
|
|
56
|
+
const needsAllSourceText = hasPostExtractHooks && provider.postExtractSourceTextPolicy !== 'uncached-files';
|
|
57
|
+
return needsAllSourceText
|
|
58
|
+
? [...primaryFilePaths]
|
|
59
|
+
: primaryFilePaths.filter((filePath) => !preExtractedByPath.has(filePath));
|
|
60
|
+
}
|
|
50
61
|
export const scopeResolutionPhase = {
|
|
51
62
|
name: 'scopeResolution',
|
|
52
63
|
// Depends on `parse` because emit-references attaches edges to
|
|
@@ -89,11 +100,10 @@ export const scopeResolutionPhase = {
|
|
|
89
100
|
// runs use the in-heap `workerParsedFiles` above or fall back to a fresh
|
|
90
101
|
// extract per file inside runScopeResolution.
|
|
91
102
|
const parsedFileStorePath = ctx.options?.parseCache?.storagePath;
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
// also never runs for skipped providers.
|
|
103
|
+
// Standalone providers are re-extracted from source on the main thread;
|
|
104
|
+
// workers intentionally do not serialize ParsedFile artifacts for them.
|
|
105
|
+
// Drop any stale/cache-sourced entry defensively so provider-owned regex
|
|
106
|
+
// capture logic is always the source of truth for the current content.
|
|
97
107
|
for (const [path] of preExtractedByPath) {
|
|
98
108
|
const lang = getLanguageFromFilename(path);
|
|
99
109
|
if (lang === null)
|
|
@@ -132,16 +142,13 @@ export const scopeResolutionPhase = {
|
|
|
132
142
|
const fileLang = getLanguageFromFilename(f.path);
|
|
133
143
|
if (fileLang === null)
|
|
134
144
|
continue;
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// throw "Unsupported language" (caught, but noisy, and it needlessly
|
|
141
|
-
// loads the grammar on the main thread). `isLanguageAvailable` is
|
|
142
|
-
// memoized, so this stays O(1) per language. (#2091, #2093)
|
|
143
|
-
if (!isLanguageAvailable(fileLang))
|
|
145
|
+
// Tree-sitter providers require an available grammar. Standalone regex
|
|
146
|
+
// providers deliberately have none and re-extract on the main thread.
|
|
147
|
+
const resolver = SCOPE_RESOLVERS.get(fileLang);
|
|
148
|
+
if (resolver?.languageProvider.parseStrategy !== 'standalone' &&
|
|
149
|
+
!isLanguageAvailable(fileLang)) {
|
|
144
150
|
continue;
|
|
151
|
+
}
|
|
145
152
|
let bucket = filesByLang.get(fileLang);
|
|
146
153
|
if (bucket === undefined) {
|
|
147
154
|
bucket = [];
|
|
@@ -220,14 +227,6 @@ export const scopeResolutionPhase = {
|
|
|
220
227
|
let pdgSinkSettled = false;
|
|
221
228
|
try {
|
|
222
229
|
for (const [lang, provider] of SCOPE_RESOLVERS) {
|
|
223
|
-
// Standalone providers (COBOL, JCL) don't emit graph edges yet
|
|
224
|
-
// through the scope-resolution path. This is the canonical guard:
|
|
225
|
-
// runScopeResolution is never called for standalone providers, which
|
|
226
|
-
// keeps cobolPhase as the sole IMPORTS edge producer. Keep this guard
|
|
227
|
-
// in sync with any additional standalone providers added to
|
|
228
|
-
// SCOPE_RESOLVERS.
|
|
229
|
-
if (provider.languageProvider.parseStrategy === 'standalone')
|
|
230
|
-
continue;
|
|
231
230
|
const primaryLangFiles = filesByLang.get(lang) ?? [];
|
|
232
231
|
if (primaryLangFiles.length === 0)
|
|
233
232
|
continue;
|
|
@@ -262,16 +261,6 @@ export const scopeResolutionPhase = {
|
|
|
262
261
|
for (const [fp, pf] of fromDisk)
|
|
263
262
|
preExtractedByPath.set(fp, pf);
|
|
264
263
|
};
|
|
265
|
-
// A provider that feeds source text into a post-extract hook
|
|
266
|
-
// (populateWorkspaceOwners / populateNamespaceSiblings /
|
|
267
|
-
// populateRangeBindings / emitPostResolutionEdges) needs content for ALL
|
|
268
|
-
// its files; one without those hooks only needs content for files the
|
|
269
|
-
// store does NOT cover (fresh-extract fallback). Keep this in sync with
|
|
270
|
-
// the getFileContents() call-sites in run.ts.
|
|
271
|
-
const providerNeedsAllContent = provider.populateWorkspaceOwners !== undefined ||
|
|
272
|
-
provider.populateNamespaceSiblings !== undefined ||
|
|
273
|
-
provider.populateRangeBindings !== undefined ||
|
|
274
|
-
provider.emitPostResolutionEdges !== undefined;
|
|
275
264
|
let scopeFilePaths;
|
|
276
265
|
let contents;
|
|
277
266
|
if (provider.collectScopeContextPaths !== undefined) {
|
|
@@ -294,9 +283,7 @@ export const scopeResolutionPhase = {
|
|
|
294
283
|
else {
|
|
295
284
|
scopeFilePaths = new Set(primaryFilePaths);
|
|
296
285
|
await loadStoreFor(scopeFilePaths);
|
|
297
|
-
const pathsToRead =
|
|
298
|
-
? primaryFilePaths
|
|
299
|
-
: primaryFilePaths.filter((p) => !preExtractedByPath.has(p));
|
|
286
|
+
const pathsToRead = selectScopeSourcePathsToRead(provider, primaryFilePaths, preExtractedByPath);
|
|
300
287
|
contents = await readFileContents(ctx.repoPath, pathsToRead);
|
|
301
288
|
}
|
|
302
289
|
const filePaths = [...scopeFilePaths];
|
|
@@ -308,9 +295,9 @@ export const scopeResolutionPhase = {
|
|
|
308
295
|
}
|
|
309
296
|
else if (preExtractedByPath.has(fp)) {
|
|
310
297
|
// Store covers extraction for this file and we deliberately skipped
|
|
311
|
-
// reading its source;
|
|
312
|
-
//
|
|
313
|
-
//
|
|
298
|
+
// reading its source; extraction uses the pre-extracted ParsedFile,
|
|
299
|
+
// and the provider's source-text policy guarantees its hooks can
|
|
300
|
+
// tolerate empty content for cached files.
|
|
314
301
|
files.push({ path: fp, content: '' });
|
|
315
302
|
}
|
|
316
303
|
// else: uncovered AND unreadable → skip (unchanged from prior behavior).
|
|
@@ -185,6 +185,12 @@ interface RunScopeResolutionStats {
|
|
|
185
185
|
readonly resolve: ResolveStats;
|
|
186
186
|
readonly referenceEdgesEmitted: number;
|
|
187
187
|
readonly referenceSkipped: number;
|
|
188
|
+
/**
|
|
189
|
+
* Property-dispatch keys dropped for exceeding the fan-out cap. Non-zero
|
|
190
|
+
* means member calls through those keys got NO synthesized CALLS — the
|
|
191
|
+
* #2437 false-safe gap for exactly those keys (names are in the warn log).
|
|
192
|
+
*/
|
|
193
|
+
readonly propertyDispatchSkippedKeys: number;
|
|
188
194
|
readonly resolutionOutcomes: readonly ResolutionOutcome[];
|
|
189
195
|
/**
|
|
190
196
|
* Per-function taint summaries harvested in the pdg window (#2084 M4 U1).
|