Files
sglang/test/registered/unit/mem_cache
leavelet 144ae7acb1 Regression test: CP HiCache L3 reload same-tick admit->reserve race
Drives _cp_l3_reserve_reloads directly against a real CpSharedL2PageAllocator:
- same-tick state (l3rl object committed-and-live + node attached -> attach_ok False)
  no longer raises 'duplicate live reservation'; the candidate is dropped and the
  request left un-held (re-matches the inserted node).
- WITHOUT the recheck (attach_ok forced True = pre-fix path) the identical state
  raises the duplicate error -> proves the recheck is load-bearing.
- an in-flight reload still piggybacks (recheck sits after the dedup, not before).
- a genuine clean miss still reserves (no false-positive starvation).

CPU unit test (register_cpu_ci, stage-a-test-cpu); runs in the dev-cu13 container.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 14:52:30 +00:00
..