szn

Bug 93 — Partial write() on Unix socket not retried

93. Partial write() on Unix socket not retried

File: src/client/client.zig:8–14 Severity: LOW Status: ✅ FIXED — fdWrite now retries in a loop until all bytes are written or an error occurs.

fn fdWrite(fd: i32, buf: []const u8) Error!usize {
    const n = std.c.write(fd, buf.ptr, buf.len);
    ...
// call site:
const n = try fdWrite(self.fd, serialized);
if (n != serialized.len) return error.WriteFailed;  // no retry

write() on a socket can perform partial writes. The code detects truncation but does not retry, leaving a partially-sent packet on the wire. Unlikely on local Unix sockets with small buffers.