mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-29 23:37:41 +00:00
Reduce lexical lookup allocations and stream persisted node identities during incremental verification. Preserve lookup snapshots, connection ownership, cursor cleanup, and both fail-closed publication checks. Include fresh and persistent benchmark coverage, differential comparisons, and memory scaling reproduction. Validation: 4,019 local tests, 72,000 differential comparisons, build and typechecks, and all 12 required CI checks passed.
16 lines
861 B
TypeScript
16 lines
861 B
TypeScript
import { describe, expectTypeOf, it } from 'vitest';
|
|
import type { forEachQueryRow } from '../../src/core/lbug/lbug-adapter.js';
|
|
import type { reconcileGraphNodeIdentities } from '../../src/core/incremental/write-reconciliation.js';
|
|
|
|
type CursorVisitor = Parameters<typeof forEachQueryRow>[1];
|
|
type IdentityReader = Parameters<typeof reconcileGraphNodeIdentities>[1];
|
|
type IdentityVisitor = Parameters<IdentityReader>[1];
|
|
|
|
describe('identity reader synchronous visitor contract', () => {
|
|
it('accepts synchronous visitors and rejects async visitors at both boundaries', () => {
|
|
expectTypeOf<() => undefined>().toExtend<CursorVisitor>();
|
|
expectTypeOf<() => undefined>().toExtend<IdentityVisitor>();
|
|
expectTypeOf<() => Promise<void>>().not.toExtend<CursorVisitor>();
|
|
expectTypeOf<() => Promise<void>>().not.toExtend<IdentityVisitor>();
|
|
});
|
|
});
|