Allow exactly LELEKA_ROUTE_TAIL_SKIP and LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED in the profile engine_env allow-list, set them in rtx5090-32g, -file and -gguf-ple (laptop profile unchanged), tests, docs/deploy.md, step-ledger H9, plan stage 6f, AGENTS.md exception note. The quality gate was assessed and its open points (logit envelope 3.6 % against 2.8 %, ttt rounds) were overridden explicitly by the owner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7.1 KiB
7.1 KiB
Repository instructions
Read PROJECT_CHARTER.md before changing architecture, performance policy, or scope. The charter is the source of truth for goals and milestones.
Priorities
- Preserve protocol correctness and successful task completion.
- Preserve model quality and tool-call integrity.
- Improve end-to-end agent throughput, then decode/prefill throughput.
Change rules
- Keep production serving independent of Python. Python is allowed for offline conversion, calibration, experiments, and evaluations.
- Keep model weights, request captures, credentials, logs, and generated artifacts out of Git. Use external volumes or ignored local paths. Sanitize any fixture committed to the repository.
- Do not enable lossy optimizations by default until their separate quality gate passes. Mark experimental modes explicitly. Recorded exception: the 5090 profiles run the lossy route tail skip by default, an explicit owner decision of 2026-11-13 that overrode the open points of its quality gate (
docs/deploy.mdsection 4). - For non-lossy changes, compare greedy output or tensor values against the defined baseline and record numerical tolerances.
- Do not label a change as a performance improvement without paired A/B measurements on the same workload and a quality result. Record hardware, software, model digest, configuration, cache state, token counts, and distributions as required by the charter.
- Do not conflate a synthetic kernel gain with an end-to-end agent workload gain. Report both when relevant.
- Dependency direction, file sizes and source patterns are gated by
scripts/check-architecture.py(policyarchitecture.json, debtarchitecture-baseline.json, run byscripts/check-local.sh --product). A number in the baseline may only fall; lower it with--update-baseline, never raise it without--allow-increaseand a reason in review. - Keep the Strata upstream commit and local changes traceable. Do not overwrite or silently replace the upstream provenance record.
Repository state
The Strata source is present under engine/strata/ at the commit recorded in docs/upstream.md and is not modified. engine/strata is the
reference (the "Original"); the product is the Rust/CUDA port of its Original mode17 serve path:
crates/engine-qwen35-cuda(the Qwen3.5 CUDA engine family: prefill, MTP speculative decode, expert tiers, KV streaming;crates/leleka-runtimeis its facade),crates/engine-core(the pure engine domain: prefix cache, conversation policy, prompt plan, speculative-decoding policies, request lifecycle, theEngineFamilyseam),crates/engine-fake(the scripted engine family for GPU-free tests),crates/cuda-driver(CUDA Driver API, sealed PTX, NVML sampler; its pure host-side models arecrates/cuda-model),crates/leleka-memory(memory governor, pressure gate, telemetry),desktop-coreandcrates/runtime-client(the gRPC contract between the engine process and the gateway),control-plane(HTTP/Responses gateway),crates/deploy(thelelekabinary:up/run/status/verify, memory profiles, resource presets).- The layers (L0 to L4), the ports, how to add an engine family and what the architecture gates check:
docs/architecture/hexagonal.md. - Measured on an RTX 5090 server with real Codex CLI sessions (
docs/e2e-run.md,docs/ledger.md,docs/quality-gate.md,docs/prefix-cache.md,docs/deploy.md,docs/roofline.md); the RTX 3080 laptop is a secondary, experimental target (docs/laptop-profile.md). - The port is complete for the 5090 serve path; open work is listed in
docs/port-remaining.mdand the ledger. - The CPU/iGPU/NPU runtime for gpt-oss (
crates/cpu-*,gptoss*,harmony,igpu*,npu-*,gguf,kar-codec;docs/cpu-runtime.md) is served through the same control plane:codec::TextCodecselects the family (Qwen3.5 or gpt-oss/Harmony) andengine.extra_workersruns a worker pool (docs/worker-pool.md). The pool,lazy_load/idle_unload_s,visionand theruntimeblock are separate modes; the config rejects combining them (docs/api-contract.md).
Worktrees
- Create worktrees inside the main repository's git directory, never as sibling folders of
~/work:scripts/dev/worktree.sh new <name> [<branch>]makes.git/wt/<name>. The files are ordinary; only the location is hidden from the file listing. - Clean up when a branch has been merged:
scripts/dev/worktree.sh cleanlists the clean, merged worktrees and--yesremoves them. Uncommitted changes block the removal; commit them to the branch first. Do this at the end of every task that created a worktree and before starting a new batch, so no more than a handful exist at a time. - Build output (
target/,dist/) lives in the worktree and goes with it; a removed worktree never deletes its branch.
Workspace layout
One folder per machine (owner rule, 2026-10-29). Outside it, read only: no creating, moving, renaming or deleting anything, and no relocating other people's files.
- Laptop:
C:\Users\pavel\work\leleka(worktrees, build output and run directories under.git/wt). Never create, list or clean sibling folders of the repository, and keep WSL builds inside it too (CARGO_TARGET_DIRinside the worktree). - 5090 server (
rnr5090):~/work/leleka/only, the same name as on the laptop. It is a symlink to/data/leleka-e2e/because the root disk is small; the data lives on/data. Do not add anything to~/workitself or to any other folder. Known exception until the holder is re-homed: the GPU queue (~/work/gpu-runs/holder2/jobs/stubs andPRIORITY) is written there, nothing else. - Models live inside the work folder too (owner decision, 2026-10-29): server
~/work/leleka/models/{leleka-gates,deepseek-v41-flash}/(absolute/home/para/work/leleka/models/...), laptopC:\Users\pavel\work\leleka\models\. Scripts, profiles and docs name those paths; a model path outside the work folder is a bug. - Name each path after its task (
<task-id>or<task-id>-<purpose>); one directory per task, not one per attempt. - Clean up your own paths at the end of the task. Do not hard-delete: anything deletable goes into the
garbage/folder inside the work folder (laptopleleka/garbage, server~/work/leleka/garbage) with a line ingarbage/LOG.txt. The owner empties it. - Evidence cited in a task record keeps its path until the cited change is merged; after a move, update the record with the new path.
- An agent's final report lists every path it created, and any path outside the places above is moved in before the task is closed.
- Measurement inputs are not scratch: a corpus, expert profile, prompt set, binary or helper script that a measurement depends on lives in one named directory (server:
/data/leleka-e2e/decode/or the task's own directory), is frozen read-only, and is recorded with its sha256 in a manifest and in the run metadata. A run refuses to start when an input is missing or its digest differs. Never read an input from~/work, a home directory or a sibling folder that nobody owns. The 2026-10-29 incident: the 245k corpus lived in an unowned folder, a cleanup removed it, and the "256k" session silently became ~300 tokens.
Read engine/strata/AGENTS.md before modifying imported engine code.