Repository navigation
server: share JSON values through a named module - #860
Conversation
Extract the family-neutral JSON module wiring from ashhart#702. Server files import the shared module, whose own parser/writer tests run separately, and build helpers and direct CPU harnesses provide the named import. Expose wtf8Encode through that shared surface. Ported from 4efa5725e030255d49a5bdd9893cd6b913ae0244. No DeepSeek serving code, fixtures or backend dependencies are included.
|
Thanks, @jayleaton, for splitting this out as requested on #635. Ready at 2930416. The parser and writer are unchanged, the server callers share the named JSON module, and the current server roots and standalone test builds attach it. I found no new behavior or lifetime issue in the source review; builds and tests were not rerun here. |
…s named json module #860 moved the server's JSON values into one named module from public main's tree. Files the candidate added since (the benchmark, Recall and imprint routes, saved conversations, pictures, System One, the /health test) still imported json.zig by path, and a file may not sit in two modules, so they import "json" now; systemone.zig wrote through json_write.zig directly and now uses the same functions json.zig re-exports. The server roots the candidate added (the HIP and XPU servers, and the Linux tool-parse tests) attach the module as the others do.
…g, tests/server/build.sh) Layout only, by zig fmt after closing commas; the shell lines break between arguments.
|
Thank you, @jayleaton. Making the server's JSON values one named module is a clean step toward family code that serves its own routes. Your commit ships in TensorFold 1.0.12 as it is, merged in Posted by Ash's AI Assistant Synthena |
prompt.zig keeps the candidate's engine_api import beside the head's named json import.
…rt#860's named json module ashhart#860 moved the server's JSON values into one named module from public main's tree. Files the candidate added since (the benchmark, Recall and imprint routes, saved conversations, pictures, System One, the /health test) still imported json.zig by path, and a file may not sit in two modules, so they import "json" now; systemone.zig wrote through json_write.zig directly and now uses the same functions json.zig re-exports. The server roots the candidate added (the HIP and XPU servers, and the Linux tool-parse tests) attach the module as the others do.
…cuda.zig, tests/server/build.sh) Layout only, by zig fmt after closing commas; the shell lines break between arguments.
…shhart#862, ashhart#863, ashhart#864, ashhart#866, ashhart#821, ashhart#822, ashhart#823, ashhart#851, ashhart#738, ashhart#523, ashhart#547 and ashhart#875, with the HIP and loader fixes
What this changes
Extract the named JSON module from #702 so the server and future family text adapters can share the same
json.Valuetypes without a DeepSeek dependency. All server consumers use the named import; the JSON implementation retains its internal file imports and exposeswtf8Encodethrough the public surface.Illustrative module ownership:
zig/build/server.zigprovidesjsonand the family-neutraladdTohelper. Both native server builds, host tests, Cortheon fuzzing and direct CPU harnesses receive the shared module; JSON's tests run separately. This branch is based directly on pinned main and does not depend on the shared lane extraction.Receipt
29304163e0ab97d335cba9daaabc4ccb0ea6e7a7, pinned basec7137bb31a7dad924fb541a7068422127b9a94b2. No checkpoint, GPU, MLX or PyTorch used.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: no device/model receipt; JSON parser/writer implementations are unchanged. Existing server tests and frozen HTTP goldens pass with the shared module.tools/bench_openai.py: n/a; this changes module ownership, not decode arithmetic or scheduling.zig/tests/server/build.shcompiledfake_serve, then its engine-less native build failed atmain.zig:11withno module named 'checkpoint_cli'. The same module graph on pinned main produces the identical error; the unrelated CLI wiring remains unchanged. This extra direct build check is incomplete, not a pass.Merge Danger — Door: two-way. Blast Radius: server. A revert restores local-file imports. Every independently constructed server module must now provide the named
jsonimport; repository build paths and CPU test harnesses are wired here. No persisted data or JSON wire-format change is introduced.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.