Skip to content

[None][fix] Qualify Python KV physical ownership for context-first - #17983

Draft
chienchunhung wants to merge 7 commits into
NVIDIA:mainfrom
chienchunhung:codex/disagg-kv-ownership-p1-5-activation-qualification
Draft

chienchunhung wants to merge 7 commits into
NVIDIA:mainfrom
chienchunhung:codex/disagg-kv-ownership-p1-5-activation-qualification

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Stack position

Phase1-PR5 of 5. Depends on #17982 (Phase1-PR4).

This is the sole Phase 1 activation and qualification layer. Phase1-PR1 through PR4 remain dormant foundations:

  1. [None][fix] Guard Python KV receive ownership and publication #17720 — receive ownership and publication gate
  2. [None][fix] Correlate Python KV receive evidence by generation #17979 — process-local receive-evidence generation
  3. [None][fix] Retain Python KV source ownership through backend quiescence #17981 — CTX source ownership and backend quiescence
  4. [None][fix] Contain ambiguous Python KV retirement and shutdown #17982 — ambiguous retirement and shutdown containment
  5. This PR — narrow activation, fail-closed scope validation, and canary

All five branches form strict linear Git ancestry on current main@586d84cdc. Fork-hosted heads cannot be selected as upstream PR bases, so each PR targets main; review this isolated layer at 6fe42ebc8...42da33d59.

Qualified Phase 1 cell

Activation is supported only when both environment flags are 1:

Physical ownership No retry Result
0 0 Unchanged legacy behavior
0 1 Legacy ownership; HTTP retry/remint disabled
1 0 Rejected at startup
1 1 Qualified Phase 1 path

The qualified deployment is:

  • context-first, exactly one CTX and one GEN worker;
  • PyTorch backend with Python/NIXL transceivers on both peers;
  • TP1/PP1/CP1/DP1, no attention-DP or DWDP;
  • V1 paged KV manager, overlap transfer enabled;
  • no bounce, layerwise, synchronous, retry, conditional, dynamic/fleet, or external-coordinator mode;
  • coordinator-issued global-shaped request IDs;
  • matching peer ownership protocol and topology before destination publication.

Unsupported combinations fail before fleet launch, worker/session creation, destination publication, or transport submission, depending on the boundary where the information first becomes available.

What changes

  • Wires the dormant Phase 1 owners into the Python/NIXL transfer worker and advertises ownership protocol v1 only when enabled.
  • Validates the paired flags, local runtime, request style/ID, peer protocol, and remote topology.
  • Enforces true no-retry behavior, including transient TCP failures and request-ID reminting.
  • Runs the same preflight before CLI fleet branching and direct server construction.
  • Adds a dedicated static TinyLlama 1-CTX/1-GEN H100 canary; successful traffic and both worker logs must prove ownership activation.
  • Restores focused retirement-boundary regressions moved out of PR4 to keep that layer below 1.5K changed lines.

Phase 1 still has no service-wide capability negotiation. Matching binaries/configuration, paired rollout, and draining before configuration changes remain operator invariants.

Validation

  • Repeated independent TRT-LLM code-owner self-review: clean after addressing fleet-launch, coordinator-bypass, and canary-topology findings.
  • isort, yapf, ruff, ruff-format, legacy lint, codespell, YAML validation, Python compilation, pinned-memory policy, AST test-list validation, and git diff --check: pass.
  • Test-list validation: 2,059 unique entries.
  • Runtime pytest is unavailable in this workspace because the installed pytest environment lacks TensorRT-LLM runtime dependencies. CI was not triggered while constructing the stack.

Isolated change size

Area Insertions Deletions Changed lines
Production 264 5 269
Tests/config 808 12 820
Total 1,072 17 1,089

Deferred

Retry/replay, immutable distributed attempt identity, capability negotiation, real multi-writer runtime qualification, generation-first, bounce/layerwise/auxiliary resources, broader Python topologies, leases, reroute, and C++ support remain Phase 2 or Phase 3 work.

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