fix(d2p): remove dangling logger.info refs in seeded_router
E4-v4 forensic: 1235/1285 requests failed with NameError: name 'logger' is not defined When commitb9b0cf0added agentic-side D→P orchestration, the post-call diagnostic was written as logger.info(...). But src/agentic_pd_hybrid/replay.py doesn't import the logging module nor define a module-level `logger`. v3 didn't hit it because config.enable_d_to_p_sync was always False (plumbing bug fixed inaf966f2). v4 with sync enabled tripped the NameError on EVERY reseed-path request → 96% failure rate. Fix is to remove the redundant logger.info — the structural log (`structural/d-to-p-sync.jsonl`, added ine729d62) already captures every prepare/dump/finalize decision.
This commit is contained in:
@@ -2356,19 +2356,10 @@ async def _invoke_kvcache_seeded_router(
|
||||
prefill_url=prefill_url,
|
||||
decode_session=decode_session,
|
||||
)
|
||||
if sync_result is not None and sync_result.get("status") != "ok":
|
||||
logger.info(
|
||||
"d_to_p_sync sid=%s rid=%s skipped: %s",
|
||||
request.session_id, request.request_id, sync_result,
|
||||
)
|
||||
elif sync_result and sync_result.get("status") == "ok":
|
||||
logger.info(
|
||||
"d_to_p_sync sid=%s rid=%s pushed=%d ingested_prefix=%d",
|
||||
request.session_id,
|
||||
request.request_id,
|
||||
sync_result.get("bytes_pushed", 0),
|
||||
sync_result.get("inserted_prefix_len", 0),
|
||||
)
|
||||
# NB: every outcome of _attempt_d_to_p_sync is already captured in
|
||||
# structural/d-to-p-sync.jsonl via _structural_emit. No need for an
|
||||
# additional logger.info here (and `logger` isn't imported at module
|
||||
# scope, so it would NameError if reached).
|
||||
|
||||
decode_session_newly_opened = False
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user