mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-17 23:52:36 +00:00
* fix(ingestion): stop emitting phantom Function defs for array-method callbacks The HOC-wrapped-arrow scope-query pattern (`const X = HOC(args => ...)`), added for React idioms such as forwardRef/memo/useCallback, also matched array higher-order-method callbacks like `const x = arr.map(a => ...)`. Those produced a spurious `@declaration.function` named after the binding, on top of its value def, so calls inside the callback attributed to a phantom `Function:x` instead of the enclosing scope. - Add a shared `isArrayMethodCallbackArrow` detector (`ARRAY_CALLBACK_METHODS` blocklist) and suppress the `@declaration.function` emit-side in both the JS and TS scope-captures emitters, leaving the value binding as the sole def. - Add `selectNodeBearingDef` in scope-extractor: the tested collapse-rule contract (function-like > value > first) the deferred node-creation migration will consume to keep one graph node per binding. This corrects the registry-primary scope model and CALLS-edge attribution (calls inside array-method callbacks now source from the enclosing File scope). The duplicate graph *node* itself is still created by the legacy parse-worker path and is removed by the follow-up node-creation migration. Refs #1876 Co-authored-by: Cursor <cursoragent@cursor.com> * test(ingestion): strengthen array-callback coverage; document receiver-blind suppression Follow-ups from the production-readiness review of PR #1906: - array-callback.ts: document that isArrayMethodCallbackArrow is receiver-blind — an in-set method name on a NON-array receiver (Map/Set.forEach, RxJS observable.map, query-builder .sort, lodash chain .filter) is also suppressed. Accepted limitation, not a bug: the binding holds the call's result value, not a callable. - captures unit tests (JS + TS): add a non-array-receiver characterization case, and extend the it.each lists to cover findLast, findLastIndex, reduceRight — the full 13-entry ARRAY_CALLBACK_METHODS set is now exercised in both languages. - js-array-method-callback-attribution integration test: tighten the File-sourced CALLS assertions from toBeGreaterThan(0) to toHaveLength(1) (now also catches over-attribution). - scope-extractor.ts: note that the dead selectNodeBearingDef export is intentional and tracked by #1876 (deferred node-creation migration). Comment-and-test only; no production behavior change. Verified locally: tsc clean, prettier/eslint clean, captures unit 106 passed, scope-extractor 31 passed, integration 3 passed. Refs #1876 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| group | ||
| mcp | ||
| resolvers | ||
| analyze-heap-oom-e2e.test.ts | ||
| analyze-wal-checkpoint-failure.test.ts | ||
| antigravity-hook-e2e.test.ts | ||
| api-impact-e2e.test.ts | ||
| api-query.test.ts | ||
| ast-helpers-object-literal-binding.test.ts | ||
| augmentation.test.ts | ||
| class-impact-all-languages.test.ts | ||
| cli-e2e.test.ts | ||
| cobol-pipeline-benchmark.test.ts | ||
| context-typed-property.test.ts | ||
| cross-file-binding.test.ts | ||
| csv-pipeline.test.ts | ||
| enrichment.test.ts | ||
| expo-routes.test.ts | ||
| fastapi-prefix-pipeline.test.ts | ||
| filesystem-walker.test.ts | ||
| has-method.test.ts | ||
| heritage-extractor-wiring.test.ts | ||
| hooks-e2e.test.ts | ||
| ignore-and-skip-e2e.test.ts | ||
| java-class-impact.test.ts | ||
| js-array-method-callback-attribution.test.ts | ||
| lbug-close-handle-release.test.ts | ||
| lbug-core-adapter.test.ts | ||
| lbug-lock-retry.test.ts | ||
| lbug-non-ascii-path.test.ts | ||
| lbug-open-retry.test.ts | ||
| lbug-orphan-sidecar-recovery.test.ts | ||
| lbug-pool-stability.test.ts | ||
| lbug-pool.test.ts | ||
| lbug-readonly-init.test.ts | ||
| lbug-vector-extension.test.ts | ||
| local-backend-calltool.test.ts | ||
| local-backend.test.ts | ||
| markdown-processor-crlf.test.ts | ||
| object-literal-owner-resolution.test.ts | ||
| orm-dataflow.test.ts | ||
| parse-impl-large-fixture.test.ts | ||
| parse-impl-quarantine-cache-skip.test.ts | ||
| parsing.test.ts | ||
| php-pipeline-benchmark.test.ts | ||
| pipeline-graph-golden.test.ts | ||
| pipeline.test.ts | ||
| qualified-class-lookups.test.ts | ||
| query-compilation.test.ts | ||
| ruby-pipeline-benchmark.test.ts | ||
| rust-pipeline-benchmark.test.ts | ||
| search-core.test.ts | ||
| search-pool.test.ts | ||
| server-analyze.test.ts | ||
| server-http-startup.test.ts | ||
| setup-antigravity.test.ts | ||
| setup-skills.test.ts | ||
| shape-check-regression.test.ts | ||
| skills-e2e.test.ts | ||
| staleness-and-stability.test.ts | ||
| tree-sitter-languages.test.ts | ||
| worker-pool.test.ts | ||