The flag-on 2b.3 bring-up (--enable-cp-shared-physical-l2-hicache, real GLM-5.1
PD traffic) surfaced two partial-adopt gaps from the piecemeal 2b.0/2b.1b ports
from l2_pooling — a caller brought in without its callee/declaration. Neither
was caught by the pool unit tests or import smoke (they don't exercise the
device-allocator load path or the flag-on capacity-snapshot path); only live
flag-on traffic hit them.
1. environ.py: declare SGLANG_CP_HICACHE_VERIFY_SNAPSHOT (EnvBool, default False).
hiradix _cp_host_capacity_snapshot (:1477) reads it to gate a fail-loud
running-count drift verifier (_cp_walk_capacity_counts vs _cp_counts), but the
env field was never declared -> AttributeError crash on the first flag-on
scheduler tick. The verifier IS fully implemented (it's the count-machinery
analog of the placement_digest assert) -- keep it, default-off (expensive
full-walk; on in bring-up/CI).
2. allocator.py: restore alloc_pages_for_shared_l2_load (thin wrapper over the
adopted alloc_pages_with_owners) on the CP shared paged allocator. 2b.0 ported
the callee but dropped this wrapper that cache_controller.load_cp_shared_l2
calls -> RuntimeError on every L2->L1 cache-hit reload until restored.
Validated live: prefill boots with the flag, shared-L2 slab constructs over
hugetlbfs on all 8 ranks, write-through + load-back + cache hits + coherent
output all work, placement_digest assert green (no divergence), no crash.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>