Repository navigation
[CI] radix-cache: Split unified radix cache unit tests into topic files and a shared kit - #45236
Conversation
…d the insert walk mixin into the fixtures
…unsupported configs instead of skipping
# Conflicts: # python/sglang/test/kits/unified_radix_cache_unittest/fixtures.py # test/registered/unit/mem_cache/test_mamba_path_state_cap.py # test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_core.py
# Conflicts: # test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_core.py # test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_hicache.py # test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_load_back.py # test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_storage.py
…and the hicache support check
…topic modules; move every test-file helper into the kit; public kit names
…ts through kit helpers
# Conflicts: # test/registered/unit/mem_cache/test_unified_radix_cache_unittest.py
|
/rerun-test test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_core.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_hicache.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_insert_walk.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_kv_events.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_load_back.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_storage.py test/registered/unit/mem_cache/unified_radix_cache/test_unified_radix_cache_rust.py test/registered/unit/mem_cache/test_unified_cache_linker.py test/registered/unit/mem_cache/test_hicache_write_back_ordering.py test/registered/unit/mem_cache/test_mamba_path_state_cap.py |
|
/tag-and-rerun-ci |
|
🚀 |
…split routing test The unit-test split in #45236 removed the module-level helper that built a registry component bound to a mock cache, together with its last callers. test_split_action_without_ack_still_reaches_full needs a real FullComponent whose apply_component_action can be wrapped, so bring the helper back next to TestUnifiedRadixCacheActionRouting, unchanged.
…split routing test The unit-test split in #45236 removed the module-level helper that built a registry component bound to a mock cache, together with its last callers. test_split_action_without_ack_still_reaches_full needs a real FullComponent whose apply_component_action can be wrapped, so bring the helper back next to TestUnifiedRadixCacheActionRouting, unchanged.
…split routing test The unit-test split in #45236 removed the module-level helper that built a registry component bound to a mock cache, together with its last callers. test_split_action_without_ack_still_reaches_full needs a real FullComponent whose apply_component_action can be wrapped, so bring the helper back next to TestUnifiedRadixCacheActionRouting, unchanged.
…20 commits since 12dc623 @ merge-sgl-project#4) Conflicts: 167 files (149 content / 14 add/add / 4 modify/delete) at the settled 309 tip d28e7cd -- dossier predicted 146 +/-25; the +21 shift is entries 275-309 landing qsa-ring/hicache-ctrl/gdn/moe/llguard deltas into the conflict zone. By class: A 13 (auto-takes-upstream, dedupe-verified), B 80, C 56, D 18. 102 TODO(merge5) re-plant/fold markers planted: B1 x15, B2 x29, B3 x12, B4 x23, B5 x23. Re-plant stock: 117 files under /tmp/opencode/merge5-dossier/replant/ (76 fork-hunks patches, 19 upstream-side patches, 14 AA fork copies, 8 preremove snapshots) -- sessions 2/3 re-plant from real code, not memory. D-list outcomes (must-not-auto-resolve, handled personally): - sgl-project#45289-vs-sgl-project#44858 (entry 301): VERIFIED, not re-resolved -- the gate/up-order final form is in origin/main (5b1dbc2 in range); scales test taken as upstream oracle, fork 191-line version saved to replant/ for B5 diffing. sgl-project#44858's call-site shape CANNOT survive (our base never had it). - entry-230 dispatcher vs sgl-project#44993/sgl-project#44994: took upstream structure in token_dispatcher/standard.py; published-value CONTRACT lives upstream via get_moe_runner_backend() in the LoRA-EP guard; fork's warn-once mismatch diagnostic re-plants (B5 marker). UNION GATE: standard_dispatcher 16P (was 12P, suite grew), model_overrides 121P/1S/210sub (was 112P/1S/181sub), fold probe 6P/2F (upstream added a runner_backend arg to the predicate -- B5 re-pins the probe). - entry-219 gauge names vs sgl-project#43727 return + sgl-project#44968: PER-POOL NAMES KEPT as the serving schema -- hicache_host_pool_{used,total}_tokens{pool} dataclass fields, Gauge registrations and labels(pool=) emission re-restored over the #4697x structure; hicache_host_pool_evicted_tokens_total already survived auto-merge; producer dict restored by union in metrics_reporter. ANTI-NEEDLE SATISFIED: old mamba-only gauges are NOT the serving schema. - entry-221 eager-direct add/add: DEDUPED to upstream (bodies identical except est_time 15->9); MEASUREMENT DEBT RECORDED: prefill t/s must be re-measured post-B4 before trusting the est_time. - entry-168 D2H fence vs sgl-project#44800: the fence is ALREADY UPSTREAM (both load_fence_stream + write_fence_stream with the load-thread-corruption comment in origin/main's cache_controller.py) -- nothing re-planted; the two real regions resolved as import-union + comment wording (merge sgl-project#4 stale-tail pattern avoided). Fork hunks still saved to replant/ (belt). - entry-209 clamp + 216/218 ordering + 288-295 hicache-ctrl-era vs #46970x KV rewrite: ADOPTED-UPSTREAM across unified_radix_cache/hicache_storage/ hybrid_cache_controller/memory_pool/kv_cache_builder; EVERY fork hunk extracted to replant/*.fork-hunks.patch; B3 re-plant markers planted. sgl-project#45703's short-full-match seam arrives with upstream. - sgl-project#45090 SGLANG_ENABLE_UNIFIED_RADIX_TREE: REMOVAL TAKEN (fork had already moved it to _DeprecatedEnv; now gone). grep: ZERO .py readers repo-wide; 2 upstream-owned docs jsx snippets still export it (deepseek-v4, glm-5.2 -- upstream's own debt). OPERATOR-OWED CHECK: confirm no /root harness exports it (unreadable from this seat). - sgl-project#39727 unified L3 key: VERIFIED OPT-IN -- merged hicache_storage.py keeps the DEFAULT legacy suffix composition _<model>_<tp_rank>_<tp_size> (content-anchor: HiCacheFile._init_config_suffix, raise-guarded when _unified_chunk_spans is set). ANTI-NEEDLE: no silent key-scheme switch; warm /root/hicache_store contents stay addressable. Modify/delete (4, all victims of upstream sgl-project#45672 test prune + URC split): - test_unified_radix_cache_unittest.py: REMOVED (adopted split) -- its bare unified_tree_core_inspector imports are unreachable post-sgl-project#45236 re-home; fork source + hunks saved; B2 marker planted in the new core test. - test_fused_moe_triton_config.py: REMOVED -- imports common_utils, absent from both sides post-sgl-project#45672; the 2 live entry-3/235 tests re-plant in B2. - test_scheduler_batch_is_full_latch.py: REMOVED -- fork delta was 3 stub-attr lines documenting sgl-project#46643's absorbed arms; upstream deletion correct. - test_qsa_kv_pool.py: KEPT -- fork's 147 added lines are entry-187/200 sharding + 285-287 QSA-ring tests with NO upstream replacement; qsa_kv_pool.py sides converged byte-identical; collects clean. B2 marker. Cascading silent-auto-merge repairs (classes not in the conflict set but broken by auto-merge + union splices -- all found by gates, now fixed): kernels/ops/activation/__init__.py (dead _CUDA registration dup), kernels/ops/ diffusion/__init__.py (5-tuple _SPECS entry), kernels ops embeddings/moe/ attention/mamba __init__ (KernelSpec fields removed upstream: description/ format_signature stripped, CapabilityRequirement->CUDA_ONLY), base_runner/ eager_runner cp_extend + shared_read_event imports retargeted per upstream's "no imports in runner_utils/__init__" contract, and 4 fork helpers grafted back onto their take-upstream homes because merged code/tests still import them (memory_pool.spec_intermediate_bytes_per_req, kv_cache_builder. _adjust_hicache_size_for_draft + _device_pool_size_per_token, hybrid_cache_controller.local_restorable_mask, validation_hook. validate_replayssm_spec_algorithm, arg_groups/moe_hook b12x validator). flashinfer_cutlass.py flipped to FORK-OWNED (b12x route is fork-only, 760 vs 95 lines; upstream sgl-project#44993 hunks = B5 fold patch saved). Silent-semantics notes: sgl-project#46127/sgl-project#44912 riders arrived via per-PR picks (union); sgl-project#45520 (entry 302) is STILL OPEN upstream -- entry-230 fail-safe layer stays as entry 303 records; if a future sync brings it, re-apply the fail-safe reads. qwen4_exp holder-contract fused (ctor takes optional batch). Gates at commit: import sglang OK (CVD=9, prod venv); check_registered_tests/ check_no_bare_pytest_main/check_no_registered_tests_in_package rc=0; ruff F821 +E9+format clean on the resolution set; collect-only over unit/{mem_cache, model_executor,distributed,layers/moe} = 4337 nodes, 3 ERRORS: 2x cargo/torch- sys libtorch probe (REPRODUCED IDENTICALLY AT THE PRE-MERGE TIP -- env issue, not merge damage) + test_hicache_async_ready_sync.py (entry-253-era attribute gone with the URC rewrite -- EXPECTED pre-B3). sessions 2/3 owed: B2 test re-home, B3 mem_cache+rust re-plant (+hicache-ctrl re-ports), B4 scheduler/admission, B5 moe/quant/dispatcher, B6 environ+C0a+ CAVEATS re-pin. PROD BOOT FORBIDDEN until B3 completes (209 clamp + 218 ordering re-plant).
…t) SESSION 2A COMPLETE Entry 311 records: the 9 cluster commits (2a5646b..1dc41b2) with per- cluster batteries; the sgl-project#46954 VERDICT + hunk-by-hunk DEDUPE TABLE (sgl-project#46954 itself NEVER MERGED upstream -- sgl-project#41187's collapsed-mask re-implementation is what arrived; (a) OURS re-planted, (b) OURS kept with the recorded UNION REFINEMENT -- mask packs only for TRAILING spans, non-trailing collectives BIT-IDENTICAL to upstream's shape, (c) assume_stored endpoint-proof re-planted, (d) aux-staging alloc_len sizing re-planted = the prod-highest- value hunk); the entry-219 PRODUCER closure (sgl-project#43727 arrived in-range as 26a1e51, the gauge-less layer DELETED per entry 219's ledger, per-pool serving schema CONFIRMED as the only producer, docs watch-sentence re-pointed); the entry-196 rust ADAPTER-CONTRACT repairs (mamba_value_seqlen kwarg + parent_node_id rename -- both live TypeErrors at the merged tip); the boot-integrity lossless-ring planting (CPU-PROVEN construction; every caller landed with THEIRS while the pool signatures were the dropped half); the 12 dropped storage_prefetch_lifecycle cases RE-HOMED (28P/31sub >= the 23P/28sub pin, all green unmodified against the B3-3 machinery). GATES: ** trailing_endpoint 17P/0F PROVEN at the final tree incl. the 2-rank gloo cases, and at every cluster checkpoint after B3-2 ** (the entry-209 DoD gate); the B3-2/B3-caused async_ready_sync collection error CLEARED (7P); ZERO non-environment failures remain in unit/mem_cache. NEW PIN (per-file, CVD=9, prod venv, new post-sgl-project#45232/sgl-project#45236 layout): unit/mem_cache 1753P/1351F/364S/4439sub/4err -> ** 1861P/1209F/364S/4514sub/ 2err **; the 1209F residue is 100% env class by per-file error taxonomy: 1056F = the upstream URC-split KITS' fixtures.py build_fixture get_device() "No accelerator" -- ENTRY 310's "the URC split files themselves are GREEN, honest skips" CLAIM IS CORRECTED IN PLACE (its own battery log shows core 27P/465F; the kits honest-skip DEFECT is B2 scope, recorded not fixed) -- 130F+2err = cargo/torch-sys (byte-identical pre-merge, the documented environment class incl. the draft_gate 4F / joint-allocation 47F / tri-reclaim 54F storm files reclassified EXPECTED-REPLANT->ENV), 23F = the No-CUDA class (kv_layer_router 3F + kv_storage_lifecycle 9F + kv_layer_access 5F + pricing_property 4F + decode_retraction 2F). Named-file pins recorded (trailing_endpoint 17P, fast_file 54P/13sub, sparse 13P/14sub EXACT, donated 17P/14sub >= 16P, fence 15P EXACT, lifecycle 28P/31sub >= 23P/28sub, ...). CAVEATS: the merge-era top bullet ANNOTATED (B3 landed, gate met, boot ban STAYS -- the rule's HiCache half is proven but sessions 2B/3 remain and this batch NEVER booted, per the era rule); the entry-310 damage-map mem_cache and trailing_endpoint rows annotated RESOLVED-AT-B3 with the F-collapse table; the synced-block INTEGRATION OWED line annotated B3 LANDED; marker census correction noted (tree carried 15 B3 markers, not 12; ALL consumed -- B2/B4/ B5/B6 diff-audited INTACT). Header: STACK -> qwennext-stack-311+merge5-b3-2026-10-29; +merge5-b3 wave tag; entries 1-311; tip -> 1dc41b2 (B3-9 = true code tip, docs above). wanted_stack: UNTOUCHED (no S-item changed by B3 findings -- recorded here). Debt list carried in the entry: rust cargo UNVERIFIED 932P pin (session-3 seat), entry-198 scheduler-side CATCHER cross-noted for B4, kits get_device skip defect for B2, NVFP4 dequant-workspace deliberately NOT restored (superseded). NOTHING PUSHED; tree clean; no GPU executed all session.
… C closure -- the post-merge port queue is now decided ARRIVAL SCAN (git log 12dc623..2a6c204 --grep) + LIVE gh STATE + head-sha comparison for EVERY deferred item. Verdicts: RELEASED-BY-MERGE: sgl-project#42689 (@ 7a632cf in-range -- the SECTION-B cherry is now redundant; behavior note rides the restart). CLOSED (C-items whose PRs arrived and whose integration this stack performed): C1 (the dedicated merge week WAS merge sgl-project#5; all eight precursor PRs in-range), C2 (sgl-project#44993/sgl-project#44994 -- B5), C3 (sgl-project#45232/ sgl-project#45236/sgl-project#45334 -- B2), C4 (sgl-project#45238/sgl-project#45241/sgl-project#45242 -- B3), C5 (sgl-project#44912/ sgl-project#44913 -- arrived; entry-230 canary re-planted as its guard), C9 (sgl-project#39727 -- verified OPT-IN, no purge; BOOT_DELTA anti-needle), C0a (arrival shas already recorded at entry 310 -- Section C now carries NO open code-integration items: C6/C10 retain only their explicitly-named docs/boot-measurement remainders, re-stated). STILL-OPEN: sgl-project#44342 (head unchanged; auto-merge comfort LOST to #46970x), sgl-project#46153/sgl-project#37106/sgl-project#32479/sgl-project#45391 (gh CONFLICTING -- stale bases, rebase before any port), sgl-project#41624/sgl-project#42525/sgl-project#42660/sgl-project#44462/sgl-project#35617 (open, heads unchanged), sgl-project#46191/sgl-project#39845-class (watch-list, none in range). HOLD STANDS (operator decision, binding): sgl-project#43356/sgl-project#46452/sgl-project#43240/ sgl-project#43471 KV route -- step-1 'MERGE sgl-project#5 lands first' is NOW MET; the sequence may be re-visited ONLY with the post-merge PCIe-IPC measurement at an operator sitting. sgl-project#44732: the 'one purge if done WITH the merge' premise LAPSED when merge sgl-project#5 completed without it -- later execution costs the SAME single purge once; no penalty, no haste. Recorded for the operator, not decided by B6.
- sgl-project#46991 made CacheInitParams.tree_components a read-only view of tree_slots, so the tests build their slots with tree_slots_of. - sgl-project#45236 moved the TreeCore inspectors into sglang.test.kits.unified_radix_cache; import them from there rather than as top-level modules, which no longer resolve. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- sgl-project#46991 made CacheInitParams.tree_components a read-only view of tree_slots, so the tests build their slots with tree_slots_of. - sgl-project#45236 moved the TreeCore inspectors into sglang.test.kits.unified_radix_cache; import them from there rather than as top-level modules, which no longer resolve. Co-Authored-By: Claude Opus 5.5 <[email protected]>
test/registered/unit/mem_cache/test_unified_radix_cache_unittest.pyinto six topic files undertest/registered/unit/mem_cache/unified_radix_cache/: core, hicache, insert walk, KV events, load-back, and storage.test_unified_radix_cache_rust.pyreruns all six on the Rust tree core and replacestest_rust_unified_radix_cache_unittest.py.python/sglang/test/kits/unified_radix_cache/kit, which hasconfig,fixtures(builders and node accessors),mixins(shared test steps), and one module per topic. Test files keep only the tests.requires_*decorators. A config a test does not support is no longer generated, so it no longer shows up as a skipped case.scripts/ci/rerun_test_groups.jsonto the new paths.CI States
Latest PR Test (Base): 🚫 Run #39341181835
Latest PR Test (Extra): ❌ Run #39341182098
Latest PR Test (AMD ROCm 10): 🚫 Run #39341181857