Skip to content

[None][test] Add KV transfer lifecycle acceptance regressions - #19663

Open
chienchunhung wants to merge 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/kv-lifecycle-acceptance
Open

chienchunhung wants to merge 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/kv-lifecycle-acceptance

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add test-only lifecycle qualification on top of merged #19674: KV/AUX memory must remain owned until physical access settles, even after logical cancellation or timeout. Rebased onto main f7518a6427; 5 files, +1,679 lines, no production changes.

Major changes

  • Seven GPU/NIXL cases: delivery, cancellation before publication, late KV/AUX settlement, request timeout, and source/destination fatal expiry. Separate two-rank CTX/GEN worlds use real generic V2 NVFP4 allocations, allocator pressure, exact-address reuse, and sentinels.
  • CPU acceptance: four passing-contract regressions and two strict expected failures documenting the default-off gap.
  • Nine exit-observer cases: bounded PID/create-time observation, including zombies and PID reuse, before cleanup sends any signals.
  • Coverage ledger and four-B200 CI registration. CPU cases are collected by existing CPU CI.

Verification

  • Current head a16bc402a7: self-review clean; full CI requested, runtime results pending. Added coverage: 20 pass-required cases (7 GPU + 13 CPU) and 2 strict XFAILs. Multi-GPU execution requires ci: full pre-merge approved; a green run that skips those stages is insufficient.
  • Historical evidence only — 668e49d2eb, ComputeLab 4661843, four B200s: GPU 6/7 passed; the destination-fatal process-exit assertion required the identity-aware observer correction now included. The broader CPU selection reported 127 passed, 2 XFAILs; both explicit --runxfail negative controls failed at the intended premature-reuse assertion. These results do not validate the current revision.
  • No production coverage-percentage claim; no production code is added.

Qualification boundary

The harness uses production cancellation/cleanup methods on a model-free executor shell, not full serving. Completion masking begins after native NIXL DONE: it tests software retention/containment, not outstanding-DMA fencing. Dense FP4 MLA serving, fully initialized executor cleanup, platform fencing, and safe replacement remain separate qualification requirements. Expected failures document gaps, not acceptance.

Dev Engineer Review

  • The changes add lifecycle acceptance tests, documentation, and one CI registration. No production behavior or public API changes are shown.
  • The GPU suite tests retention and containment after native NIXL reports DONE. It does not prove safety while DMA remains active, GPU/RDMA fencing, fully initialized executor cleanup, or safe replacement.
  • The B200 CI entry targets four-GPU systems. The supplied list does not establish that full pre-merge execution has been approved or completed.
  • Current review severity counts are unavailable because no current review findings were supplied.

QA Engineer Review

  • Added three test files and one coverage ledger. Added one four-GPU B200 pre-merge CI entry. No removed test files or entries are shown.
  • CPU acceptance covers cancellation, timeout, destination retention and release, duplicate completion, and the default-off gap through strict expected failures. Process-exit tests cover rank identity observations, including zombies and PID reuse. The GPU suite has seven cases for delivery, cancellation, late KV/AUX completion, timeout, and fatal expiry.
  • The ledger reports that CPU CI selects the disaggregated unittest directory. The GPU file is listed in tests/integration/test_lists/test-db/l0_dgx_b200.yml. No manual-QA list entry is reported.
  • Current-revision runtime results are unavailable. Historical results do not validate this revision; native CI remains pending.
  • Coverage verdict: needs follow-up. Run the required current-revision CPU and GPU CI, then track the separate deployment qualification gaps.

Per-File QA Perspective

  • tests/integration/test_lists/test-db/l0_dgx_b200.yml — Adds unittest/disaggregated/test_transfer_lifecycle_gpu.py to the four-GPU B200 pre-merge list. Verify the CI selector runs this test on the intended hardware.
  • tests/unittest/disaggregated/lifecycle_acceptance.md — Documents the acceptance profile, coverage boundaries, execution commands, and remaining qualification gaps. Verify the documented commands and status against current CI evidence.
  • tests/unittest/disaggregated/test_transfer_lifecycle_acceptance.py — Adds CPU-only cancellation and timeout regressions, including retention until KV and AUX accessors settle, plus strict expected failures for default-off behavior. The ledger says existing CPU CI selects this directory; this file is not listed in the B200 GPU CI entry.
  • tests/unittest/disaggregated/test_transfer_lifecycle_gpu.py — Adds seven real GPU/NIXL cases using separate MPI CTX/GEN worlds and allocator pressure. It is listed in the four-GPU B200 pre-merge CI; verify current hardware execution and retain the stated boundary that masked completion does not model active DMA.
  • tests/unittest/disaggregated/test_transfer_lifecycle_process_exit.py — Adds parameterized checks for bounded rank-exit observation and process identity cases before cleanup. The ledger reports CPU selection of the disaggregated unittest directory; this file is not listed in the B200 GPU CI entry.

@chienchunhung
chienchunhung force-pushed the codex/kv-lifecycle-acceptance branch 2 times, most recently from 8e811e3 to 0216388 Compare October 1, 2026 22:17
Cover cancellation and timeout retention with CPU regression controls and a seven-case native GPU/NIXL suite across separate CTX and GEN MPI worlds. Include allocation-reuse checks, bounded software containment, B200 test mapping, and an explicit qualification coverage ledger.

Signed-off-by: Chien-Chun Hung <[email protected]>
@chienchunhung
chienchunhung force-pushed the codex/kv-lifecycle-acceptance branch from 416a386 to a16bc40 Compare October 2, 2026 18:08

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@chienchunhung
chienchunhung marked this pull request as ready for review October 2, 2026 18:12
@chienchunhung
chienchunhung requested review from a team as code owners October 2, 2026 18:12
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a5f29649-b2fa-4bb6-8a29-38454d7cedd4

📥 Commits

Reviewing files that changed from the base of the PR and between f7518a6 and a16bc40.

📒 Files selected for processing (5)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/unittest/disaggregated/lifecycle_acceptance.md
  • tests/unittest/disaggregated/test_transfer_lifecycle_acceptance.py
  • tests/unittest/disaggregated/test_transfer_lifecycle_gpu.py
  • tests/unittest/disaggregated/test_transfer_lifecycle_process_exit.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

This change adds acceptance documentation and CPU tests for receive cancellation and resource reuse. It adds GPU/NIXL lifecycle qualification and process-exit regression tests, then includes the GPU test in the four-GPU B200 pre-merge list.

Changes

Transfer lifecycle qualification

Layer / File(s) Summary
CPU receive acceptance
tests/unittest/disaggregated/lifecycle_acceptance.md, tests/unittest/disaggregated/test_transfer_lifecycle_acceptance.py
Documents the lifecycle acceptance contract and adds CPU-only tests for cancellation, destination retention, settlement, release, and reuse checks.
GPU lifecycle scenarios
tests/unittest/disaggregated/test_transfer_lifecycle_gpu.py
Adds seven GPU/NIXL cases using separate two-rank MPI jobs. The tests check cancellation, timeouts, fatal containment, resource retirement, and reuse.
GPU test supervision and registration
tests/unittest/disaggregated/test_transfer_lifecycle_gpu.py, tests/unittest/disaggregated/test_transfer_lifecycle_process_exit.py, tests/integration/test_lists/test-db/l0_dgx_b200.yml
Adds MPI job coordination and exit checks, tests rank-exit observation, and registers the GPU test in the B200 pre-merge list.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Other

Suggested reviewers: bowenfu

Merge Risk: ⚪ Minimal · up to a16bc

This change adds only tests and documentation for KV transfer lifecycle behavior, plus a four-GPU B200 CI registration. It does not change production code. No concrete merge-blocking issue was found; the remaining step is a passing full CI run.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 3 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows the required [None][type] format and clearly identifies the added KV transfer lifecycle acceptance regressions.
Description check ✅ Passed The description is detailed and on-topic. It explains the purpose, changes, test coverage, verification status, and qualification boundaries. It does not include the template's explicit Test Coverage …
Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76115 [ run ] triggered by Bot. Commit: a16bc40 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76115 [ run ] completed with state SUCCESS. Commit: a16bc40
/LLM/main/L0_MergeRequest_PR pipeline #62753 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@juney-nvidia juney-nvidia 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.

Approved

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements.

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76145 [ run ] triggered by Bot. Commit: a16bc40 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76145 [ run ] completed with state FAILURE. Commit: a16bc40
/LLM/main/L0_MergeRequest_PR pipeline #62774 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

)
if role == "ctx" and rank == 0:
_record(directory, "endpoint", endpoint=transceiver._context_info_endpoint)
_wait(lambda: (directory / "endpoint.json").exists(), "CTX endpoint")

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.

Workers time out after 30 seconds, while the supervisor allows 120 seconds for startup. Use a shared startup deadline so healthy initialization delays cannot cause ready workers to exit prematurely.


def lookup(pid: int) -> psutil.Process:
"""Return the selected original rank, or its observed disappearance."""
if pid == 101 or scenario == "absent" or (scenario == "exits_later" and now[0] > 0):

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.

Rank 1 is always simulated as absent, so these cases still pass if the observer checks only rank 0. Add mirrored cases where rank 1 remains alive or becomes unobservable.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants