GitNexus/gitnexus/src/core
Christian C. Berclaz 7be1a5a72d
perf(mro): replace O(n³) C3 merge loop with O(n²) head-pointer algorithm (#1316)
* perf(mro): replace O(n³) C3 merge loop with O(n²) head-pointer algorithm

The C3 linearization merge loop used Array.shift() (O(n) per call) and
Array.indexOf() for tail membership checks (O(n) per scan), producing
O(n³) total complexity across deep single-inheritance chains. A 2000-class
chain took ~43s, exceeding the 15s test timeout.

Replace with:
- Uint32Array head pointers (O(1) advance, no array mutation)
- Pre-computed tail-count Map (O(1) membership check, decremented on
  head advance)

The deep-chain test now completes in ~2s.

Closes #1309

* fix(mro): address review findings for C3 merge optimization

- Add test for C3 merge-conflict inconsistency (non-cyclic): classic
  A(X,Y) + B(Y,X) → C(A,B) incompatible ordering, assert fallback to
  BFS ancestors
- Clarify tailCount decrement comment to state the invariant explicitly
- Move deep-chain performance test to dedicated describe('performance')
  block (was incorrectly nested under 'cyclic inheritance')
2026-05-04 10:49:24 +01:00
..
augmentation feat(group): add group infrastructure and contract matching 2026-04-02 00:39:43 +03:00
embeddings fix(embeddings): bridge HF_ENDPOINT env var to transformers.js env.remoteHost (#1205) (#1252) 2026-05-03 07:37:05 +01:00
graph feat(python): scope-based call resolution + registry-primary flip + perf + generalization (RFC #909 Ring 3) (#980) 2026-04-21 15:50:00 +01:00
group feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
ingestion perf(mro): replace O(n³) C3 merge loop with O(n²) head-pointer algorithm (#1316) 2026-05-04 10:49:24 +01:00
lbug test(ci): isolate native LadybugDB and CLI e2e flakes 2026-04-30 19:45:26 +01:00
platform fix: add platform-aware semantic fallback (#1150) 2026-04-28 12:21:25 +01:00
search fix(search): create FTS indexes during analyze (#1107) 2026-04-27 11:00:32 +01:00
tree-sitter fix(deps): pin tree-sitter-c/cpp to fix Windows segfault (#1242) (#1243) 2026-05-01 08:02:16 +01:00
wiki Merge pull request #626 from ivkond/feat/intra-repo-service-tracking-clean 2026-04-03 17:04:24 +05:30
embedding-mode.ts feat(analyze): preserve existing embeddings by default; --force regenerates them; add --drop-embeddings opt-out (CLI + HTTP API) (#1055) 2026-04-24 13:07:40 +01:00
git-staleness.ts fix(mcp): avoid git from non-repo cwd in sibling cwd match (#1138) (#1293) 2026-05-03 09:17:12 +01:00
run-analyze.ts fix(cli): keep GitNexus ignores inside .gitnexus (#1248) 2026-05-01 16:46:05 +01:00