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>
With part of a file-mapped bank page-locked (`pin_resident`), an H2D copy that starts in registered pages and
runs into unregistered ones is refused by the driver (CUDA_ERROR_INVALID_VALUE, first seen on the laptop run).
`MappedExpertBank::copy_pieces` cuts a `cache_source` slice at every registered boundary and the four copy
sites (prompt copy ring, cache fill, swap fill, PCIe staging) issue one copy per piece; one piece when nothing
is locked, so the default path is unchanged. original_bench.sh: the `strata` binary takes the generate
options directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tokenizer example `chat_tokens`: one user turn per line, thinking off, to comma-separated IDs, so both
engines get exactly the same token IDs (benchmarks/laptop/prompts.txt: 3 prompts, 78-88 tokens).
* leleka-runtime ignored test `original_serve_laptop_bench`: opens the Original serve stack with the
low-RAM sources (mapped experts, read-only KAR file; resident/memfd still selectable), serves every prompt
REPEAT times greedily and prints TTFT, prompt/decode phase times, prefill/decode tok/s, memory and the
output IDs of the first pass.
* scripts/laptop: original_bench.sh drives the unmodified `strata generate --serve` (setup.py's IQ3_S
arguments, conversation cache off, one GEN at a time, TTFT to the first T line); port_bench.sh runs the
test; monitor.sh samples process RSS/anon/file/shmem/locked/pinned and GPU VRAM once a second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>