This repository was archived by the owner on Aug 15, 2026. It is now read-only.
The fix
Forking a huge session (60万+ events) crashed or OOM'd because encodeMaterialization → eventLines = map(JSON.stringify).join() builds a single ~501MB string; 74万 events throws RangeError: Invalid string length (V8 ~512MB cap).
v0.3.0 patches JsonlSessionPersistence.encodeMaterialization (rc.6 signature-guarded) to emit one zstd frame per 50k events. Multi-frame output is natively decoded by dsh's scanZstdFrames, byte-compatible.
| heap peak | 74万 events | |
|---|---|---|
| before | 1572MB | RangeError |
| after | 1155MB | safe |
Why 'single session fine, fork breaks'
- normal sessions persist incrementally (
appendLines, small batches) - fork children persist via
materialize(full seed) — the only path that serializes the whole log at once
Install
dsh plugin --profile web add github:orangeofcarl0-sys/dsh-projection-warmup