Revert "fix(memory): bound OOM-prone accumulators (#10179)" (#10255)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-07-23 18:35:31 -07:00
committed by GitHub
co-authored by Orca
parent 6eb70d8370
commit aab112933e
1577 changed files with 15167 additions and 91655 deletions
@@ -1,7 +1,6 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
import {
buildPullRequestFieldsPrompt,
GENERATED_PULL_REQUEST_JSON_STRUCTURE_LIMITS,
parseGeneratedPullRequestFields,
type PullRequestDraftContext
} from './pull-request-generation'
@@ -94,17 +93,4 @@ describe('parseGeneratedPullRequestFields', () => {
draft: false
})
})
it('rejects excessive nesting before JSON.parse', () => {
const parseSpy = vi.spyOn(JSON, 'parse')
const depth = GENERATED_PULL_REQUEST_JSON_STRUCTURE_LIMITS.nestingDepth + 1
try {
expect(() =>
parseGeneratedPullRequestFields(`${'['.repeat(depth)}0${']'.repeat(depth)}`, context)
).toThrow(/JSON nesting exceeds/)
expect(parseSpy).not.toHaveBeenCalled()
} finally {
parseSpy.mockRestore()
}
})
})