E2E diagnostic was precise: "finish TIMEOUT processed=78/79", submit_failed=0 — the per-layer notifier fires 78x but kv_data_ptrs has 79 layers (the 79th is the MTP/nextn EAGLE buffer: present in kv_data_ptrs so the monolithic send moves it, but it doesn't fire the per-layer hook). The old completion required all num_layers, so it both hung to the timeout AND would silently miss that layer's KV (corruption). Redesign: gate completion on the ACTUAL enqueued count (note_enqueued), and in finish() SYNCHRONOUSLY transfer any layers the notifier didn't fire for (KV is fully written post-forward, no event needed). Net: the per-layer set == kv_data_ptrs, byte-identical to the monolithic send; robust to any model firing fewer hooks than KV buffers. The fired layers stay overlapped with the forward. Unit tests updated (25 pass): fallback transfers the missed layers; submit failures still report -1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Registered Tests
Tests under this directory are auto-discovered by run_suite.py via CI registration decorators.
Where Should I Put My New Test?
No server / engine launch required
| What you're testing | Directory | Requires |
|---|---|---|
| Component logic in isolation (cache, scheduler, config, parser, etc.) | unit/<module>/ |
CPU or GPU |
| CUDA kernel correctness | kernels/ |
GPU |
Server / engine launch required (E2E)
| What you're testing | Directory | Requires |
|---|---|---|
| Model inference correctness | models/, 4-gpu-models/, 8-gpu-models/ |
GPU |
| Feature-specific (OpenAI API, LoRA, speculative, distributed, VLM, etc.) | openai_server/, lora/, spec/, distributed/, ... |
GPU |
| Benchmarks (performance, accuracy, stress) | benchmark/ |
GPU |
| Platform-specific | amd/, ascend/ |
Vendor GPU |
See unit/README.md for unit test conventions.