Skip to content

[Chore] environ: Remove retired unified radix tree environment variable - #45090

Merged
alphabetc1 merged 5 commits into
sgl-project:mainfrom
alphabetc1:cleanup/retired-env-usage
Oct 20, 2026
Merged

alphabetc1 merged 5 commits into
sgl-project:mainfrom
alphabetc1:cleanup/retired-env-usage

Conversation

@alphabetc1

@alphabetc1 alphabetc1 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

SGLANG_ENABLE_UNIFIED_RADIX_TREE no longer controls cache selection: the unified radix tree is already the default. Its remaining references are a warning-only deprecation entry and obsolete assignments in cookbook commands and AgentX configuration data.

Modifications

Remove all remaining references to this retired variable:

  • The warning-only entry in environ.py.
  • Three DeepSeek-V4 cookbook command assignments.
  • Seven DeepSeek-V4 and three GLM-5.2 AgentX configuration entries.

Cache selection is unchanged. Setting the old variable externally now has no effect and no longer emits its deprecation warning. Other deprecated variables and Qwen3.8 documentation are unchanged.

The two AgentX files are generated snapshots. Their sync scripts are external to this repository; future regeneration should also omit the retired key. Historical images and external deployments were not revalidated; this cleanup targets the current repository/runtime.

Accuracy Tests

  • Full tracked-repository search for ENABLE_UNIFIED_RADIX_TREE: zero remaining matches, including canonical and legacy prefixes.
  • Inspected the cache factory and environment definitions: no functional consumer remains.
  • Both AgentX modules parse in Node. Recursive before/after comparison confirms their only semantic changes are the removal of the seven and three environment keys respectively.
  • Loaded the actual environ.py with the old variable set to 0 and 1: no descriptor, deprecation entry, or warning remains.
  • bash -n passed for all three modified launch commands.
  • Pre-commit and git diff --check passed.
  • Full Mintlify validation/link checks remain unverified: earlier attempts could not complete npm dependency installation (registry stalls / FETCH_ERROR).

Speed Tests and Profiling

Not applicable: no inference-path change. No GPU tests run.


CI States

Latest PR Test (Base): ✅ Run #39279562836
Latest PR Test (Extra): ❌ Run #39279562646
Latest PR Test (AMD ROCm 10): ❌ Run #39279562945

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 19, 2026
@alphabetc1 alphabetc1 changed the title [Doc] cookbook: Clean up retired environment variables for main [Doc] cookbook: Remove obsolete unified radix tree opt-ins Oct 19, 2026

@JustinTong0323 JustinTong0323 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alphabetc1 alphabetc1 changed the title [Doc] cookbook: Remove obsolete unified radix tree opt-ins [Chore] environ: Remove retired unified radix tree environment variable Oct 19, 2026
…-usage

# Conflicts:
#	docs/src/snippets/agentx/deepseek-ai/deepseek-v4.jsx
@alphabetc1

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Oct 19, 2026
@alphabetc1
alphabetc1 enabled auto-merge (squash) October 20, 2026 05:01
@alphabetc1
alphabetc1 merged commit 15e8e68 into sgl-project:main Oct 20, 2026
251 of 267 checks passed
@alphabetc1
alphabetc1 deleted the cleanup/retired-env-usage branch October 20, 2026 07:06
@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] Heads-up: #45513 regenerates the cookbook's AgentX data files (docs/src/snippets/agentx/), so SGLANG_ENABLE_UNIFIED_RADIX_TREE=1 comes back on the DeepSeek-V4 and GLM-5.2 lanes this PR edited.

Those files are generated: they mirror the launches that SemiAnalysis InferenceX ran and measured, in the image each run used. In some of those images the variable still matters:

  • In v0.5.17-cu130 and v0.5.18-cu130 (GLM-5.2 GB200 Dynamo+SGLang agg and disagg), it is a live EnvBool(False) that selects the unified radix cache (mem_cache/registry.py). Dropping it would launch the legacy radix tree, not what was measured.
  • In the 2026-09 nightlies and v0.5.19-cu130 it is deprecated. In dev-cu13-nightly-09242 it has no effect.

The rest of this PR is untouched: environ.py and the hand-written DeepSeek-V4 AMD commands. Please don't hand-edit the AgentX data files: the next sync overwrites them. If a mirrored launch needs a change, the sync's rules (or the InferenceX recipe) are the place for it.

detain added a commit to detain/sglang that referenced this pull request Oct 29, 2026
…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).
detain added a commit to detain/sglang that referenced this pull request Oct 29, 2026
… header STACK/tip updated, 5 owed-paragraphs marked HISTORY, CAVEATS top bullet = MERGE-sgl-project#5 ERA (PROD BOOT FORBIDDEN until B3: the 209 clamp + 218 ordering rule with the trailing_endpoint 17P->8P/9F proof-of-life-when-restored), wanted_stack Section C consumed (C0a CLOSED with the four arrival shas, C1-C6 ARRIVED per the merge-message D-list, C9 OPT-IN-verified, C10 sgl-project#45090 taken + the operator-owed /root-harness check, 33-trailer families spot-verified IN-RANGE, sgl-project#43216 DEDUPED); plus the kernels kvcache store_cache_fp8 registry graft found by the damage battery (kernels_namespace 107P/0F restored); battery damage map recorded in full in entry 310
detain added a commit to detain/sglang that referenced this pull request Oct 30, 2026
…stack-315-2026-10-29 + MERGE-ERA-CLOSED + CAVEATS master re-pin table + BOOT-closure bullet -- **THE MERGE ERA IS CLOSED**

HEADER: title -> qwennext-stack-315-2026-10-29 with the MERGE-ERA-CLOSED
line + the three new wave blocks (merge5-b5/b2/b6) + the session-3
updated: block; FIFTH MERGE block stamped with the sessions 1/2A/2B/3
completion map.

ENTRIES: 313 (B5, five cluster commits bea28f0..a8a6c62: every
marker's verdict + the cutlass/dispatcher/qwen4 boot-integrity items +
the honest env-baseline re-derivation), 314 (B2, three commits
e6f2d34..125785d: kits gate, 357-line body, five classes, NINE
cases + the take_decode PRODUCTION FIX + PLE return-None + the server-
boot gates), 315 (B6: server_args 7F->0F per-item, C0a + Section-C
closure, marker census 15-B1-survivors-WITH-REASONS (all diffusion, the
replay route on record, nothing serving-path), parked-queue re-triage
headline table, BOOT_DELTA disposition, and the BOOT-READINESS
STATEMENT).

CAVEATS: the merge-era top bullet rewritten to CLOSED (boot = single
operator judgment; sgl-project#45090 explicitly DOWNGRADED check-required ->
check-nice-to-have: the env is GONE from environ.py, /root exports now
inert, upstream docs snippets export it harmlessly against this tree);
NEW 'MERGE-sgl-project#5 CLOSEOUT RE-PIN @ 315 TIP' master table: managers 1056P/
2F/9S/474sub (HOLDS), spec 389P/0F/21S/242sub (+dflash ordered-flake
note), mem_cache NEW 1885P/153F/1447S/4518sub/2err (PURE ENV), topic
dir 40P/1255S, moe 43-file 650P/684S/194F/560sub, server_args 461P/0F/
276sub FINAL, distributed 156P/1S/35sub, model_executor NEW 517P/0F/
18S/301sub, observability/function_call/qsa-set/b12x/dispatcher/
overrides/probe/kernels_namespace/trailing_endpoint rows, CARGO
UNVERIFIED-DEBT EXPLICIT as the merge era's only open verification.
Marker-census sentence updated to the final reading.

HOUSEKEEPING: three patch-byproduct .orig files committed by B2-3's
sweep are removed; the missed fp8_blockwise B2 marker consumed (test
SUPERSEDES the 2 fork lines -- rows-4096 pinning strictly stronger);
session-changed files re-passed ruff format (30 whitespace-only).

GATES AT THIS COMMIT (CVD=9, prod venv, PYTHONPATH=python): import
sglang OK; CI trio rc=0 x3; fold+dispatcher+b12x+urc-topic+server_args
joint 472P/1280S/0F/270sub; tree clean after commit; NEVER pushed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek documentation Improvements or additions to documentation run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants