Keep EAGLE diagnostics from breaking disagg startup

The C32 startup audit was diagnostic-only, but it incorrectly read spec_algorithm from helper queue objects. PrefillBootstrapQueue and DecodePreallocQueue keep scheduler-owned runtime state instead, so the debug path failed before KV manager initialization could complete.\n\nUse scheduler.spec_algorithm for both startup audits and record the ownership rule in the page-aligned cache ledger.\n\nConstraint: Queue helpers do not copy every scheduler field onto self.\nRejected: Disable EAGLE accept diagnostics | would lose the draft-transfer evidence needed for the accept-len investigation.\nConfidence: high\nScope-risk: narrow\nDirective: Disaggregation helper diagnostics should read scheduler-owned runtime state unless the constructor explicitly copied the field.\nTested: Local py_compile for prefill.py and decode.py.\nTested: Local git diff --check.\nTested: Synced prefill.py/decode.py to g0034 and remote container py_compile passed.\nNot-tested: Full disaggregated startup and ETE traffic after this fix; user controls runtime launch and load generation.
This commit is contained in:
laoyao0822
2026-05-30 01:37:05 +08:00
parent b56a4f2e6b
commit 5f343c65ca
3 changed files with 19 additions and 2 deletions

View File

@@ -1966,3 +1966,20 @@ C32 correction update:
transfer surfaces are registered.
- Synced `prefill.py` and `decode.py` to remote `g0034:/mnt/beegfs/cjy/sglang-dev`;
remote container py_compile passed for the updated files.
### C33. EAGLE accept startup diagnostic must read speculative config from scheduler-owned state
Finding:
- Enabling `SGLANG_EAGLE_ACCEPT_DEBUG=1` caused prefill startup to fail in `PrefillBootstrapQueue._init_kv_manager()` with `AttributeError: 'PrefillBootstrapQueue' object has no attribute 'spec_algorithm'`.
- The diagnostic added in C32 incorrectly assumed the bootstrap/prealloc queue objects expose `self.spec_algorithm`. They only retain `self.scheduler`; the speculative algorithm lives on `self.scheduler.spec_algorithm` in these queue classes.
- The same incorrect diagnostic reference existed in `DecodePreallocQueue._init_kv_manager()`, which would have produced the analogous decode startup failure under the same debug env.
Correction:
- Read `self.scheduler.spec_algorithm.is_eagle()` in both prefill and decode KV-manager startup audits.
- This is a diagnostic-path-only fix. It does not change KV registration, cache ownership, transfer, prefetch, or EAGLE acceptance behavior.
Guardrail:
- Future diagnostics inside disaggregation helper queues should use scheduler-owned runtime state unless the queue constructor explicitly copies that state onto `self`.

View File

@@ -509,7 +509,7 @@ class DecodePreallocQueue:
len(kv_args.state_data_ptrs),
)
if envs.SGLANG_EAGLE_ACCEPT_DEBUG.get() and self.spec_algorithm.is_eagle():
if envs.SGLANG_EAGLE_ACCEPT_DEBUG.get() and self.scheduler.spec_algorithm.is_eagle():
logger.info(
"[EAGLE_ACCEPT_DEBUG] decode_kv_manager cp_rank=%s "
"target_kv_bufs=%s draft_kv_bufs=%s total_kv_bufs=%s "

View File

@@ -350,7 +350,7 @@ class PrefillBootstrapQueue:
len(kv_args.state_data_ptrs),
)
if envs.SGLANG_EAGLE_ACCEPT_DEBUG.get() and self.spec_algorithm.is_eagle():
if envs.SGLANG_EAGLE_ACCEPT_DEBUG.get() and self.scheduler.spec_algorithm.is_eagle():
logger.info(
"[EAGLE_ACCEPT_DEBUG] prefill_kv_manager cp_rank=%s "
"target_kv_bufs=%s draft_kv_bufs=%s total_kv_bufs=%s "