GitNexus/gitnexus/test/unit
Abhigyan Patwari 1f7764c49b
fix: register Section in NODE_TABLES and NODE_SCHEMA_QUERIES (#401)
* feat: add markdown file indexing (headings + cross-links)

Parse .md/.mdx files using regex (no tree-sitter dependency) to extract:
- Section nodes from headings (h1-h6) with hierarchy via CONTAINS edges
- Cross-file IMPORTS edges from markdown links to other repo files

Ported from #286 to resolve conflicts with kuzu→lbug rename.

Co-Authored-By: Dennis Palatov <dp-web4@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add Section to NODE_TABLES and NODE_SCHEMA_QUERIES

The Section schema was defined but not registered in NODE_TABLES or
NODE_SCHEMA_QUERIES, so the table was never created in the database.
Also adds missing FROM File TO Section relation entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: update schema test counts for Section node type

NODE_TABLES: 27→28, NODE_SCHEMA_QUERIES: 27→28, SCHEMA_QUERIES: 29→30

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add diagnostic output to skills-e2e idempotency test

Show stdout/stderr in assertion message so CI failures reveal
why the second analyze --skills run exits with code 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add Section COPY query with level column in lbug-adapter

Section table has 8 columns (includes level) but getCopyQuery fell
through to the default 7-column multi-language path. Adds explicit
Section cases to getCopyQuery and insertNodeToLbug/upsertNodeToLbug.

Error was: COPY failed for Section: Number of columns mismatch. Expected 7 but got 8.

---------

Co-authored-by: Dennis Palatov <dp-web4@users.noreply.github.com>
2026-03-21 04:00:16 +05:30
..
ai-context.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
ast-cache.test.ts fix: guard createASTCache against zero maxSize to prevent LRU cache crash 2026-03-02 08:47:20 +00:00
bm25-search.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
call-form.test.ts feat: return type inference, doc-comment parsing, and per-language type extractors (#284) 2026-03-15 18:49:40 +00:00
call-processor.test.ts feat: Phase 7 type resolution — return-aware loop inference & PHP class-property iterables (#341) 2026-03-18 08:39:38 +00:00
call-routing.test.ts feat: ACCESSES edge type with read/write field access tracking (#372) 2026-03-19 03:48:04 +05:30
calltool-dispatch.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
cli-commands.test.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
cli-index-help.test.ts Improve MCP startup compatibility and lazy-load CLI commands (#207) 2026-03-07 07:47:09 +00:00
cohesion-consistency.test.ts FEAT: Added support for optional skill generation based on KuzuDB after initial repo analysis (npx gitnexus analyze --skills) (#171) 2026-03-13 08:29:13 +00:00
community-processor.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
compatible-stdio-transport.test.ts Improve MCP startup compatibility and lazy-load CLI commands (#207) 2026-03-07 07:47:09 +00:00
csv-escaping.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
embedder.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
entry-point-scoring.test.ts fix: consolidate C/C++/C#/Rust language support from 6 overlapping PRs (#237) 2026-03-10 23:03:32 +00:00
eval-formatters.test.ts fix(cli): write tool output to stdout via fd 1 instead of stderr (#324) (#346) 2026-03-18 06:21:32 +00:00
extract-element-type-from-string.test.ts feat: Phase 6 type resolution — for-loop Tier 1c, pattern matching, container descriptors, 10-language coverage (#318) 2026-03-17 17:10:22 +00:00
extract-generic-type-args.test.ts feat: return type inference, doc-comment parsing, and per-language type extractors (#284) 2026-03-15 18:49:40 +00:00
framework-detection.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
git.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
graph.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
has-method.test.ts feat: language-aware code intelligence — symbol resolution, MRO, constructor discrimination (#238) 2026-03-13 13:12:23 +00:00
heritage-processor.test.ts feat: TypeEnvironment API with constructor inference, self/this/super resolution (#274) 2026-03-14 19:05:49 +00:00
hooks.test.ts ci: add macOS to cross-platform test matrix (#208) 2026-03-07 10:38:32 +00:00
hybrid-search.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
ignore-service.test.ts feat(ingestion): respect .gitignore and .gitnexusignore during file discovery (#231) 2026-03-16 13:26:20 +00:00
import-processor.test.ts feat: TypeEnvironment API with constructor inference, self/this/super resolution (#274) 2026-03-14 19:05:49 +00:00
ingestion-utils.test.ts feat(ruby): Add Ruby language support for CLI and web (#111) 2026-03-13 21:46:59 +00:00
language-skip.test.ts feat(ingestion): respect .gitignore and .gitnexusignore during file discovery (#231) 2026-03-16 13:26:20 +00:00
lazy-action.test.ts Improve MCP startup compatibility and lazy-load CLI commands (#207) 2026-03-07 07:47:09 +00:00
method-signature.test.ts test(type-resolution): Phase P integration tests + fixes for all overloading languages 2026-03-19 22:47:24 +00:00
mro-processor.test.ts feat: Phase 8 field/property type resolution (#354) 2026-03-18 18:47:33 +00:00
named-binding-extraction.test.ts feat: language-aware code intelligence — symbol resolution, MRO, constructor discrimination (#238) 2026-03-13 13:12:23 +00:00
parser-loader.test.ts feat(ruby): Add Ruby language support for CLI and web (#111) 2026-03-13 21:46:59 +00:00
pipeline-exports.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
process-processor.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
repo-manager.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
resources.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
schema.test.ts fix: register Section in NODE_TABLES and NODE_SCHEMA_QUERIES (#401) 2026-03-21 04:00:16 +05:30
security.test.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
sequential-language-availability.test.ts feat: TypeEnvironment API with constructor inference, self/this/super resolution (#274) 2026-03-14 19:05:49 +00:00
server.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
setup-codex.test.ts test(cli): cover full Codex setup flow 2026-03-20 15:28:42 +01:00
shared-type-extractors.test.ts feat: ACCESSES edge type with read/write field access tracking (#372) 2026-03-19 03:48:04 +05:30
skill-gen.test.ts FEAT: Added support for optional skill generation based on KuzuDB after initial repo analysis (npx gitnexus analyze --skills) (#171) 2026-03-13 08:29:13 +00:00
staleness.test.ts fix(test): use HEAD~1 instead of root commit in staleness test 2026-03-01 20:23:06 +05:30
structure-processor.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
suffix-index-ambiguity.test.ts fix(resolver): fix for same-directory python imports (#328) 2026-03-17 16:32:34 +00:00
symbol-resolver.test.ts feat: TypeEnvironment API with constructor inference, self/this/super resolution (#274) 2026-03-14 19:05:49 +00:00
symbol-table.test.ts fix(symbol-table): store all overloads in fileIndex instead of last-write-wins 2026-03-19 21:37:21 +00:00
tools.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
tree-sitter-queries.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30
type-env.test.ts fix(type-resolution): review fixes, sizeBefore optimization, and test coverage 2026-03-20 08:45:42 +00:00
utils.test.ts test: add test suite with vitest (unit + integration + fixtures) 2026-03-01 20:07:02 +05:30