2805 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 5310d7042f Merge claude/debt-final-ctx5: the architecture gate reads past cfg(test) mod declarations and finds static cells by type; 49 needless allow(unused_imports) and dead glob re-exports removed; exceptions carry kept:/debt: reasons (STRA-338)
Rust port / port-typecheck (push) Successful in 1m4s
Rust port / port-linux-tests (push) Failing after 2m52s
Rust port / port-oracles (push) Successful in 4m34s
Rust port / port-fast (push) Successful in 4m36s
Linux / verify (push) Failing after 5m14s
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Product / product (push) Failing after 14m51s
2026-11-24 08:53:08 +01:00
Pavlo Ratushnyi 75e28ca110 deploy: drop the HIDDEN flag of the supervisor, a process cell that was written by --hidden and never read (STRA-338)
The console is hidden by winsys::hide_console right where the flag was stored; nothing in the workspace loads supervisor::HIDDEN, so the cell and its exception entry go. cargo check -p leleka-deploy --all-targets passes.
2026-11-24 08:51:58 +01:00
Pavlo Ratushnyi 219238cd08 architecture gate: read the whole file after a cfg(test) mod declaration, find static cells by type, 64 new exceptions with reasons (STRA-338)
The scanner stopped at the first '#[cfg(test)] mod x;' of a file, so the code below was invisible. It now skips only the item under a test-only cfg (an inline mod body, a declaration, a fn, a use; any(test, feature) is not test-only) and reads on.

process-global counted the type name OnceLock/LazyLock/OnceCell, which also matched instance fields (six exceptions existed only for that) and missed Atomic*, Mutex, RwLock, Once, Cell and RefCell statics, thread_local! included. It now counts a static whose type is a cell or a workspace type that holds one (derived per crate and its dependencies), and static mut. Eight exceptions that only excused instance fields go; the rest of the file's hits are re-judged.

Newly visible: 123 static cells in 58 files, 15 allow(unused_imports) in 6 files and the engine settings::process() cell (read at about 78 sites). Each gets an exception whose reason starts kept: (the boundary that forces it) or debt: (what removes it); the settings cell is the largest debt and is not removed here because the engine does not compile on Windows. Entries 173 -> 229, baseline stays empty. 11 new self-tests (39 in all).
2026-11-24 08:51:58 +01:00
Pavlo Ratushnyi d9c0c87dcf Narrow the dead glob re-exports of the module splits: pub use x::* becomes use x::* or pub(crate) use x::* (STRA-338)
Where the split left pub use x::* over items that no outside module can name, the compiler said the glob re-exports nothing pub. The glob now has the visibility its items really have: plain use where they are pub(self), pub(crate) where siblings reach them (model.rs file_download, libc-shim launch_interposers). One glob of backend-api scripted.rs was dead and is deleted. 7 globs of control-plane stay with their allow: the compiler calls them unused in the lib build and the lib test build of control-plane cannot be built on Windows, so a test use cannot be ruled out.

