Repository navigation
Description
Parent: oxstack/oxa#43, owner O-383. Milestone v0.2.2, label after-0.2.1. No implementation or merge in v0.2.1. This is a self-contained task for an assigned DeepSeek-on-Go helper; first read AGENTS.md and recheck current main. Verification below is source-only at 69a81515ad3ce39dbf048112fd0cfad476f4b73f: no build, benchmark, provider call or hardware run was performed. Claimed gains remain hypotheses unless a separate immutable measurement receipt is supplied.
Verified on main
engine/crates/server/src/echo.rs:463 append_line still calls sync_data. record_deferred releases the EchoStore mutex before PendingAppend::write, but engine/crates/server/src/service.rs:486 echo_record calls p.write synchronously in the same function. The streaming completion path calls echo_record before final frames at2348–2365. This is not already asynchronous merely because the method says deferred. Existing #11 and unfinished oxstack/ox-llm#614 remain the canonical context; do not create a competing implementation. The5–20ms gain is unmeasured.
Bounded spec and ownership
Review/reuse oxstack/ox-llm#614’s actual state, then propose a bounded write-offload design that preserves in-memory splice visibility, per-session ordering, clear/wipe/eviction epochs, shutdown behavior and explicit crash-loss semantics. No unbounded queue, per-token thread, new daemon or weakened privacy cleanup. Engine/durability owner must release implementation before engine behavior changes; this issue alone is not that release.
Acceptance
A synthetic injected blocked fsync must not block final SSE/JSON delivery once an approved offload exists, while actual durable writes complete under the documented shutdown contract. Tests cover clear/evict while pending, restart, failure, cancellation and no resurrection after wipe, retaining existing tests_echo and state_store assertions. Measure last-token-to-Done/body latency and next-turn splice latency, queue bound, RSS and threads with controlled disk delay. No timing-limit weakening or filesystem bypass to get a green result.
Execution boundary: keep the patch small and consumed by existing callers; no new daemon/framework, credentials, real provider/sign-in calls, security/test weakening or force-push. Tests/builds run in GitHub CI with synthetic loopback fixtures and isolated HOME/XDG, CARGO_BUILD_JOBS=3. No local builds/tests. Preserve required checks; draft until own checks pass. Hardware work requires the owner’s explicit handoff. Do not merge. Report exact source, test result, before/after measurement and limitations.
Activity
n0rpan commentedon Nov 19, 2026
Triage 2026-11-19: this issue is now tracked in #28 (Cluster: Engine performance and hardware, priority P2), planned PR 1: "Hot path". It will be fixed there together with its related issues, not one by one.