GitNexus/gitnexus/scripts
Neutron 36fefca17e
fix(ingestion): drop member edges to owners the file never emitted (#3767)
* fix(ingestion): drop member edges to owners the file never emitted (#3747)

The parse worker could emit HAS_METHOD/HAS_PROPERTY edges whose owner id
named a node in the same file that was never materialized, so LadybugDB's
COPY rejected them with "Unable to find primary key value" and the retry
silently dropped the edge:

- `const X = z.object({ k: f(cb) }).refine(cb)` is emitted as a Function,
  but its key's owner was spelled `Const:<file>:X`.
- A TS `declare module 'm' {}` parses as a bare `module` node, which the
  shared container map labels `Trait`; no TS capture emits that node.

After each file, the worker now removes member edges whose in-file owner
was not emitted and re-attaches the member to its File with DEFINES
(unless it already has one). Owners in other files are untouched and no
node ids change.

* fix(ingestion): settle the owner-edge guard when a file group throws

processBatch catches a throw from processFileGroup and still returns the
partial result, but the guard only settled the last open file after the
loop completed. A throw after a member edge was appended (e.g. from an
unguarded provider hook) let that file's dangling owner edge escape the
guard and reach COPY.

Per-file tracking now lives in createOwnerEdgeGuard, and processFileGroup
settles it in a finally block around the per-file loop, so the partially
processed file is checked on the error path too.

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-10-31 00:36:19 +00:00
..
bench fix(mcp): bound query previews and advertise repo defaults (#3728) 2026-10-26 08:53:47 +00:00
spikes feat(ingestion): M0 — taint/PDG substrate (schema + seams + spikes) (#2080) (#2092) 2026-06-08 18:56:10 +01:00
arm64-prebuild.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
assert-native-parsers.mjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
assert-publish-fts-coverage.cjs fix(lbug): ship FTS per-platform and recover in-place native aborts (#3274) 2026-09-14 08:52:24 +01:00
assert-publish-grammar-coverage.cjs fix(embeddings): keep ONNX off the install and analyze critical path (#3287) 2026-09-15 12:11:47 +01:00
assert-web-assets.mjs fix(build): build the web UI from prepack, not from every npm ci (#3166) 2026-09-04 13:28:11 +01:00
bench-scope-resolution.ts refactor(ingestion): delete legacy call-resolution DAG + heritage processor (RING4-1, #942) (#2023) 2026-06-04 11:07:37 +01:00
build-tree-sitter-grammars.cjs feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
build-web.js fix(build): build the web UI from prepack, not from every npm ci (#3166) 2026-09-04 13:28:11 +01:00
build.js chore: compile first-party packages with TypeScript 7 (#3311) 2026-09-17 22:16:00 +01:00
cross-platform-tests.ts fix(ingestion): drop member edges to owners the file never emitted (#3767) 2026-10-31 00:36:19 +00:00
ensure-fts.ts fix(lbug): ship FTS per-platform and recover in-place native aborts (#3274) 2026-09-14 08:52:24 +01:00
execution-reporter.ts chore(deps): consolidate open dependabot updates (#3496) 2026-10-06 07:23:35 +00:00
install-duckdb-extension.mjs fix(docker): verify bundled FTS artifacts (#3669) 2026-10-21 17:27:30 +00:00
owner-edge-guard-scaling.ts fix(ingestion): drop member edges to owners the file never emitted (#3767) 2026-10-31 00:36:19 +00:00
prepare-tree-sitter-bundle.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
rebuild-bundled-grammar-prebuilds.cjs fix(install): restore Linux ARM64 npm installation (#3601) 2026-10-16 15:28:35 +01:00
run-benchmarks.ts fix(ci): require every test to execute across the CI matrix (#3479) 2026-10-06 07:34:17 +03:00
run-cross-platform.ts feat(ci): rebalance test shards from recorded timings (#3748) 2026-10-28 11:58:29 +00:00
shard-arg.ts fix(ci): shard platform-sensitive matrix + spawn built CLI to fix Windows cross-platform timeout (#2394) 2026-07-08 09:09:11 +01:00
shard-timings-reporter.ts feat(ci): rebalance test shards from recorded timings (#3748) 2026-10-28 11:58:29 +00:00
shard-timings.ts feat(ci): rebalance test shards from recorded timings (#3748) 2026-10-28 11:58:29 +00:00
smoke-package-managers.mjs fix(cli): recover pnpm and Bun invocation paths (#3721) 2026-10-25 21:05:02 +00:00
sync-plugin-manifests.mjs feat: add Factory AI (Droid) integration (#2543) 2026-09-24 19:12:40 +01:00
test-completeness.ts fix(ci): require every test to execute across the CI matrix (#3479) 2026-10-06 07:34:17 +03:00