Dashboardopencode-lorescheduleStreamingPostResponse EOF order…

scheduleStreamingPostResponse EOF ordering

Category: architecture
Confidence: 1.00
ID: 01a0a069-8901-71bc-996b-b8b31a06c7f7
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0pgmoX2HO0P7hh2bA
Created: 2026-09-14 14:54:26
Updated: 2026-09-14 14:54:26

Content

Chose deferring streaming post-response accounting with setImmediate() over completing SQLite accounting before EOF because the reader and Node bridge must observe terminal delivery without database latency. The accepted tradeoff is that a process crash during that one-event-loop-turn window may lose final accounting; bounded global/per-session queues, ordered session chains, safe onDrop(), and admission counters prevent deferred work from wedging requests.

Move to: