Commit Graph
84 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 672e4bfc72 STRA-338 params p01: deploy, gateway-domain, gateway-text, desktop-core and the rest of control-plane to at most 5 parameters; domain names for the new structs 2026-11-08 00:59:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c4e99d2ca6 STRA-338: rustfmt of the merged size-gw files
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 09:41:44 +01:00
Pavlo Ratushnyi a830d8f110 STRA-338 size-fn2: check_* that act are named for what they do (cancel_stalled_generation, probe_host, fail_if_api_exited, fail_if_engine_exited, read_assistant_text, detach_if_unattached), helpers named verb + object (report_stopping / report_engine_lost leave the Flow to the caller, count_failed_start, answer_refused_start, require_free_endpoint + spawn_worker_process, pin_engine_gpu, describe_load_verdict, run_worker_action, open_watch_stream, ...), the cold path reuses catalog_changed, the three Supervisor types are AttachLoop, SessionSupervisor and ServiceSupervisor; behaviour unchanged 2026-11-06 23:07:59 +01:00
Pavlo Ratushnyi 4b9fc18794 STRA-338 size-fn2: the remote probe is two adjacent raw literals joined by concat! (payload byte-identical to cbc1a9587, no line over 120 columns) 2026-11-06 22:21:27 +01:00
Pavlo Ratushnyi b3fcb3cf76 STRA-338 size-fn2: restore the newline of the e2e_windows reconfigure message and the single-line nvidia-smi command of the remote probe (payload byte-identical to cbc1a9587) 2026-11-06 22:15:49 +01:00
Pavlo Ratushnyi 887668add3 STRA-338 size-fn2: desktop-core runtime_rpc decisions apart from state changes (load verdict judged, described and applied by three functions; generation admission checked apart from the reservation; a proven nonacceptance releases the reservation in release_reservation, settle_rejection gone) 2026-11-06 21:30:00 +01:00
Pavlo Ratushnyi 7bfd821019 STRA-338 size-fn2: desktop-core production functions within the limits (hardware::inventory, node respond, node_connection::session, node_proxy::respond, planner::plan, Pool::new, ToolResponse::complete/preflight; desktop-core fn>30 20 -> 0, cx>10 -> 0, wide 13 -> 0); validate() of the Responses request split into one check per field
Each helper does one action and is named verb+object (sample_host, add_nvidia_accelerators, check_pool_bounds, index_groups,
subscribe, publish_ready, follow_updates, respond_request, refusal_status, read_headers, relay_body, build_response,
publish_text, publish_call, terminal_status, total_tokens, call_size ...). New modules: node/respond.rs, runtime_tool_response/preflight.rs.
Behaviour unchanged (same error texts and order). The remote probe script wraps its nvidia-smi line with a shell line
continuation (same command).
2026-11-06 21:11:51 +01:00
Pavlo Ratushnyi 7d4740d62c STRA-338 size-fn2: single-responsibility assert helpers in strata-desktop-core tests (profile selection, digests, stale epoch / output budget) 2026-11-06 21:05:13 +01:00
Pavlo Ratushnyi 01ddd43e50 STRA-338 size-fn2: desktop-core functions within the limits: cli node serve/parse_mode, worker run, check_output_directory, relay next_chunk, main/file_command, managed_worker start/Owner::command/run, remote inventory parse, runtime_rpc pump, and the tests of remote, runtime_gateway and runtime_rpc (prod fn>30 8 -> 0, cx>10 8 -> 0, test fn>30 6 -> 0 in these files; test ids unchanged) 2026-11-06 20:22:09 +01:00
Pavlo Ratushnyi ec2dbe54e1 STRA-338 size-fn: rustfmt of the files this batch changed (strata-control, strata-desktop-core, runtime-client, deploy) 2026-11-06 19:11:35 +01:00
Pavlo Ratushnyi 521c3d0d91 STRA-338 size-fn: dyn-trait aliases in desktop-core bins, result_large_err allowed where the error is the HTTP response 2026-11-06 19:11:19 +01:00
Pavlo Ratushnyi 00c8e39fcc STRA-338 size-fn: desktop-core: handle_generate and Sizing::dedicated within the limits 2026-11-06 19:04:22 +01:00
Pavlo Ratushnyi 03c7e83b07 STRA-338 size-fn: desktop-core planner, evaluation_measurement, managed_worker within the function limits 2026-11-06 19:00:46 +01:00
Pavlo Ratushnyi e9a82e5f73 STRA-338 size-fn: desktop-core runtime_gateway: responses, render, load, tool_responses, credential within the function limits 2026-11-06 19:00:08 +01:00
Pavlo Ratushnyi b3aca3ddd9 STRA-338 size-fn: desktop-core journal, remote install, remote probe and ssh tunnel within the function limits 2026-11-06 18:57:47 +01:00
Pavlo Ratushnyi e6306202c3 STRA-338 size-fn: desktop-core runtime_rpc: generate, load, unload, reconfigure, watch, pump, snapshot and four tests within the limits 2026-11-06 18:57:40 +01:00
Pavlo Ratushnyi c4952262b2 STRA-338 size-fn: desktop-core main binary: command parts in cli modules (fn>30 3 -> 0) 2026-11-06 18:38:53 +01:00
Pavlo Ratushnyi c0736acf44 STRA-338 size-fn: desktop-core hardware: probe within the limits 2026-11-06 18:24:02 +01:00
Pavlo Ratushnyi 229694aa33 STRA-338 size-fn: desktop-core runtime_rpc: handle_cancel within the limits 2026-11-06 18:14:26 +01:00
Pavlo Ratushnyi d66cbeac95 STRA-338 size-fn: desktop-core gateway responses, runtime_tools history/plan/policy/fields, Gateway::with_token within the function limits 2026-11-06 18:12:45 +01:00
Pavlo Ratushnyi cdbfb53861 STRA-338 size-fn: desktop-core bin: option dispatch, owner table and one test within the limits 2026-11-06 17:57:32 +01:00
Pavlo Ratushnyi aaa09d67bd STRA-338 size-fn: desktop-core bin: all binaries within the function limits (fn>30 22 -> 0, wide lines 4 -> 0) 2026-11-06 17:50:13 +01:00
Pavlo Ratushnyi 801ee44d46 STRA-338 size-fn: desktop-core bin: leleka-inference main and original_serve within the function limits 2026-11-06 17:36:09 +01:00
Pavlo Ratushnyi a5078a9c84 STRA-338 size-gw: 6 more production functions within the limits; doc comments and cfg attributes given back to the functions they belong to
settings_from, planner candidate, request_monitor begin and render, PrefixView::prefix_match and settings_post now use
helpers. Earlier helper insertions had taken the doc comment (or, for validate_auto, the #[cfg(unix)]) of the function
below them: restored for tool_markup, decode_tensor_row, read_events, one_layer, model_control_prelude,
check_activation_link, validate_auto and finish; the unix-only helpers carry the same #[cfg(unix)] (checked with a
Windows host `cargo check`, which shows no new warning in the two crates).

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0 (Linux).
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
151/123/17/185 -> 146/122/17/185 and 63/56/6/52 -> 62/56/6/52.
2026-11-06 15:01:37 +01:00
Pavlo Ratushnyi 83565a456b STRA-338 size-gw: 11 more production functions of control-plane and desktop-core within the limits (helpers extracted, behaviour unchanged)
Vision::encode, StdioTransport::request, handle_cancel, RuntimeServer::{serve,reserve}, finish (legacy done line wrapped
with a string continuation, text unchanged), event_to_proto, ResponseHistory::insert_with_limit, ToolStream::{text,
finish_text} (json! bodies wrapped, key order unchanged), cuda_memory::inventory, HarmonyDecoder::translate and
Server::call.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
158/127/17/194 -> 151/123/17/185 and 67/58/6/54 -> 63/56/6/52.
2026-11-06 14:30:18 +01:00
Pavlo Ratushnyi c1aa6d0194 STRA-338 size-gw: 13 more production functions of control-plane and desktop-core within the limits (helpers extracted, behaviour unchanged)
The five operator_*_execution parsers of the inference binary share select_execution_flag; the others are
mtp_pack::check, preflight_space, check_activation_link, service_install show, validate_auto, Ssh Config::arguments,
Manager::with_journal, Terminal::feed, Pool::acquire, Agent::build, enqueue_with, GenerationMetrics::finish and
NativeModel::validate.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
166/130/17/194 -> 158/127/17/194 and 77/59/6/54 -> 67/58/6/54.
2026-11-06 13:50:36 +01:00
Pavlo Ratushnyi 1f8effb97e STRA-338 size-gw: 25 production functions of control-plane and desktop-core brought within the limits (helpers extracted, behaviour unchanged)
Extracted helpers: ReqCtx::new, Profile::gateway, RuntimeServer::new, props, Generate::line, Http::request,
read_events, parse_macos, parse_nvidia, validate_nested_slices, sample_windows, tool_markup, count_input_tokens,
model_control_prelude, vision fetch, admit, decode_tensor_row, Registry::observe, provenance_value,
decode_source_tensor, service_install parse, provision prepare, provision arguments, write_group, pool relay.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines:
prod 187/135/17/196 -> 166/130/17/194 and 81/59/6/54 -> 77/59/6/54; test unchanged (214/17/30/133, 65/3/3/27).
2026-11-06 13:30:31 +01:00
Pavlo Ratushnyi 7610ba3568 STRA-338 size-gw: the 19 oversize files of control-plane and desktop-core split by topic (no file over 400 lines); mechanical child modules renamed
Tests become directory modules named after what they test, with a shared fixtures/harness module:
control-plane/src/{responses,ggml_bridge,gguf_f32_stream,prepare_preview}/tests/, desktop-core/src/runtime_rpc/tests/;
integration targets become tests/<name>/main.rs plus topic modules and a harness (backend_worker_http, vision_http,
memory_gate_http, tool_corpus, mcp_hub, api_over_runtime, runtime_gateway_sdet, native_tools_sdet,
native_tools_retry_sdet, managed_worker, gateway); target names are unchanged. Sources: leleka-inference.rs becomes
src/bin/leleka-inference/ (main.rs plus one module per operator option group), the cp_replay example becomes
examples/cp_replay/, and the tonic service impl of runtime_rpc delegates to session_rpc, model_rpc and generate_rpc
(bodies unchanged). impl_* modules are renamed after what they hold (base_provenance, count_tokens, manifest_fetch,
fetcher, record, capture, in_flight, tool_policy, tool_plan, server). The self-spawning tests that name themselves
(credential_child, the managed worker fixture) use the new module path or stay at the target root.

Test ids: 543 before and after in both crates (strata-control, strata-desktop-core, --all-targets), 0 missing, 0 new,
0 outcome changes; 241 ids differ only in the module path. Warnings in the two crates: 0 before and after.
Counts (strata-control / strata-desktop-core): oversize files 19 -> 0 (13 + 6). Functions over 30 lines, complexity 10,
nesting 4, wide lines, prod: 187/135/17/199 -> 187/135/17/196 and 81/59/6/54 -> 81/59/6/54; test: 214/17/30/133 ->
214/17/30/133 and 65/3/3/30 -> 65/3/3/27. The 211 functions that moved verbatim are in limits-allowlist.json (owner
STRA-338) because the diff gate treats a moved function as added; the entries fall as the functions are shortened.
2026-11-06 13:13:59 +01:00
Pavlo Ratushnyi e049e24fe3 STRA-338 S20: EngineFamily seam in leleka-engine-core, Qwen35Cuda family in leleka-runtime, the scripted engine as leleka-engine-fake; the inference binary and the full-chain test start their engines through spawn::<F>. Ratchets raised by the Box<dyn Backend> signatures of the seam (core +2, fake +1, runtime +1) and 2 test lines: the Backend trait object is the process boundary the gRPC server already held 2026-11-06 11:20:57 +01:00
Pavlo Ratushnyi 6b5fcd242e STRA-338 S12b: fns and impl blocks of 59 cold oversize modules move into child modules (model-format, gateway, desktop-core, leaf libraries)
scripts/dev/split_module.py (lexer-based, with 16 self-tests) moves the top-level fn and impl items of 59 oversize module files in control-plane, desktop-core, model-format, gateway-text, leleka-memory, experimental-ref, context, serving-policy, tokenizer, backend-api, quant-core, harmony, igpu, libc-shim, npu-service and runtime-client into foo/<name>.rs groups of about 250 lines; types, constants, macros, nested modules and tests stay, every path stays valid through pub use re-exports, restricted visibilities keep their scope one level down, include paths and super:: paths are shifted. Not touched: leleka-runtime, cuda-driver, native-cpu-expert, sampler-ref and cpu-* (hot path, next wave) and the files kar-off-ab edits.

The baseline drops from 311 to 263 oversize files and from 273,600 to about 233,000 lines; the path-include ratchet ignores dir/name.rs child declarations.
2026-11-05 15:29:39 +01:00
Pavlo Ratushnyi f78b89757c STRA-338 S12a: inline unit-test modules move to sibling tests.rs files in 118 oversize files
scripts/dev/extract_tests.py moves a trailing cfg(test) mod tests block into foo/tests.rs for 118 files of leleka-runtime, cuda-driver, control-plane, gateway-text, deploy and nine smaller crates (31,000 lines), leaving production code and test ids untouched; 22 files that are themselves loaded through a path attribute carry an explicit path to their tests file. Not touched: the files the kar-off-ab branch edits (backend.rs, backend_original_serve.rs, backend_original_serve_replay.rs, qwen4exp_resident_expert_source.rs and seven deploy files).

Verified: cargo check --all-targets for the whole workspace on x86_64 Linux and on the Windows host; the 2429 library unit-test ids of the workspace are identical before and after (Linux listing diff empty); the loadable sections of leleka-inference, leleka-daemon, leleka-cli and strata-next are byte-identical between a release build before and after (scripts/dev/elf-sections-equal.sh), so the shipped code is the same. The architecture ratchets exclude tests.rs from the path-include count; the baseline drops from 329 to 311 oversize files and from 302,000 to 273,600 lines.
2026-11-05 15:00:09 +01:00
Pavlo Ratushnyi 7b1922d116 gateway-text: prompt, response_tools and tool_output become one crate; desktop-core no longer compiles them twice (STRA-338 S8)
control-plane/src/{prompt,response_tools,tool_output}.rs (pure text logic: pinned chat template renderer, tool catalog, tool-call
parser) move by git mv to the new leaf crate crates/gateway-text. strata-control re-exports them under the same module paths
(crate::prompt, crate::tool_output keep working for tests and callers); strata-desktop-core replaces its three #[path] includes with
imports. The leleka-runtime GPU proof modules that hash prompt.rs follow the new location. The only text change in the moved files is
the relative include_str path to engine/strata. serde_json features (preserve_order + float_roundtrip) equal what both hosts already
got through unification.

Verified: cargo test strata-control + strata-desktop-core + gateway-text on the host: 504 tests, 0 failed; the 30 tests that vanish
are exactly the duplicate runtime_prompt/runtime_tool_catalog/runtime_tool_parser copies of the same 30 tests (11+2+17), which now run
once. WSL x86_64-linux cargo check --tests leleka-runtime: 62 warnings, unchanged. fmt clean on the new crate.
2026-11-05 13:32:35 +01:00
Pavlo Ratushnyi 0111c3dc62 Merge claude/single-copy: sparse memfd (PLE extents only) is the rtx5090-32g default; O_DIRECT loading, page-cache release; file source kept as experimental
Identity PASS (2057/2057 rows, 1036/1036 draft traces); 245k A/B +0.58% (n.s., 5/6 blocks); MemAvailable +36.6 GiB; seal 79-97 s -> 28 s.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

# Conflicts:
#	desktop-core/src/bin/leleka-inference.rs
2026-11-03 02:15:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 72fc3b0820 style: cargo fmt on strata-control, strata-desktop-core, leleka-runtime-client; clear Clippy lints and two red tests on main
Mechanical rustfmt (control-plane, desktop-core and the runtime client had 360 hunks of drift; the CI format steps for control-plane and
desktop-core were red), plus, found by running `cargo clippy -D warnings` and the tests on Linux:
* control-plane/tests/log_failure_sse.rs `no_panicking_log_macros_in_the_serving_crate` was red on main since the observability merge: two
  test-only `eprintln!` samples (prometheus.rs, request_log.rs) trip its source scan. They now write to stderr with `write_fmt` and
  ignore a failed write, which is what the test asks for; the output is the same.
