E2E at high cache-hit + concurrency exposed a vicious cycle: a context stays active until finish, but the notifier re-fires every layer on every subsequent forward and note_enqueued counted each, so _enqueued (the finish target) grew by the layer count each forward (target=3042-5538 observed) faster than 4 workers can drain -> finish never reaches it -> 30s timeout -> context stays active -> repeat. TTFT p99 = 116s. Fix: note_enqueued(layer_id) dedups per layer (target caps at the layer count); the first fire for a layer is from the request's own forward so its event is correct. Also guard register() against overwriting an active room (was leaking + re-registering, registered=917 for ~100 reqs). 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.