Dashboard › opencode-lore › scheduleStreamingPostResponse EOF order…
01a0a069-8901-71bc-996b-b8b31a06c7f7Chose 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.