* tool_output.rs `is_multiple_of(2)`, an unneeded `mut` in a control-plane test, a collapsible `if` in leleka-inference.rs,
  `#[allow(dead_code)]` on observer_adaptive_slots (compiled into leleka-inference-evaluation too).
* crates/deploy/src/facts.rs: `lab_holder_running` moved above `mod tests` (clippy::items_after_test_module); code moved, not changed.
Kept as its own commit so it can be redone with `cargo fmt` if other branches touch these crates first. No behaviour change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 00:30:27 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fb10bf0e70 observability: structured bounded logs, per-request record, metrics, leleka logs / report
* crates/obs (leleka-obs, std only): one event per line (JSON under `leleka run`, key=value on a terminal, the lab's plain lines when a
  binary is started by hand into a file), UTC ms timestamp, level, component, event, flat fields; prompt/completion text and credentials
  never appear (key classes + value scrub + registered secrets), per-event token buckets with a `suppressed` count, value and line caps,
  histogram with Prometheus exposition, size-capped file sink for requests.log.
* control-plane: `observe` middleware gives every generation request an id (x-leleka-request-id header) and a session tag (hash of the
  client's session header); the worker marks engine start / first token / terminal / error on it and one record is written at request end
  (tokens, cached prefix, queue wait, TTFT, prefill/decode tok/s, finish, error class, engine restart, GPU clock/temp/throttle). All
  elog! lines go through the log layer (sampled per call site). /metrics?format=prometheus gains request counters and histograms, engine
  lost/attached counters, uptime and supervisor restarts, PCIe, memory clock, throttle reasons, speculative tokens per round, expert-tier
  entries by tier and hit ratio.
* engine: one structured line per request with the same id (rounds, tokens per round, expert-tier share served from VRAM/PCIe/CPU for that
  request); telemetry gains spec / expert_tier / last_request; NVML sampler reads PCIe throughput, memory clock, throttle reasons.
* supervisor: structured events (engine exit, health, restarts), secrets registered with the log layer, children get LELEKA_REQUEST_LOG,
  LELEKA_STATUS_FILE, LELEKA_PROFILE and JSON logging; runtime-client and gateway log connect/probe failures as sampled events.
* leleka logs (--tail/--since/--level/--component/--source/--request/--follow), leleka report (sanitized support bundle, written only with
  --yes, nothing sent anywhere), request statistics in leleka status / verify --quick.
* generation, sampling and kernels are untouched; the lab scripts keep their plain lines (LELEKA_LOG_FORMAT=legacy or a hand-started binary).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:25:24 +01:00
Pavlo Ratushnyi 967b4122f5 engine help/comment: sparse extents are the form of rtx5090-32g 2026-11-02 23:11:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b856b615d3 sparse memfd (experimental, default OFF): seal, verify, lock and heal only the extents the serve path reads
Profile field memfd_extents: ple_only (needs kar_source memfd and an explicit prefix_cache_mib; default full, not serialized).
The sealed memfd keeps the archive's length and file offsets but holds only the ~16 GB the serve path reads (PLE rows, header,
directory, books); everything else is a hole, so readers need no change.

- deploy: sealed::seal_extents (parallel copy restricted to the extents, holes elsewhere, same seals; st_blocks test),
  leleka seal-exec [--sparse-ple] (Rust form of leleka-seal-exec for A/B runs outside leleka run), supervisor seals sparse,
  passes --kar-sparse-extents-sha256 to every engine, never attests or stamps the archive from a sparse copy, refuses to start
  without a pinned digest (PLE_EXTENTS_SHA256, or LELEKA_KAR_EXTENTS_SHA256 while that is unmeasured); resource planner,
  preflight RAM minimum and the inherited-descriptor credit use the memfd's real size.
- engine: --kar-sparse-extents-sha256, InheritedKarArchive::open_sparse, verify_sparse, extents handed to the governor.
- leleka-memory: FdMapping::lock_ranges, compact-space heal walk, guard_archive_extents. Locking or populating a hole allocates a
  zero page: tested with a negative control next to the extents-only test that asserts st_blocks does not move.
- scripts/e2e/decode/sparse-memfd-ab.sh (paired 5-turn 245k A/B + teacher-forced identity gate; NOT queued, not a holder job),
  docs/kar-sparse-memfd.md.

