diff --git a/gitnexus/src/storage/repo-manager.ts b/gitnexus/src/storage/repo-manager.ts index 568d288bdd..e34432a7ac 100644 --- a/gitnexus/src/storage/repo-manager.ts +++ b/gitnexus/src/storage/repo-manager.ts @@ -429,8 +429,16 @@ export interface RepoMeta { * `E.hook` to `E$1.hook`, and nested-host anonymous names re-key * (`EnumWrap$1` → `EnumWrap$Mode$1`). Same contract as v8: identities move * on unchanged files; force a full re-analyze. + * v10: Java `record_declaration` now emits a first-class `Record` graph node + * (#2564): a record's container node was previously never created (JAVA_QUERIES + * had no capture for it), so its methods existed as ownerless Method nodes + * with no `HAS_METHOD` edge. The incremental write set only covers changed + * files — a top-up against a pre-v10 index would keep silently omitting the + * `Record` node and its `HAS_METHOD` edges for every unchanged record file + * (same v7 contract: new nodes/edges the incremental path would otherwise + * never backfill); force a full re-analyze instead. */ -export const INCREMENTAL_SCHEMA_VERSION = 9; +export const INCREMENTAL_SCHEMA_VERSION = 10; export interface IndexedRepo { repoPath: string; diff --git a/gitnexus/test/unit/call-summary-schema-version.test.ts b/gitnexus/test/unit/call-summary-schema-version.test.ts index 8e7e3b5cee..a8240fa0f2 100644 --- a/gitnexus/test/unit/call-summary-schema-version.test.ts +++ b/gitnexus/test/unit/call-summary-schema-version.test.ts @@ -73,8 +73,8 @@ describe('CALL_SUMMARY relation-type exclusion (U-C1)', () => { }); describe('CALL_SUMMARY incremental reuse gate (U-C5)', () => { - it('INCREMENTAL_SCHEMA_VERSION is bumped to 9 (Java enum-constant-body + JLS-naming re-index window)', () => { - expect(INCREMENTAL_SCHEMA_VERSION).toBe(9); + it('INCREMENTAL_SCHEMA_VERSION is bumped to 10 (Java record container-node re-index window)', () => { + expect(INCREMENTAL_SCHEMA_VERSION).toBe(10); }); it('a pre-current stamp fails the `=== INCREMENTAL_SCHEMA_VERSION` reuse gate → forces full re-analyze', () => { @@ -108,7 +108,11 @@ describe('CALL_SUMMARY incremental reuse gate (U-C5)', () => { // topmost-anchored `EnumWrap$1`-style ids would be stranded alongside // the re-keyed ones on unchanged files → must NOT reuse. expect(passesReuseGate(8)).toBe(false); + // A pre-v10 (v9) index predates the Java record container-node fix + // (#2564) — a record's methods would keep being ownerless Method nodes + // with no HAS_METHOD edge on unchanged files → must NOT reuse. + expect(passesReuseGate(9)).toBe(false); // A current-version stamp passes the gate (incremental top-up eligible). - expect(passesReuseGate(9)).toBe(true); + expect(passesReuseGate(10)).toBe(true); }); });