You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🤖 perf: session tape read side follow-ups for T3 (from #5568) #5587
Tracking the limitations of the session tape read side (T2, #5568), for the perf tape program. Tapes hold full chat content; every fixture and repro here must be synthetic.
Owner: T3 (perf E2E tape replay). Trigger: when T3 starts.
T2 ships only the offline read side: the loader, the offline replay driver, bun scripts/perf/tapeInfo.ts and the synthetic tape builder. Delivering a tape to the app renderer, with network isolation, is T3's main scope and is not tracked here.
Current limitations of the offline read side
Bounded-reader size check.readSessionTapeFile reads the whole file before validating it. Stat the path first, and refuse non-regular files and files above the recorder's tape cap (32 MiB) before reading.
Validation time. Loading is synchronous. A 24.1 MiB synthetic tape with 60,007 events took 0.6 to 0.9 s (Bun 1.3.12). That is a measurement for one fixture shape, not a worst-case bound. Recheck it once T3 plays tapes inside the app, where a long synchronous load blocks the main process.
Offsets above the timer limit. A recorded t above about 24.9 days (2^31-1 ms) is clamped by setTimeout, so later events would burst. Wait in bounded chunks against the absolute deadline, or reject such offsets in the loader.
Space-padded workspace ids. The recorder hashes the raw workspaceId for the header's workspaceIdHash. A tape recorded through a space-padded id therefore carries a hash that a trimmed-id check will not match. Trim the id in the recorder (sessionTapeRecorder.ts) before hashing, like WorkspaceService does.
Pathologically deep JSON. An event nested deeply enough for JSON.stringify to overflow the stack throws RangeError out of loadSessionTape instead of rejecting the tape. Convert non-TapeRejection errors during canonicalization and decoding into a rejection (Codex, 🤖 perf: session tape loader, offline replay driver and tapeInfo CLI (T2) #5568 round 6).
Features for T3's app integration
Resumable replay. Only a fresh full replay is planned. Re-entering a replayed workspace (a since resubscription) needs an explicit design, or a documented refusal.
Fast pacing through the app. The driver supports pacing: "fast". Decide whether T3's harness exposes it (for example make perf-tape TAPE=<file> PACING=fast).
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $43.69
Tracking the limitations of the session tape read side (T2, #5568), for the perf tape program. Tapes hold full chat content; every fixture and repro here must be synthetic.
Owner: T3 (perf E2E tape replay). Trigger: when T3 starts.
T2 ships only the offline read side: the loader, the offline replay driver,
bun scripts/perf/tapeInfo.tsand the synthetic tape builder. Delivering a tape to the app renderer, with network isolation, is T3's main scope and is not tracked here.Current limitations of the offline read side
Bounded-reader size check.
readSessionTapeFilereads the whole file before validating it. Stat the path first, and refuse non-regular files and files above the recorder's tape cap (32 MiB) before reading.Validation time. Loading is synchronous. A 24.1 MiB synthetic tape with 60,007 events took 0.6 to 0.9 s (Bun 1.3.12). That is a measurement for one fixture shape, not a worst-case bound. Recheck it once T3 plays tapes inside the app, where a long synchronous load blocks the main process.
Offsets above the timer limit. A recorded
tabove about 24.9 days (2^31-1 ms) is clamped bysetTimeout, so later events would burst. Wait in bounded chunks against the absolute deadline, or reject such offsets in the loader.Space-padded workspace ids. The recorder hashes the raw
workspaceIdfor the header'sworkspaceIdHash. A tape recorded through a space-padded id therefore carries a hash that a trimmed-id check will not match. Trim the id in the recorder (sessionTapeRecorder.ts) before hashing, likeWorkspaceServicedoes.Malformed UTF-8.
readSessionTapeFiledecodes with replacement characters, so a corrupted byte is not reported. Read bytes and decode with a fatalTextDecoderbefore loading (Codex, 🤖 perf: session tape loader, offline replay driver and tapeInfo CLI (T2) #5568 round 6).Pathologically deep JSON. An event nested deeply enough for
JSON.stringifyto overflow the stack throwsRangeErrorout ofloadSessionTapeinstead of rejecting the tape. Convert non-TapeRejectionerrors during canonicalization and decoding into a rejection (Codex, 🤖 perf: session tape loader, offline replay driver and tapeInfo CLI (T2) #5568 round 6).Features for T3's app integration
sinceresubscription) needs an explicit design, or a documented refusal.pacing: "fast". Decide whether T3's harness exposes it (for examplemake perf-tape TAPE=<file> PACING=fast).Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$43.69