diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-08-10 00:07:27 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-08-10 00:07:27 +0900 |
| commit | e4a951d8b953c37b9078a48bce43cac6fd09edac (patch) | |
| tree | aa3e347cf88ce9cc888c9169c81eed7c94853129 /plans | |
| parent | aee93a9e71bb38e0f48fa067b47d1baa9a69e9e3 (diff) | |
fix(http): decouple request processing from log I/O
HTTP observability callbacks previously called RollingFileLog synchronously. RollingFileLog writes to Console.Error before the application file, so a paused console or an undrained redirected stderr pipe could block Kestrel request threads for minutes and cause otherwise valid MCP clients to time out.
Route ready, connection, request-started, request-completed, and HTTP JSONL work through a bounded 4,096-entry Channel. Request callbacks use TryWrite and never wait for console or file I/O. A dedicated single-reader background task preserves log ordering, performs rotation, reports dropped entries after queue pressure, and contains non-fatal sink failures.
Keep the queue bounded so a stalled console cannot cause unbounded memory growth. When capacity is exhausted, request availability takes precedence over observability and the dropped count is emitted as an application warning after the writer resumes.
Add a regression test with a deliberately blocked console writer. The background writer remains blocked while the HTTP completion callback returns within 250 ms. Release build passed with zero warnings and errors; Core tests passed 48/48 with skip 0.
Regenerate the win-x64 self-contained 1.0.0 Bundle and ZIP. ZIP SHA-256: 62E28C903880A51614EC0C3CE23409580F803C7C124764CA7E1CB0EB2CCAA7A9.
Diffstat (limited to 'plans')
0 files changed, 0 insertions, 0 deletions
