test(omp): retain sparse-array regression without array constructor

Credential-reference policy follows stablyai/orca#9554 by @red-projects.

Co-authored-by: Konstantin Klinchuk <klinchuk@gmail.com>
This commit is contained in:
Neil
2026-09-19 03:27:25 -07:00
co-authored by Konstantin Klinchuk
parent 52d7af4dbd
commit a1e4235475
@@ -65,8 +65,14 @@ describe('generated status input redaction', () => {
})
it('bounds sparse array serialization and cumulative reserved slots', async () => {
expect(await postedInput({ values: new Array(5000) })).toEqual({ redacted: true })
const values = Array.from({ length: 8 }, () => new Array(1000))
const sparse: unknown[] = []
sparse.length = 5000
expect(await postedInput({ values: sparse })).toEqual({ redacted: true })
const values = Array.from({ length: 8 }, () => {
const slots: unknown[] = []
slots.length = 1000
return slots
})
expect(await postedInput({ values })).toEqual({ redacted: true })
})