Skip to content

[None][fix] Correlate Python KV receive evidence by generation - #17979

Draft
chienchunhung wants to merge 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/disagg-kv-ownership-p1-2-attempt-identity
Draft

chienchunhung wants to merge 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/disagg-kv-ownership-p1-2-attempt-identity

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Stack position

Phase1-PR2 of 5. Depends on #17720 (Phase1-PR1). This layer remains dormant.

  1. Phase1-PR1: [None][fix] Guard Python KV receive ownership and publication #17720 — receive ownership and publication gate
  2. Phase1-PR2: [None][fix] Correlate Python KV receive evidence by generation #17979 — process-local receive-evidence generation
  3. Phase1-PR3: [None][fix] Retain Python KV source ownership through backend quiescence #17981 — CTX source ownership and backend quiescence
  4. Phase1-PR4: [None][fix] Contain ambiguous Python KV retirement and shutdown #17982 — ambiguous retirement and shutdown containment
  5. Phase1-PR5: [None][fix] Qualify Python KV physical ownership for context-first #17983 — activation, fail-closed qualification, and H100 canary

The stack is linear on current main@586d84cdc; because fork heads cannot be upstream PR bases, each PR targets main. Review only d371644d8...d375be8f2.

Problem

PR1 tracks a local writer cohort, but terminal evidence still identifies only request, slice, and writer. Delayed or malformed evidence could be mistaken for the current receive allocation after local reuse, and peers have no explicit ownership-wire compatibility check before publication.

What this PR changes

  • Adds a process-local positive owner_generation to receive requests and KV terminal results only when component ownership is enabled.
  • Preserves legacy RankInfo, RecvReqInfo, and terminal-result schemas when disabled.
  • Defines the ownership wire version and validates compatibility before peer registration and destination publication.
  • Accepts only evidence matching the current generation; stale evidence is inert.
  • Makes duplicate same-status evidence idempotent without allowing it to replace a missing sibling.
  • Treats future, malformed, contradictory, or out-of-cohort evidence as unmatchable, poisons receive admission, and retains the destination.

This generation is deliberately process-local. It is not Phase 2's immutable distributed attempt identity and does not make retry, replay, peer restart, or reroute safe.

Validation

Focused CPU coverage exercises legacy/v1 serialization and parsing; stale, future, zero, duplicate, contradictory, and out-of-cohort evidence; sticky receive faults; pre-publication mismatch; and legacy default-off compatibility.

Repeated TRT-LLM code-owner self-review is clean. ruff, formatting, Python compilation, and git diff --check pass. Runtime pytest is unavailable locally; CI was not triggered for stack construction.

Isolated change size

Area Insertions Deletions Changed lines
Production 261 34 295
Tests 407 1 408
Total 668 35 703

Deferred

Sender/source liveness is Phase1-PR3; timeout/ambiguity containment and executor/shutdown retirement are Phase1-PR4; activation/no-retry/topology qualification is Phase1-PR5. Distributed attempt identity, ACK/replay, retry, reroute, and peer incarnation remain Phase 2.

@chienchunhung
chienchunhung force-pushed the codex/disagg-kv-ownership-p1-2-attempt-identity branch from d375be8 to deded6a Compare August 20, 2026 22:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant