Parent
#4
What to build
Found by the #4 review (deferred — low severity at v0.1's agent-CLI workload; ADR 0003 points this work toward the failure-semantics/await issues).
State writes (synchronous SQLite commit, fsync-class) and Event-log appends run directly on the asyncio event loop between scheduler wakeups. While the loop blocks in a commit, the loop-resident pipe readers from communicate() cannot drain, so several simultaneously-chatty subprocesses whose output exceeds the OS pipe buffer (~64KB) block on write and the parallelism the scheduler exists to provide degrades toward serial. Make state/event persistence not stall in-flight pipe draining — e.g. batch commits per wakeup, or offload the blocking writes off the loop.
Acceptance criteria
Blocked by
Parent
#4
What to build
Found by the #4 review (deferred — low severity at v0.1's agent-CLI workload; ADR 0003 points this work toward the failure-semantics/await issues).
State writes (synchronous SQLite commit, fsync-class) and Event-log appends run directly on the asyncio event loop between scheduler wakeups. While the loop blocks in a commit, the loop-resident pipe readers from
communicate()cannot drain, so several simultaneously-chatty subprocesses whose output exceeds the OS pipe buffer (~64KB) block on write and the parallelism the scheduler exists to provide degrades toward serial. Make state/event persistence not stall in-flight pipe draining — e.g. batch commits per wakeup, or offload the blocking writes off the loop.Acceptance criteria
Blocked by