Dashboardopencode-lorepipeline.ts large-spread RangeError

pipeline.ts large-spread RangeError

Category: gotcha
Confidence: 1.00
ID: 01a0a267-dbd8-741f-8f6e-abb0a91a5456
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0yjugA0mK4GfBAsLB
Created: 2026-09-14 08:01:01
Updated: 2026-09-15 00:11:50

Content

Trap: target.push(...source), Math.max(...map.keys()), and similar spreads look concise after size validation, but JavaScript’s engine-specific argument limit can throw RangeError well below permitted stream cardinality. Fix: append iteratively and compute bounded maxima in a loop, because valid many-item streams must still reach rollback, sanitization, accounting, and the fixed failure envelope.

Move to: