Add scripts/e2e/evidence/capture.py, which builds one S0.1 END_TO_END record for the
ours arm from the meta file, the replay output, the engine logs and the power series.
analyze_session.py is wrapped by subprocess (--csv), never imported or edited.
Add test_capture.py (19 CPU-only stdlib tests, fixtures built in temp dirs).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds scripts/e2e/evidence/validity.py (E2 validity rules, E1 balanced-schedule check, E8
ledger/manifest cross-check; countable is derived, never typed) and test_validity.py.
The STRA-311 golden vectors pass unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Port of the safeguards of scripts/laptop/monitor.sh and lap_run.sh to
PowerShell 5.1: preflight refusal (exit 4), 1 Hz sampling with a 5 s
nvidia-smi call timeout, stall check off the sampler thread, kills only
the PID tree it spawned, fail-closed on enforced.power.limit N/A/absent,
caller-set timeout, 120 s / 600 s cool-down, exclusive machine lock
(CreateNew + FileShare.None) with runner-lock verification, sample series
file with sha256 and thresholds_source, injectable clock / -TimeScale.
test_watchdog.ps1: 32 named cases against a fake nvidia-smi shim, CPU only.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tests-first oracle written by SDET before series_eval.py (STRA-290) and
component_class.py (STRA-313): gen_exact.py (stdlib, independent: Fractions,
Decimal, integrated Student-t CDF cross-checked to published tables, Pocock
levels checked by numerical integration), series_cases.json (35 cases),
component_cases.json (27 component and AC5 cases), and the unittest
scripts/e2e/evidence/test_series_eval_golden.py. With the evaluators absent
every case fails with '<tool> not found'.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
57 synthetic cases with a written-out basis, an independent oracle (gen_validity.py --check)
and a unittest that runs validity.py through its INTERFACE v1; fails 57/57 until STRA-312 exists.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
COMPONENT_STARTUP, COMPONENT_TABLE and COMPONENT_KERNEL record schemas
(schema_component.json), validate_component.py (record / --negative-suite /
merge), one sample per level (two for start-up: ours and vanilla), a
negative-case table and 41 unittest tests. Shares the STRA-246 evaluator and
definitions; stdlib only, Python >= 3.9. Classes are computed elsewhere
(STRA-313); the validator checks presence and consistency.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Wraps scripts/quality/q_pair.py and q_tail_gate.py by subprocess; verdict identical / within recorded tolerance / differs,
tolerance needs --basis (exit 2), --lossy marks the block experimental, tool-call integrity from session output.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Second, separately written implementation of the series verdict (own Student-t
quantile, exact-fraction sums, strict / non-negative rules, n_eff, interim
looks, screening) with series, compare and golden sub-commands and 21 tests.
Imports nothing from series_eval.py or component_class.py.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
STRA-256's thresholds schema names the source S3.7; rename the enum value from S3.7_FILE in schema.json, the test and the countable-without-summary fixture.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New files only under scripts/e2e/evidence/: schema.json (v1), a stdlib-only
Python 3.9 validator that interprets it (validate.py, CLI v1: record,
--negative-suite, merge), three synthetic sample records, 33 neg_*.json
fixtures with their expected reasons, a placeholder row (b) environment
list, the charter 4.3 field map and 40 unittest tests.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LELEKA_PREFILL_QSA_PREFETCH, LELEKA_PREFILL_GDN_POOL and LELEKA_PREFILL_MOE_SPAN_CACHE now default on (=0 restores the old path). R hash of every prefill chunk and top-16 rows
identical on 945-codex-crm (108 chunks) and night5-long-256k (34 chunks); paired replay at chunk 8192: prefill chunk time at >= 100k -2.8 % (QSA -6.2 %, MoE -3.5 %, GDN at noise).
Real-stack A/B (rest-e2e-ab2) queued, not yet measured. docs/upstream-port-plan.md section "Closing the host gaps between dependent phases".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Activates the ASUS Turbo scheme, turns off sleep/hibernate/display-off/lock-display-off on mains power and prints the GPU power limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The pass (PrefetchVirtualMemory on 3 ranges per missed expert, then a touching phase) ran before the compute and took 70-75 ms of a
165 ms window; the compute faults the pages in itself, overlapped with its work. LELEKA_CPU_PREFETCH=on|off, and
LELEKA_CPU_PREFETCH_OFF_FILE / LELEKA_NO_TRIM_FILE for A/B inside one engine. scripts/e2e/decode_ab.py: decode-only A/B at depth.
docs/laptop-vs-vanilla.md section 7.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka_qsa_topk_wide (also _sample/_wide_failed, measured and not used) in qsa_late.cu; leleka_qsa_topk_cluster in the new sealed asset qsa_cluster.cu (sm_90+,
no sm_86 companion); cuLaunchKernelEx plumbing for KernelModule and the verifier window (Launch.cluster); policy.qsa.cluster_topk. Same ids as qsa_topk_ref in
every model-free case (continuous, heavy tailed, tied, all equal; prompt tiles of 256 rows and decode calls of 1..5 rows up to 261,500 tokens).
LELEKA_QSA_TOPK=wide (prompt, from 10,000 blocks) and LELEKA_QSA_CLUSTER=1 (decode window) switch them on; defaults off until their R gate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings the Rust/CUDA port of the Strata mode17 serve path together with the
CPU/iGPU/NPU gpt-oss runtime that main gained meanwhile.
Control plane: the Qwen tokenizer is the implementation behind the Qwen35
variant of codec::TextCodec (qwen(), encode_prompt() widen the trait; QwenCodec
derefs to the tokenizer), so control-token marks, images, chat template, the
runtime backend and vision keep their behavior, while the gpt-oss/Harmony path
and the worker pool keep main's. Config carries the union of fields; extra_workers
is rejected together with runtime, lazy_load, idle_unload_s and vision; the
gpt-oss family refuses top_k/min_p/penalties (its GEN line has no such keys).
leleka-kar-codec takes f16_bits_to_f32 from leleka-quant-core (identical code).
Workspace members and default-members are the union of both sides.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The sealed chain_window assets conflicted: bringup sealed a new chain_window.ptx (entry chain_gr_down_t2w8_nb4, c9ccd81) while upstream-p0
clamped the q8_1 scale and sum in the opt-in chain swiglu+quantize entry (4654f01, plan row 1.1). Resolved from the bringup sealed file:
only chain_swiglu_quant_kernel was replaced (scripts/q8/splice_ptx.py), every other byte stays as sealed; the entry text is byte for byte what
scripts/q8/rebuild_quantizer_ptx.sh compiles from the merged chain_window.cu (nvcc 13.2.86, checked on the server).
Regenerated, not merged by hand: the pin in original_verify_window_chain.rs (scripts/q8/repin.py), and the sm_86 companions, MANIFEST.json and
sm86_table.rs (scripts/gpu-bringup/sm86_assets.py build: 132 companions, check OK). The six other quantizer PTX and their companions equal
upstream-p0's. docs/upstream-port-plan.md: rows 0.1-0.5, 1.1, 1.2 from upstream-p0, row 0.6 from bringup, merge note on row 1.1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A q8_1 block stores d = amax / 127 and the sum of its 32 activations as fp16: one massive activation (amax > 8.3 M, or a sum past 65504)
rounded to inf and the dot products then read inf * 0 = NaN (NonFiniteMmqOutput here, "!!!!" upstream). The quantizers now clamp both
to the largest finite half and keep the codes inside int8 (strata/kernels/q8_1_finite.hpp); a NaN input still gives a NaN sum.
Finite blocks are stored bit for bit as before.
Sites: head_quant (mtp_original_full_head_native, native_head_native), mtp_original_quantize (mtp_original_tail, mtp_original_full_checks),
quantize_q8_1_kernel (mtp_original_full_head_iq, native_head_iq: the routed experts' input and SwiGLU output) and the opt-in chain
swiglu+quantize (chain_window). Not taken: the MMQ prompt quantizers (ggml quantize_mmq_q8_1, mtp_prefill_q8), which upstream did not clamp.
The sealed PTX are patched entry by entry (scripts/q8): three were built with CUDA 13.0.88, which is not installed, and a recompile
renames the hashed anonymous-namespace entries; only the quantizer entries change, every other byte is the sealed one. Pins, the seal
plan digests and the sm_86 companions (sm86_assets.py build) follow. tools/q8-probe compares old and new PTX on the GPU.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No harness of ours reads the Original's logits dump (they use STRATA_LOGPOS rows, residual dumps and token outputs); the manual recipe in
docs/gpu-bringup.md now says to check the file first, because the pinned reference build predates the fix and writes a lying header on
native packs. scripts/quality/logits_dump_check.py refuses such a file.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>