Repository navigation
Conversation
|
Thanks @kotevcode. The use case is a good one, and the default path is untouched:
|
…nt and the TCP flags, and names its socket
91e0593 to
c50fe93
Compare
…ilds on Linux and Windows
|
Thanks @ashhart. Rebased on main; all seven points are in
Second-user test, with the CPU fake server (
Checks on |
What this changes
Adds
tensorfold serve --unix-socket PATH. Instead of a TCP port, the server listens on a new Unix stream socket, mode 0600, and removes it on shutdown. An existing PATH is refused, not replaced. Without the flag, TCP behaves as before.Why: a local app that embeds the engine can reach it without its requests crossing a network interface, where anyone with capture rights on the machine can read loopback traffic. The caller I have in mind is the Antseed Mac app, a menubar worker that bundles TensorFold and serves end-to-end encrypted requests. It decrypts each request and hands it to the engine, and it can't currently do that without the plaintext crossing loopback. Its integration with this flag isn't written yet; it would also check the peer's PID on each connection, so nothing else can stand in at the path.
atc overlap --json: run 2026-11-06T19:09Z on base c3f64ca.complete: false(otherPullRequestsLimit,pullFilesUnavailable,timeLimit), so coverage is partial. 8 pull requests report a textual conflict: metal nemotron: TF_KV_SHARE keeps prompt states as core pool pages (stacked on #1837) #1850, CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008, kept states: saved prompt states bind the running binary and the checkpoint's current stamps #2163, ricursive: the publisher's DFlash2 drafter for Ripple-65B (stacked on #2231) #2260, ricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases) #2231, Unlimited-OCR-2 on native Metal: the publisher's BF16 release, page images to structured text #2074, qwen CUDA: a faster opt-in paged path (TF_QWEN_KV_PAGES=256), --parallel a cap with pages set #2011 and contract: an XPU device runner (gates 1 to 4 on a B70, gate 5 live, planted controls) #2269. In all 8 the only shared file isCHANGELOG.md. 2 are clean; the rest reportunknown. I sampled 8 of those: /v1/models: each model lists what it supports, from the same facts the refusals read #2157, metrics: an opt-in histogram of how long a request queued #2158, Living Weights: drift and recall measured per lesson, with an opt-in gate (#1389) #2028, Implement GLP control vectors with a fused Metal kernel for Qwen3.8-27B #1835, Native Vulkan backend for Qwen3.5-2B (opt-in): engine and kernel-contract registration (stacked on #1526) #1544 and Metal: serve the dense Qwen3.8-27B straight from a GGUF file (Q4_K_M, Q8_0) (#1920) #2078 also touchcli.zig,serve.zigormain.zig, and I did not resolve those.Checks on this head
python3 tools/zig/lean_check.py, on the base and on this head: 210 on the base, 210 on this head, 0 new (lean_new.py). All 210 are inherited.zig build test test-golden test-server-security -Dcpu=apple_m1 --summary all: 2555 of 2575 tests passed, 20 skipped, 0 failed. Those counts leave out steps cached from earlier runs. 650 of 724 steps succeeded and 36 failed. No compile error appears outside the.metalkernels; see "Not run".test-goldenandtest-server-securitypassed.a Unix socket listener is owner-only, accepts, refuses an existing path and removes its path. It could not compile before the change. Withchmodplanted to0o644it fails withexpected 384, found 420.fake_serve serve zig/tests/server/fixtures --unix-socket PATH, driven withcurl --unix-socket:/v1/modelsand/v1/chat/completionsanswered, the socket wassrw-------, the process held no TCP sockets, a second server on the same path exited withBindFailed, and the path was gone after SIGTERM.zig fmt --check build.zig zigandgit diff --checkpass.zig build test-golden -Dfixed-cpuwith-Dtarget=x86_64-linux-gnuand-Dtarget=x86_64-windows-gnushowed no compile errors in a filtered log. This is a compile check only; nothing ran on those targets.uint4b_formatinzig/kernels/metal/nemotron/. That accounts for the 36 failed steps above, and I did not run them on another toolchain.zig build dev-tools, since no API the tools call changed.error.Unsupportedthere and that path is not exercised.Receipt
n/a: this cannot reach inference. It changes how connections are accepted, and only when the flag is set. With the flag unset, the only additions on the TCP path are two null checks. No request handling, engine or kernel code changes, so there are no speed or exactness numbers.
Checklist
The inference checklist is skipped because the Receipt is n/a.