GitNexus/gitnexus/src
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
..
cli feat(opencode): ship hooks as auto-loaded global plugin for full support (#3619) 2026-10-28 13:45:08 +00:00
config fix(config): honor nested .gitignore files during repository walks (#3440) 2026-10-03 09:55:47 +00:00
core fix(ingestion): drop member edges to owners the file never emitted (#3767) 2026-10-31 00:36:19 +00:00
lib fix(mcp): stop scaling the detect_changes query with the diff's hunk count (#2915) (#2930) 2026-08-12 14:51:17 +01:00
mcp fix(lbug): guard read queries against runaway native memory (#3696) (#3749) 2026-10-28 14:08:17 +00:00
server fix(embeddings): reuse completed vectors after interrupted analyze (#3463) 2026-10-04 09:26:02 +01:00
storage fix(storage): preserve fresh registry entries (#3777) 2026-10-30 20:47:29 +00:00
types fix(resolution): label fallback guesses and preserve export visibility (#3190) 2026-09-10 11:38:19 +01:00
utils perf(lock): probe this process's own start time once (#3222) 2026-09-08 19:06:03 +01:00