diff --git a/docs/experiments/2026-10-05-linux-gpu-qualification.md b/docs/experiments/2026-10-05-linux-gpu-qualification.md new file mode 100644 index 00000000..37ad3d39 --- /dev/null +++ b/docs/experiments/2026-10-05-linux-gpu-qualification.md @@ -0,0 +1,185 @@ +# Linux GPU package qualification — 2026-10-05 + +## Scope + +The user ended the active project trial and explicitly made the RTX 5090 host +available for qualification. The previous runtime recipe and state were saved +privately before an idle check, authenticated unload and owned-process stop. +All requests in this report use synthetic inputs owned by the evaluator. +User project prompts, code and credentials were not inspected. + +This report separates package/deployment correctness, API correctness, model +quality and performance. It does not establish full KAR residency, a successful +V-only retrofit, a speedup, or completion of the whole Linux epic. + +## Artifact and hardware + +- Runtime source: `9409dc92ff9223e294ea2e027cf7fd4776bad027`. +- Actual hosted CUDA build: [run 37299581677](https://github.com/paveldhq/strata-next/actions/runs/37299581677), + including green verify, musl CLI, CLI container, CUDA engine, embedded package, + runtime image and private artifact upload. +- Private archive: 851,293,705 bytes, SHA-256 + `e45c30acb94430ee2b2f155d3c388177a56a428701e3c03b3b0a3d21298b2faa`. +- Combined executable SHA-256: + `2e07b2f3dc194576a43b902455ca91d9dc28368ac98aade1ed950f7fc98b42a3`. +- Embedded engine: 612,514,560 bytes, SHA-256 + `b629bac51a6a1d47097abf9c9e34fc25e806c3fa3fe94240cf93885c75643d22`. + CUDA 13.0.1; direct dependencies are libc, libm and the loader; minimum glibc + is 2.38. The host NVIDIA driver remains a dependency. +- Runtime image uses the pinned Ubuntu 26.04 base with glibc 2.43. + Its archive manifest digest is + `75c40b6fe1c78545ca556c79ab4503eeaf7fece1f342fbb2f418f6370f3d065b`; + its config digest is + `523a12493bc46173be2db8541760cfca6a39eefd9d3bd1bbf92191e74210cd25`. + Docker import reports the former; build provenance identifies the latter. + Both are present in the verified archive, and the contained executable hash + was independently checked after import. +- Host: Ubuntu 26.04.1, RTX 5090 32,607 MiB, driver 595.91.07, + Ryzen 9 9950X3D, 128 GB RAM. Source weights reside on the existing NVMe volume. +- Qwen3.8-Flash-Next IQ3_S source shards: 83,617,662,656 bytes, + SHA-256 `4c1eb2ceb4915e1192f4f386021897bde56a97f40a0bb78bb86465e0f7d2aca3` + and `316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113`. +- One slot, 262,144 configured context, INT8 K+V, 32,768 resident KV tokens, + auto expert cache/prefill, existing expert profile, MTP spec=4/min-p=0.5, + VRAM reserve 700 MiB. KAR, V-only and vision are disabled. + +The comparison baseline uses the previous external engine +`0f62ffb4dd30561bd4e56cd5e4da412a09f56b7ef6a19f5e23d0cea7e4381b1f` +and old serving pack with the current control plane. The candidate uses the +new embedded engine and a fresh native-prepared pack. The baseline CLI artifact +was built from PR merge `b678eadb8d878c659d44e60734a92bf8f483d3f6`, whose tree +`e4a4438ab40907d196885b2d0d042648ab816939` equals the runtime source tree above. + +## Native preparation and startup + +The native `provision` command verified both full GGUF hashes, generated a new +versioned serving pack and verified a separately pinned MTP bundle. It returned +`native_model_prepared=true`, `mtp_pack_structurally_validated=true` and +`worker_started=false` at 11:10 UTC. + +The generated dense file is 1,538,035,200 bytes and exactly matches the existing +offline-prepared file: SHA-256 +`d2af3d8331e5c7a1985d1d589747230f9d56719a6d33c7cddc9ee6b81cde6b13`. +The native expert table also matches exactly. The only index difference is the +generator comment. There were no float conversions; original quantized bytes +were preserved. This is IQ3 preparation, not KAR conversion. + +The new combined executable then started a fresh per-user unit with +`engine.executable=@embedded`, `native_model`, pinned MTP, driver policy, +loader probe, private authentication and durable history. Native `start-ready` +confirmed the exact managed PID/model and a ready worker at 11:25:44 UTC. +No separate engine installation or Python serving process was used. + +The imported image separately passed a read-only, network-disabled, UID 65532 +check: exact binary hash, driver/GPU visibility and absence of `python3`. +Container model startup and deployment rollback are recorded separately below. + +## Actual GPU rollback and durable continuation + +The native service catalog passed eight assertions at 11:35:37 UTC. Selecting +the already active target retained its PID. Switching to an intentionally invalid +target used the real embedded CUDA engine: loader preflight passed, then the +engine rejected missing PLE/native configuration before becoming ready. + +The controller drained and stopped the previous real GPU service, detected the +target startup failure, stopped that target, restarted the previous embedded +profile and waited for its model to become ready. Its durable transaction ended +in `rolled_back`. This is an actual full-model restart, not a simulated restore. +It does not test GPU OOM or driver-loss recovery. + +A previously stored response survived unchanged across that restart. Its +`previous_response_id` continuation returned the exact expected marker. The +failed target had no remaining process, and lifecycle counters showed no +orphaned request or generation. The retained source/pack/MTP were reverified +during restoration. The restored unit was then gracefully drained and stopped +before container qualification. + +## Fresh container deployment + +The verified image loaded the actual model and MTP with a read-only root, +nonroot UID 1000, all capabilities dropped and no-new-privileges. Source weights, +MTP and manifests were mounted read-only; a fresh private `/state` held the +native-generated pack and history. Production processes were the Rust control +plane and embedded engine; the image contained no Python executable. + +Native preparation inside the container checked both full source hashes. Its +dense file, expert table and index matched the host's new native pack exactly. +All 32 quality outputs matched the baseline after the same normalization, +tolerance zero. All 11 API checks and the separate JSON/SSE tool episode passed. +Graceful container stop returned exit 0, no OOM, and GPU use fell to 34 MiB. + +The first invocation used a wrong port because the image's `STRATA_BIND` +environment overrode the configuration; explicitly setting the intended bind +fixed this test setup. A replay attempted during the concurrent quality screen +correctly refused its idle precondition without generating requests; the +subsequent isolated replay passed. Both failed setup records are retained. +This proves fresh container userspace and pack deployment on the installed +driver, not installation of a driver on a new physical host. + +## Quality and API results + +The existing eight-case `quality-v1` corpus covered arithmetic, short and long +retrieval, instruction priority, no-tool behavior and forced function calls. +Each arm ran one warmup and three measured repeats per case, temperature zero, +reasoning none, maximum 128 output tokens. The unsupported Chat `seed` field +was omitted explicitly. Both arms passed 24/24 measured cases and 8/8 warmups. +All 32 paired normalized outputs matched exactly, tolerance zero; only generated +call identities were excluded from comparison. + +Acquisition, hashing and other qualification traffic overlapped these runs. +Their timings are not a valid paired performance measurement. No throughput +improvement is claimed. + +Additional real-model checks: + +- A declared two-step forced function/tool-result episode passed JSON and SSE, + with exact expected semantics, complete named events, identities, argument + chunks and one terminal per request. Four generations per run; both baseline + and embedded arms passed, with no remaining worker slots or queued jobs. +- Both arms passed 11 checks covering stored response retrieval, input items, + continuation, deletion, required/none policies, disconnect after actual output, + slot release without server restart and exact follow-up generation. +- The baseline passed 112 storage/policy assertions across JSON/SSE, + reasoning none/low and none/auto/required/forced function policies. + Full stored terminals matched the returned objects, including reasoning, + metadata and usage. An independent SSE verifier additionally checked every + captured stream's complete item/chunk/sequence graph. +- SIGKILL of the owned baseline engine after a real output delta produced one + `response.failed`. The control-plane PID stayed unchanged; the supervisor + loaded a new worker, released all slots and generated the exact expected + recovery text. This completed at 11:18:59 UTC; the failed request was not retried. + +## Actual Codex CLI capture and limits + +Codex CLI 0.160.0 ran in an isolated synthetic workspace with its own minimal +stdio MCP tool. The task read an orders CSV, obtained a discount via MCP, wrote +a JSON total and read it back. The private evaluator captured full Responses +request bodies and raw SSE without authorization headers. + +The first attempt was incomplete because the evaluator's MCP fixture required +approval while the CLI used approval policy `never`. The model correctly +refused to invent the missing policy. A second fresh attempt used automatic +approval review and an accurately annotated read-only MCP fixture. Shell and +MCP calls completed and the generated JSON exactly matched the independent +oracle: subtotal 186, discount 10, total 176, code `POLICY-731`. + +The strict final-text judge nevertheless **failed**: the model added an +explanation before the requested exact final marker. This failure is retained. +All nine captured SSE responses across both attempts passed independent +protocol validation. There were no malformed tool arguments or missing +terminal events in those captures. + +Replaying the three successful-attempt requests as non-streaming JSON returned +HTTP 200 but did **not** reproduce all text byte for byte. Differences included +an additional read-only `ls` in a shell command, heredoc whitespace and reasoning +wording. Cache state differed; no serializer defect was isolated by this test. +Do not describe this as a strict raw Codex replay parity pass. The separate +controlled JSON/SSE tool episode above did pass exact semantic comparison. + +## Private evidence + +Artifacts, source hashes, MTP pins, configuration, raw responses, synthetic +workspace results, telemetry and process records remain in the private +`qualification-9409dc9` and remote `linux-qualification-20261005` directories. +No weights, request captures, API keys or generated artifacts are committed. +Detailed checkpoints are attached to LeaseVibe STRA-9 and STRA-12.