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 -26
View File
@@ -2,9 +2,7 @@ import { beforeEach, describe, expect, it } from 'vitest'
import {
clearGitCapabilityStateForTests,
getLocalGitCapabilityCache,
getSshGitCapabilityCache,
LOCAL_GIT_CAPABILITY_HOST_KEY_MAX_BYTES,
LOCAL_GIT_CAPABILITY_HOST_MAX_ENTRIES
getSshGitCapabilityCache
} from './git-capability-state'
describe('Git capability execution-host state', () => {
@@ -36,27 +34,4 @@ describe('Git capability execution-host state', () => {
getSshGitCapabilityCache(replacementProvider)
)
})
it('evicts the oldest local execution host after the host ceiling', () => {
const oldest = getLocalGitCapabilityCache({ wslDistro: 'Distro-0' })
let newest = oldest
for (let index = 1; index <= LOCAL_GIT_CAPABILITY_HOST_MAX_ENTRIES; index++) {
newest = getLocalGitCapabilityCache({ wslDistro: `Distro-${index}` })
}
expect(getLocalGitCapabilityCache({ wslDistro: 'Distro-0' })).not.toBe(oldest)
expect(
getLocalGitCapabilityCache({
wslDistro: `Distro-${LOCAL_GIT_CAPABILITY_HOST_MAX_ENTRIES}`
})
).toBe(newest)
})
it('does not retain oversized execution-host keys', () => {
const oversizedDistro = 'x'.repeat(LOCAL_GIT_CAPABILITY_HOST_KEY_MAX_BYTES + 1)
expect(getLocalGitCapabilityCache({ wslDistro: oversizedDistro })).not.toBe(
getLocalGitCapabilityCache({ wslDistro: oversizedDistro })
)
})
})