GitNexus/gitnexus/test
abhigyanpatwari 48a62cf5ea test(incremental): exact-equality stats invariant + analyze ≡ analyze --force
Addresses the only remaining Claude production-readiness review finding
on PR #1479 (Low-Medium, test-quality only — Claude itself said it does
NOT block merge, but the central PR claim "incremental ≡ full rebuild"
deserves explicit CI coverage rather than implicit trust).

Changes to gitnexus/test/unit/incremental-orchestration.test.ts:

1) Tighten the existing "comment-only edit takes incremental path" test.
   - Replace toBeGreaterThan(0) bounds assertions on stats.files and
     stats.nodes with exact toBe(firstMeta) per-field equality across
     files / nodes / edges / communities / processes. DoD §2.7 calls
     out bounds-only assertions as masking regressions that drop half
     the graph; this swap closes that gap.
   - Rationale: a comment-only edit must change the file content hash
     (driving the incremental path) without changing any graph data.
     Therefore every stat MUST be identical to the first run. Anything
     else is a regression.

2) New test: incremental output is byte-equivalent to a full rebuild.
   - Run analyze → comment-only edit → analyze (incremental writeback)
     → analyze --force (full rebuild from same on-disk state).
   - Assert files / nodes / edges / communities / processes are exactly
     equal across the incremental and the --force passes.
   - This is the PR's central correctness contract, now proven by a
     test that exercises the real runtime path end-to-end against a
     real on-disk LadybugDB.

All 5 orchestration tests pass locally (52s), including the new
equivalence test — every stat field matches exactly between incremental
and --force on the mini-repo fixture.

tsc --noEmit clean.
2026-05-11 17:40:50 +05:30
..
fixtures feat: migrate C to scope-based resolution (RFC #909 Ring 3) (#1481) 2026-05-11 09:02:00 +01:00
helpers fix(windows): 32767-char tree-sitter crash + VECTOR extension SIGSEGV (#1433) 2026-05-10 16:00:36 +01:00
integration feat: migrate C to scope-based resolution (RFC #909 Ring 3) (#1481) 2026-05-11 09:02:00 +01:00
unit test(incremental): exact-equality stats invariant + analyze ≡ analyze --force 2026-05-11 17:40:50 +05:30
utils ci: add macOS to cross-platform test matrix (#208) 2026-03-07 10:38:32 +00:00