diff --git a/gitnexus/src/core/run-analyze.ts b/gitnexus/src/core/run-analyze.ts index 4e6dd278f..bec58c4b6 100644 --- a/gitnexus/src/core/run-analyze.ts +++ b/gitnexus/src/core/run-analyze.ts @@ -1556,6 +1556,8 @@ export async function runFullAnalysis( else if (options.shareWith) await setShareOptOut(repoPath, false); return result; } finally { + // Readers opened after analyze must not inherit its smaller write budget. + setBufferPoolSizeHint(undefined); await removeColdParseRebuildDir(parseRun.storagePath, true); discardScopedEmbeddingSpills(); lock.release(); diff --git a/gitnexus/test/integration/objective-c-provider.test.ts b/gitnexus/test/integration/objective-c-provider.test.ts index b060636fb..cde7a3f95 100644 --- a/gitnexus/test/integration/objective-c-provider.test.ts +++ b/gitnexus/test/integration/objective-c-provider.test.ts @@ -7,6 +7,7 @@ import { fileURLToPath } from 'url'; import type { GraphNode, RelationshipType } from 'gitnexus-shared'; import { runPipelineFromRepo } from '../../src/core/ingestion/pipeline.js'; import { runFullAnalysis } from '../../src/core/run-analyze.js'; +import { getEffectiveBufferPoolSize } from '../../src/core/lbug/lbug-config.js'; import { LocalBackend } from '../../src/mcp/local/local-backend.js'; import { classifyObjectiveCFileContent } from '../../src/core/ingestion/languages/objective-c.js'; import type { PipelineResult } from '../../src/types/pipeline.js'; @@ -213,6 +214,7 @@ async function analyzeObjectiveCRepo( options: { force?: boolean } = {}, ): Promise { const logs: string[] = []; + const readerBudget = getEffectiveBufferPoolSize(); await runFullAnalysis( repoRoot, { @@ -226,6 +228,7 @@ async function analyzeObjectiveCRepo( onLog: (message) => logs.push(message), }, ); + expect(getEffectiveBufferPoolSize()).toBe(readerBudget); return logs; } diff --git a/gitnexus/test/unit/symbol-filepath-integrity.test.ts b/gitnexus/test/unit/symbol-filepath-integrity.test.ts index 5e427c0a1..ca75730eb 100644 --- a/gitnexus/test/unit/symbol-filepath-integrity.test.ts +++ b/gitnexus/test/unit/symbol-filepath-integrity.test.ts @@ -38,7 +38,7 @@ describe('source UID/path consistency (#3527)', () => { ['Method:checks/test_batch.py:Batch.test_run#0', undefined], ['Method:checks/test_batch.py:Batch.test_run#0', null], ['Method:checks/test_batch.py:Batch.test_run#0', ''], - ])('preserves valid paths and legacy/synthetic identities: %s', (id, filePath) => { + ])('preserves valid paths and legacy/synthetic identities: %s / %j', (id, filePath) => { expect(() => assertSymbolFilePath(id, filePath)).not.toThrow(); }); });