Not run on a GPU or against the real archive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:28:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c5be696205 Windows: stop the children with Ctrl-Break in their own process groups (the engine, gateway and API handle it), so leleka down takes seconds instead of three grace periods; hidden mode hides the console instead of freeing it; no readiness summary after up --mode none
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 16:58:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e77c98d3f2 Windows: release build recipe (scripts/windows/build-release.ps1), engine tests follow the mapped-only default, Linux-only errno and journal-lock tests gated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:57:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1bbb9d1b8e desktop-core and control-plane build and test natively on Windows: api-key init (hard-link publish, user profile ACL), atomic no-replace directory publish via MoveFileExW, tokenizer export without directory fsync, MSVC link stubs for the ggml bridge, Unix-only shell-script tests gated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:45:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 60b48d8225 runtime reconfiguration: reopen the serve stack with new context/cache/resource settings without reloading the model
serve_tuning (settings document, validation, effective settings), Command::Reconfigure in the Original serve loop with rollback,
Backend::reconfigure, gRPC Runtime.Reconfigure, POST /v1/reconfigure, telemetry.settings; tests for each layer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 03:01:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 08e2c78761 runtime telemetry: GPU load/VRAM (NVML), RAM, CPU cores, prefill/decode tok/s, cache hits, context
leleka-memory::telemetry (sampler + per-request records) -> Backend::telemetry_report -> Snapshot.telemetry_json
(gRPC) -> control plane /v1/status machine -> leleka status.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 19:58:28 +02:00
Pavlo Ratushnyi acabd3fc82 Merge branch 'claude/cp-latency' into claude/port-gpu-bringup 2026-10-24 02:00:07 +02:00
Pavlo Ratushnyi 88f74a323d Merge branch 'claude/deploy' into claude/port-gpu-bringup 2026-10-24 01:44:35 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f96074c360 perf(startup): verify shards and archive in parallel with read-ahead, verification stamps, attested sealed archive, parallel memfd fill, leleka verify
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:28:11 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ce4ae13e6 feat: request-end prefix checkpoints (tail nodes) and TTFT stage marks
A hit on a 2048-token grid node makes the agent's next turn re-read the part
block, the whole reply and the new tokens (~2.2k tokens per turn). Add tail
nodes: a checkpoint at the exact end of the previous request (end of the
prefill, or of the decode), a private partial block on top of the grid blocks.
--prefix-cache-tail off|prompt|reply (default off; reply is experimental).
Also per-request TTFT marks (resume, prefill, assemble, first round), a replay
multi-arm mode with per-arm greedy ids, and a short-suffix cost sweep.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:18:25 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 cceb4b4032 perf(startup): phase timing lines (leleka-load-time) and leleka-inference --verify-only
Always-on one-line phase timings for a model load and a CPU-only verification mode that
runs the load-time source verification (shards, KAR archive) with no CUDA. Baseline for
the startup work: no behaviour change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:14:06 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 95340330ac cp-latency: fast tokenizer (scanner + id BPE + segment cache), pass the prompt text through, TCP_NODELAY on the runtime gRPC server, gRPC replay example
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:13:50 +02:00
Pavlo Ratushnyi 0790ba6ec9 Merge branch 'claude/memory-safety' into claude/port-gpu-bringup 2026-10-18 05:09:13 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 505f3ee70f fix(runtime): output cap 4096 -> 32768 (one shared constant); /v1/status omits a null prefix_cache
The Codex tic-tac-toe run (job 943) ended after 4 minutes: the model wrote the whole index.html in one tool call, hit the
runtime's 4096-token output cap three times (tool call unterminated -> response.failed 'tool parameter is incomplete', then
'incomplete: max_output_tokens' -> turn.failed -> Codex exit 1). The Original server has no such cap (max_tokens 0 = the rest
of the context). RuntimeServer, the engine request check, strata-next's runtime default, the leleka-deploy generated config
and the examples now use leleka_backend_api::MAX_OUTPUT_TOKENS = 32768. /v1/status keeps the Python server's key set when no
prefix cache exists (http_surface golden regressed with the prefix-cache merge).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 04:36:37 +02:00