cargo check --all-targets on backend-api, control-plane, gateway-domain, gateway-text and libc-shim: no new warning, no new error (the one control-plane lib test error is the pre-existing std::os::unix use).
2026-11-24 08:51:58 +01:00
Pavlo Ratushnyi e79179a255 cuda-driver: the copy ring asks its arena for the stage slot count by static dispatch, not through a dyn view (STRA-338)
admitted_slots coerced the read lease to &dyn RingArena only to call stage_slots on it. RingArena::stage_slots(read) is the same method of the same impl without the vtable; the Ring keeps its own dyn field, which has its exception entry.
2026-11-24 08:51:57 +01:00
Pavlo Ratushnyi c1734bc7c4 cuda-driver: the expert tier probe names what it takes from its parent instead of use super::* (STRA-338)
The probe module is compiled under cfg(any(test, feature = "expert-tier-probe")), so it is production code of that feature and the glob import counts for the gate. The 16 names it uses are listed; cargo check --all-targets with features cuda-driver,expert-tier-probe and with cuda-driver alone gives no new warning.
2026-11-24 08:51:57 +01:00
Pavlo Ratushnyi 651ed44e90 Drop 49 allow(unused_imports) that no compiler warning needs (STRA-338)
The re-exports left by the mechanical module splits carried a blanket allow(unused_imports). 49 of them cover nothing: cargo check --all-targets on backend-api, control-plane, gateway-domain, gateway-text and libc-shim gives no new unused-import or glob-import warning without them. 39 others in those crates still silence a real warning and stay; the 8 in desktop-core (engine-host) could not be checked because that crate needs the engine, which does not build on Windows (STRA-390), and stay too.
2026-11-24 08:51:57 +01:00
Pavlo Ratushnyi 682c582f8a Merge claude/debt-final-ctx4: request counters, adaptive-tier tuning and the VRAM ledger leave the process cells; vague exception reasons fixed (STRA-338)
Rust port / port-typecheck (push) Successful in 1m46s
Rust port / port-linux-tests (push) Failing after 3m30s
Rust port / port-fast (push) Successful in 6m23s
Linux / verify (push) Failing after 7m48s
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Rust port / port-oracles (push) Successful in 5m34s
Desktop foundation / core (ubuntu-latest) (push) Successful in 5m6s
Product / product (push) Failing after 30m51s
2026-11-24 07:52:28 +01:00
Pavlo Ratushnyi 4619a91367 architecture.json: the engine timer exceptions say what each reading is for (STRA-338)
Eight exceptions of the instant-now ratchet in leleka-engine-qwen35-cuda ended in a deferral ("which is the S14 follow-up"), and one of them was wrong: pcie_share_controllers.rs does not feed a log line, because PcieLag and PcieAuto read the wall-clock duration of the PCIe leg and of a round as the input of their control law. Seven reasons now say that the reading is a measurement that only feeds a log line or a counter, and the controller entry says that its timing is the control input, that both controllers are opt-in (LELEKA_PCIE_AUTO=lag|on, set by no shipped profile) and that their unit tests drive the control law through round() without the clock.
2026-11-24 03:56:38 +01:00
Pavlo Ratushnyi 4ef84275b1 cuda-driver: the VRAM allocation ledger belongs to the Context, not a process cell (STRA-338)
The per-call-site ledger of LELEKA_VRAM_LEDGER is now part of what a Context retains: Context::allocate and the DeviceBuffer free note into the ledger of their own context, and the engine reports through Context::report_vram_ledger, so the OnceLock singleton of vram_ledger.rs and its architecture.json exception are gone. The operator switch stays an EnvSwitch and the default is unchanged (off: one cached bool read per allocation); with the switch on, each context now accounts for its own allocations instead of every context of the process sharing one table.
2026-11-24 03:53:15 +01:00
Pavlo Ratushnyi 47d831ec62 engine: the adaptive-tier tuning is a field of the tier configuration, not a process cell (STRA-338)
ExpertTierConfig now carries AdaptTuning (minimum routed count, margin, decay) parsed once with the tier switches; the residency pool, the cross-layer estimate and the seed ranking take it as a value, so the OnceLock of split_group_pcie.rs and its architecture.json exception are gone. The production default is unchanged (the values still come from LELEKA_ADAPT_MIN_COUNT, _MARGIN and _DECAY with the same fallbacks), and the line for an invalid LELEKA_ADAPT_DECAY is now printed when the tier configuration is read instead of at the first adaptation.

Provenance of two comments that left ExpertTierConfig::off() so that the function stays within the 30-line limit. decode_reserve_mib 300: measured (jobs 989/990/988), the per-request verifier needs about 450 MiB, so 1024 left about 550 MiB idle (180k smoke included); 300 gives the auto-sized cache about 330 more slots. On the 5090, 5 x 245k session (speedtrain-ab), with 300 the card never had less than 563 MiB free (vanilla runs down to 315), so 130 would be safe on the card (+87 slots), but the first slots-footprint A/B showed the Context budget is a second ceiling the planner respects (usable_room); 130 stays an opt-in (LELEKA_ORIGINAL_SERVE_DECODE_RESERVE_MIB=130) until its own arm measures it. pcie_frac 0.45: the PCIe share that equalises the legs when the CPU pool and the DMA share the host's memory ceiling (P/(P+C) = 0.45, job 987-b/909; 0.45 against 0.55 gave +0.5 % / +4.7 % at the auto-sized cache and was equal at 2048 slots).
2026-11-24 03:50:37 +01:00
Pavlo Ratushnyi 51a4eceff0 control-plane: the request counters of /metrics belong to Services, not a process cell (STRA-338)
The request middleware, the backend worker and the metrics handler now share one RequestMetrics value that Services holds, so the LazyLock registry of request_log.rs and its architecture.json exception are gone. The middleware gets it through Observe, the worker through BackendWorkerConfig, and prometheus::render takes it as an argument; the counters, histograms, labels and log lines are unchanged, and the unit tests now count into a registry of their own instead of one shared by the whole test process.
2026-11-24 03:44:23 +01:00
Pavlo Ratushnyi 128a6fb18b Merge claude/debt-final-ctx3: the serving context is a value from the composition root, not a process cell; unused expert layout and GPU-wait hook removed; every remaining process-global exception says why (STRA-338) 2026-11-24 03:26:37 +01:00
Pavlo Ratushnyi e9107fe43c comments: the serving context is no longer called process-wide (STRA-338) 2026-11-24 02:01:08 +01:00
Pavlo Ratushnyi c1fa88db87 architecture.json: every remaining process-global exception says why that site keeps its cell (STRA-338)
The 32 remaining process-global exceptions are classified: instance-local OnceCell/OnceLock fields
that the gate pattern only matches by type name, pure memos of constants or embedded sealed
images, ambient immutable environment read below the Settings owner, FFI and logger-facade
boundaries, diagnostics, and three entries marked "kept for now, NOT a boundary" (request_log
counters, split_group_pcie tuning, vram_ledger) that can still take the value by argument.
2026-11-24 01:04:59 +01:00
Pavlo Ratushnyi 52abe0a21a control-plane: the gpt-oss prompt date is a field of the model view, not a process cell (STRA-338)
PromptDate was set once by serve into a process OnceLock and read by harmony_prompt::render.
It is now ModelView::prompt_date, built from the config in build_state, and prepare_input_tokens
hands it to render_prompt/render. The default of a bare AppState is still Utc, as the unset cell was.
One process-global exception deleted.
2026-11-24 01:04:43 +01:00
Pavlo Ratushnyi 5951540336 native-cpu-expert: drop the process expert layout and the GPU-wait hook nobody installs (STRA-338)
install_layout/expert_layout (a process RwLock cell) and install_release_gpu_waits (a process
OnceLock hook read on a pool stall) have no caller anywhere in the workspace, so the cells were
never written and the hook never ran. They are deleted instead of injected; the origin of the
pool's diagnostic millisecond clock is now a field of the pool's shared state (Shared::origin)
instead of a process OnceLock. Three process-global exceptions deleted.
2026-11-24 01:00:07 +01:00
Pavlo Ratushnyi 79765ac804 engine: the serving context is a value from the composition root, not a process cell (STRA-338)
ServingContext::new(cells, rope) replaces configure_serving_context and the process cell of
cuda-model; serving_context() is gone. The backend spawn makes the value once (serving::
admit_context_tokens) and hands it down: OwnerThread -> LoadEnv -> ServedArtifact (the
model binding captures it, ModelBinding::serving()) and Device::create_context_serving
(every Context of the Load). Device::create_context stays the trained default for tools and
tests. contract::serving_cells, the QSA index context()/device_peak() reads, the
native-resources size read, the memory governor, the stack config and the RoPE constants
read the binding or the Context instead; the stack open refuses a binding and a Context
made for different serving contexts. The two laptop tools build their own value.

Five process-global exceptions deleted (cuda-model serving_context, engine contract,
binding_identity, qsa_index/context, qsa_native_resources).
2026-11-24 00:59:18 +01:00
Pavlo Ratushnyi 1faee20402 Merge claude/debt-final-ctx2: positions, the resident KV window and the serving geometry belong to the model binding and the Context, not to the process (STRA-338) 2026-11-23 23:14:40 +01:00
Pavlo Ratushnyi f43aacd77d Merge claude/strata-scrub: no stale engine/strata paths in comments, sealed sources and fixtures; pins re-sealed (STRA-407) 2026-11-23 22:55:36 +01:00
Pavlo Ratushnyi a736aa03fa UPSTREAM.md: keep the checkout hint in its own paragraph (STRA-407) 2026-11-23 22:51:23 +01:00
Pavlo Ratushnyi 6c88bbc65e sm86_table: say that the digest was recomputed (STRA-407) 2026-11-23 22:37:37 +01:00
Pavlo Ratushnyi bb8ff44667 Sealed PTX: scrub engine/strata from four PTX header comments and their sm_86 companions, re-pin (STRA-407)
bf16_f32_mmvf, iq3_s_q8_1, moe_group_iq3_s, moe_group_iq3_s_nc4 (sm_120 in src/, sm_86 in ptx-sm86/) change in // header comments only (proof: identical after comment
stripping, no .file/.loc directive or string carries the path). The sm_86 companions are re-derived with sm86_assets.retarget + ptxas -arch=sm_86 (== the edited files);
MANIFEST.json (sm120/sm86 sha256 and byte counts of the four, the -I flags of the one recompiled companion) and the five-part sm86_table rows (new keys, re-sorted, same 27/27/27/27/23
layout) follow; FORMER_TABLE_DIGEST is recomputed with the algorithm of its test (reproduces the old value on main). Rust pins that cover the changed bytes:
bf16_receipt_types.rs BF16_RECEIPT (.cu source_sha256 and bf16_f32_mmvf.ptx ptx_sha256; a Receipt, not a PtxPin, so patched token by token), the frozen-artifact hash of
iq3_s_q8_1.ptx in context_handle.rs and in scripts/test-cuda-projection-family-driver.sh. Instruction streams, entry names and pinned symbol names are untouched.
2026-11-23 22:37:24 +01:00
Pavlo Ratushnyi 5e963eada5 Sealed sources: scrub engine/strata from .cu/.cuh comments, move the source pins that cover them (STRA-407)
21 .cu/.cuh files change in comments only (proof: identical after comment stripping; where the file compiles without the removed headers, nvcc 13.2.86 gives the same PTX
modulo the content-hashed symbol names, which nvcc derives from the source text and which the committed PTX keeps as sealed). Every pin that covered such a file moves:
cu_pin sha256+bytes in the seal plans of mmq_original_prefill_misc, s_gemv_legacy, experimental_keyless, experimental_cvec (no repo tool writes cu_pin; computed with sha256),
experimental.rs PINS[3] and PINS[5] and closed_kernels.rs PINS[1] .source_sha256 (rustpins.apply_field, then rustfmt as seal_pins.py does). The four experimental sources
that were already pending a reseal stay pending. Seal-plan prose and -I flags follow the same wording as the gpu-bringup data.
2026-11-23 22:37:17 +01:00
Pavlo Ratushnyi da8c974f68 Drop the stale engine/strata paths and retired generator names from comments, doc strings and generated fixtures (STRA-407)
Rust comments that named scripts/offline/*, gen_goldens.py, oracle/gen_*.{sh,cpp,py}, build_oracle.sh and similar retired generators now say where the data
came from (the Original's code, Strata 41cf05a0) or drop the sentence. The path/generator text of seven generated fixtures (sampler_oracle.json, sampling_keys.json,
memory_plan_golden.json, rope_golden.json, cvec_oracle.json, stra161 fixtures.json, commentary-tool-prompt.json) is reworded; no test reads those fields and no pin
covers their bytes. cmd_time/doc.rs: the two path texts in the format string; its lines are re-broken so they stay within 120 columns (the string is unchanged
otherwise). Comment-only except those data/string spots; no behaviour change.
2026-11-23 22:37:17 +01:00
Pavlo Ratushnyi a4afb2a182 gpu-bringup: name the include dirs of an upstream checkout strata-41cf05a0/ instead of the removed engine/strata (STRA-407)
The recipe data (sm86-recipes.json, extra-seal-plan.json, rope-regeneration.json), STANDARD_INCLUDES, the sm86 include list and the one test that asserts them
now spell the include directories as strata-41cf05a0/{include,src,third_party/ggml}; prose that named engine/strata/CMakeLists.txt or the retired
build-original-verify-ptx.sh now says Strata 41cf05a0 or the precise flags. UPSTREAM.md records where to place a restored checkout.
No pin covers these files; behaviour of the tools is unchanged (the directories did not exist before either).
2026-11-23 22:29:08 +01:00
Pavlo Ratushnyi 920be477ee Merge claude/strata-removal: remove the vendored Strata tree, keep LICENSE and the files Rust embeds in third_party/strata (STRA-406)
Rust port / port-typecheck (push) Successful in 1m10s
Rust port / port-linux-tests (push) Failing after 3m0s
Rust port / port-fast (push) Successful in 4m26s
Rust port / port-oracles (push) Successful in 4m28s
Linux / verify (push) Failing after 5m16s
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Product / product (push) Failing after 14m14s
2026-11-23 21:44:36 +01:00
Pavlo Ratushnyi 91d6a64261 UPSTREAM.md: point at the last full copy of the removed tree (STRA-406) 2026-11-23 21:24:49 +01:00
Pavlo Ratushnyi 4446f93e2e UPSTREAM.md: name the removal commit of the vendored Strata tree (STRA-406) 2026-11-23 21:24:30 +01:00
Pavlo Ratushnyi 1a4d4a737b Remove the vendored Strata tree engine/strata and its provenance files (STRA-406)
Owner decision 2026-11-23: the vendored tree is junk. Leleka never builds or runs it (no Cargo.toml or build.rs depends on it), the vanilla benchmark
builds from its own checkout on the server, the comparison measurements are finished and the CUDA ports are frozen. Strata is MIT: its licence text
stays and ships (third_party/strata/LICENSE, `leleka engine license`).

- git rm -r engine: engine/strata (upstream 41cf05a0 plus 25 locally patched files), engine/README.md, engine/upstream.md (its pin record moved to
  third_party/strata/UPSTREAM.md) and engine/upstream/ (the two local-patch diffs against the removed tree). They belong to the same vendored mechanism.
- The files Rust and the product still read were moved to third_party/strata and control-plane/tests/mcp_hub in the first commit of this branch.
- The full tree is in git history before this commit; 87e2633af is the last commit that changed it. Restore with `git archive <this commit>^ engine/strata`.
- Four doc-comment lines that the path rewrite made too wide are re-wrapped (check-limits stays at 0 errors).
2026-11-23 21:24:19 +01:00
Pavlo Ratushnyi 056ab3d689 Retire the oracles, generators and scripts that only worked against the vendored Strata tree (STRA-406)
The vendored Strata tree engine/strata is removed for good (owner decision 2026-11-23): Leleka never builds or runs it, the vanilla
benchmark builds from its own checkout, the comparison measurements are finished and the CUDA ports are frozen. Everything below
compiled or read that tree, so it cannot run without it and is retired (the tree stays in git history, see third_party/strata/UPSTREAM.md).
Checked-in fixtures, golden JSON, sealed PTX, seal plans and MANIFEST hashes are untouched and keep being replayed by the cargo tests.

Drift guard
- crates/experimental-ref/tests/literal_port.rs: include_str! of the Original .cu files compared with the checked-in experimental ports.

Oracle generators and builders (they compile or extract from the Strata C++/Python sources; their outputs are the checked-in goldens)
- crates/experimental-ref/oracle/gen_{cvec,kv,remote,stream}_golden.{cpp,sh}, gen_seal_additions.py and the cuda_runtime stub they used
- crates/sampler-ref/oracle/build_oracle.sh, gen_fixtures.cpp, gen_sampling_keys.py, stub/ (run_port_host_tests.sh and the fixtures stay)
- crates/serving-policy/oracle/ (build_oracle.sh, gen_{host,cvec,vision}_fixtures.cpp)
- crates/context/tests/rope_plan_golden/gen_* (plan, rope, kv pool)
- crates/engine-core/src/conversation/golden/gen*.{sh,cpp} and stub/
- crates/cuda-driver/oracle/gen_prefill_ring_trace.py and drivers/prefill_ring_trace.cpp (extracted prefill.cpp), check_cu_syntax.sh
- crates/engine-qwen35-cuda/tests/stra161_reference/reference.py (fixtures.json and the Rust constants stay)
- control-plane/tests/golden/gen_goldens.py, scripts/offline/ (Python differentials and golden generators against the Strata Python tools)

Source-compiling CUDA oracles and builders
- scripts/build-cuda-{projection-family,q5,q6,qsa}-oracle.sh with scripts/cuda-{projection-family,q5,q6,qsa}-oracle/ (include the Original .cu; sha256 pins of them)
- scripts/build-original-verify-ptx.sh, scripts/q8/rebuild_quantizer_ptx.sh, scripts/decode-sm120/make_iq_prefix.py (needs engine/strata/include)
- scripts/cuda-stubs/ (check-cu.py and literal_diff.py need the strata headers and the Original sources; the stub headers served only them)
- tools/chain-probe/build.sh, tools/kernel-ab/{cpp,aa.sh,smoke.sh,time_smoke.sh} (the C++ comparator is built from the Strata CPU kernels; verify_manifest.py stays)
- scripts/e2e/codex/speed/verify-hc-down-kernel-microbench-vs-upstream/ (compiles the upstream kernel from the tree)

Engine builds and Python smokes that need the tree
- scripts/build-cpu.sh, scripts/build-static-cuda.sh, scripts/check-keyless-gpu.sh, scripts/test-static-cuda-profile.py (CMake of engine/strata)
- scripts/compare-real-tokenizer.py, scripts/smoke-mtp-pack.py (reads src/core/mtp.cpp and a bench manifest), scripts/prepare-keyless-routing.py and its test
- scripts/smoke-native-pack.py became scripts/native-pack-fixture.py: the synthetic GGUF fixtures the four other smokes import stay, the iq_pack.py oracle comparison goes

Gates and CI
- scripts/check-local.sh: no live Python oracle differentials, no literal_port note, no check-cu, no build-cpu, no retired test scripts
- .github/workflows/linux.yml: the keyless-cuda, static-cuda-package and hosted-cuda-package jobs (they built the engine from the tree) and their dispatch
  inputs, and the two oracle smoke steps; .github/workflows/port.yml: the Python oracle environment and the llama.cpp fetch of port-oracles
  (the sampler host shim still runs)
- limits.json and scripts/check_limits_test.py exclude third_party/strata/ instead of engine/strata/

Documentation and comments: README.md names third_party/strata and the pin; deploy/README.md marks the retired build and smoke commands; comments
in Rust, Python and Markdown that named engine/strata/... now name "Strata 41cf05a0, ..."; the gpu-bringup scratch-copy test no longer copies the
removed include directories. Stale engine/strata paths in sealed .cu, .ptx, seal-plan and MANIFEST files are left as they are (hashes may depend on the bytes).
2026-11-23 21:19:11 +01:00
Pavlo Ratushnyi 966c3fc233 cuda-driver: a Context captures the serving context it is created for, and the qsa sites read it from the Context (STRA-338)
Device::create_context_serving fixes the ServingContext (cell count and RoPE constants) of one Context in Retained.serving; create_context takes the process value once, at creation. Context::serving() / serving_geometry() replace the ~55 reads of cuda-model geometry() / serving_context() in qsa_prompt_index, qsa_prompt_kv, qsa_index_ffi (Arguments::for_launch takes the ServingContext), qsa_prompt_host_ffi (MappedAllocation::new takes the geometry), the resolver and qsa_fixed_kernels. cuda-model geometry() is deleted; the KV window file becomes context_serving.rs; ServingContext::resident_pages_for carries the window arithmetic. The engine call site OriginalQsaMappedPrefix::validate_retained(context) takes the Context (this signature change completes the call-site edit that commit 1 already carries, so commit 1 alone does not compile: merge the branch as a whole).

Behaviour notes for review: the ScoreTC reach check against max_blocks moves from launch time to argument-build time (same error value). OriginalQsaMappedSnapshot::logical_payload_eq no longer re-checks end against the serving cells (a diagnostic comparison; the owner validates snapshots on every use). The old process-wide guards only fired for a second load with different values in one process.
2026-11-23 21:16:57 +01:00
Pavlo Ratushnyi 1e5e5e14c6 cuda-driver: the resident KV window belongs to the Context its owners are made from, not to the process (STRA-338)
Context::configure_kv_resident fixes the window of one Context (Retained.kv_resident) and streamed QSA owners size their pool from c.kv_resident_pages(). The process cell KV_RESIDENT and configure_kv_resident / kv_resident_cells / kv_resident_pages leave cuda-model and the driver exports; the serve stack open phase configures the window on its Context (that call site already changed in the previous commit). Behaviour note: the old process-wide guard "resident KV window already configured differently" fired only for a second load with another window in the same process; a fresh Context after Unload now accepts another window.
2026-11-23 21:12:58 +01:00
Pavlo Ratushnyi b4db01728c Keep the Strata files Rust and the product read in third_party/strata (STRA-406)
Owner decision 2026-11-23: the vendored Strata tree engine/strata is removed for good. This first step moves what is still read
at build, test or ship time into one small directory, byte for byte:

- third_party/strata/LICENSE (MIT; `leleka engine license` embeds it, the packagers ship it)
- third_party/strata/ggml/LICENSE, project-maya/LICENSE, project-maya/NOTICE.md (licence texts the release packager ships)
- third_party/strata/serve/chat_template.jinja (one copy, embedded by control-plane server_api.rs and gateway-text prompt.rs)
- third_party/strata/serve/chat_golden.json (gateway-text prompt tests)
- third_party/strata/tests/data/native_experts/*.txt (control-plane native_pack tests)
- control-plane/tests/mcp_hub/mcp_fake_server.py next to its test harness
- third_party/strata/UPSTREAM.md replaces engine/upstream.md: pin 41cf05a0, URL, the 25 locally patched files, where the removed tree is in history

include_str! paths, deploy/build.rs (the `leleka version` Strata pin now reads third_party/strata/UPSTREAM.md), Dockerfile.static-cli,
.dockerignore, .gitattributes, the release packagers (package-5090.sh, package-release.py: the subtree facts of the removed tree are
dropped from PROVENANCE) and the evidence capture scripts follow the move. The tree itself is deleted in a later commit.
2026-11-23 21:11:53 +01:00
Pavlo Ratushnyi e3209650b5 engine: every Position takes its dimension from the model binding it belongs to, not from the process serving context (STRA-338)
BindingIdentity and ModelBinding carry position_dimension(), built from the serving cells the binding captured when the model was bound. contract::position_dimension() (a read of the driver's process serving context) is deleted; the ~50 call sites in production code use the binding they already hold, tests use a cfg(test) trained_dimension() (262144 cells). No behaviour change: production binds the model after the context is admitted, so both values are the same.
2026-11-23 21:10:55 +01:00
Pavlo Ratushnyi 81039bb407 Merge claude/debt-final-ctx: settings catalogues and serving cells replace function-local env caches and process-global reads (STRA-338)
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Successful in 1m34s
Rust port / port-linux-tests (push) Failing after 3m8s
Rust port / port-fast (push) Successful in 5m37s
Linux / verify (push) Failing after 10m25s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Rust port / port-oracles (push) Successful in 11m25s
Linux / release-cli (push) Skipped
Product / product (push) Failing after 16m39s
2026-11-23 18:47:06 +01:00
Pavlo Ratushnyi 15778f67ee Drop the Rc import the binding seal left unused in the test fixture (STRA-338) 2026-11-23 17:16:49 +01:00
Pavlo Ratushnyi e6a0a56007 Drop the two imports the settings catalogue and the binding seal left unused (STRA-338) 2026-11-23 17:14:00 +01:00
Pavlo Ratushnyi 5ce8b3dd98 architecture.json: say why the two QSA geometry readers of the engine remain (STRA-338) 2026-11-23 17:10:32 +01:00
Pavlo Ratushnyi 38fc49e0dc engine: the speculative controller, its draft preparation and the prefill records take the serving cells from the binding
SpecContext (request ceiling and serving cells) replaces the bare max_context of SpecConfig and OriginalServeSettings; DraftPreparation and PrefillRecords keep the serving cells they were made for. The stack open passes the bound of its model binding. Three more process-global exceptions are deleted. STRA-338
2026-11-23 17:09:38 +01:00
Pavlo Ratushnyi c9f152992c engine: the model binding carries the serving context in cells; the validators take the bound from it
InputConstants and BindingIdentity capture the serving cells when the model is bound (the one read of the driver's context, contract::serving_cells). Seventeen validators (MTP frame, dense KV, snapshots, chunk charges, window limits, stack config, prompt plan) now receive the bound from the binding they already hold instead of reading the process-wide context; two redundant checks next to a context_length comparison are dropped. The laptop and prefix smokes fix their geometry before they bind the model. Seventeen process-global exceptions are deleted. STRA-338
2026-11-23 17:01:27 +01:00
Pavlo Ratushnyi 5fe30673c6 native-cpu-expert: the kernel A/B switches, the CPU probes and the dispatch are a Setting catalogue in settings.rs
Eight files kept their own OnceLock next to a settings::var parse (or a CPUID probe); they now ask settings.rs for a named Setting (same variables, same defaults, same parse, computed on first use). Eight process-global exceptions are deleted, one for the Setting cell is added. STRA-338
2026-11-23 16:46:06 +01:00
Pavlo Ratushnyi 44c65e3ce0 cuda-driver: operator settings and marker files live in the settings catalogue, not in ad-hoc OnceLock cells
Eleven call sites cached their own parse of an environment variable in a function-local OnceLock; they now ask settings.rs for a named cell (same variable, same default, same parse, read on first use). The three copies of the 250 ms marker-file poll become one MarkerFiles type. Eleven process-global exceptions are deleted; STRA-338
2026-11-23 16:43:07 +01:00
Pavlo Ratushnyi e7cbaf4a9c cuda-model: EnvSetting<T> and LazySetting<T> beside EnvSwitch (a typed operator setting read once)
EnvSwitch becomes the alias of EnvSetting<bool>; EnvSetting carries any value a rule parses from one variable, LazySetting a value one function parses from several variables or from the host. STRA-338
2026-11-23 16:43:06 +01:00
Pavlo Ratushnyi cb8ee9bf68 Merge claude/debt-final-pool: static dispatch over the expert pool replaces dyn OriginalServePool (STRA-338)
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Successful in 1m34s
Rust port / port-linux-tests (push) Failing after 3m29s
Rust port / port-fast (push) Successful in 5m37s
Linux / verify (push) Failing after 8m37s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Product / product (push) Failing after 15m23s
Rust port / port-oracles (push) Successful in 11m25s
2026-11-23 16:24:46 +01:00
Pavlo Ratushnyi 51b10c9f1b Merge claude/debt-final-inject: MemoryServices and VerifyPolicy replace the process-global governor, inventory and stamp registry (STRA-338)
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-linux-tests (push) Failing after 3m12s
Rust port / port-typecheck (push) Successful in 1m19s
Desktop foundation / core (ubuntu-latest) (push) Successful in 4m2s
Rust port / port-fast (push) Successful in 5m2s
Linux / verify (push) Failing after 9m2s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Rust port / port-oracles (push) Successful in 13m50s
Product / product (push) Failing after 17m35s
2026-11-23 15:05:25 +01:00
Pavlo Ratushnyi 3ec2bf192b Drop the glob re-export and the import the singleton removal left unused 2026-11-23 12:32:46 +01:00
Pavlo Ratushnyi d4aba09cab leleka-inference: tests of the verification flags (the policy belongs to its command line, not to the process) 2026-11-23 12:19:39 +01:00
Pavlo Ratushnyi 82c306b49e engine: one MemoryServices and one VerifyPolicy per engine, injected from the composition root; no process-global governor, inventory or stamp registry
spawn_backend_configured creates the MemoryServices (the first Load installs the governor into it, at the same moment
as before) and hands it to the owner thread (LoadEnv), the Original runner (Run, ReopenEnv, GenerateEnv), the stack
(StackConfig.memory) and the status proxy. The prefix cache, the conversation device, the expert tier, the inventory
classes and the page-cache release ask it instead of Governor::global. NativeBackendConfig.verification carries the
stamp policy of leleka-inference (--verify-stamps, --verify-rehash, --kar-attested-by-stamp) to the shard and archive
verification. The nine Governor::global exceptions of architecture.json and the three singleton exceptions of
leleka-memory and leleka-model-format are deleted; the smokes and probes make their own services.
2026-11-23 12:16:30 +01:00
Pavlo Ratushnyi 7088fd772f model-format: VerifyPolicy (stamp directory and archive attestation) replaces the process-wide stamp registry
verify_stamp::set_global/global and set_attested_archive/attested_archive are gone. The operator binary builds a
VerifyPolicy from its flags and the loaders receive it: VerifiedGgufFile::open_with and
VerifiedKarPleArtifact::verify_under take it; open, verify and verify_sparse keep their signatures and hash in full
(the default policy vouches for nothing), which is what a process that never set the globals did (STRA-338 S13).
2026-11-23 12:16:22 +01:00