Skip to content

[https://nvbugs/6550803][fix] Pin Mock(_force_non_greedy_for_capture=False) at the test's spec_metadata… - #17219

Open
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6550803
Open

[https://nvbugs/6550803][fix] Pin Mock(_force_non_greedy_for_capture=False) at the test's spec_metadata…#17219
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6550803

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: The test passed a bare Mock() as spec_metadata, so getattr(spec_metadata, '_force_non_greedy_for_capture', False) returned a truthy auto-vivified child Mock instead of False, tripping the production assert that guards the capture-only sampling override.
  • Fix: Pin Mock(_force_non_greedy_for_capture=False) at the test's spec_metadata double (the convention already used at line 231 of the same file), leaving the production guard intact, and remove the obsolete waiver.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Removed the obsolete waiver and NVBug reference for PyTorchModelEngineTestCase::test_promoted_context_precedes_speculative_overlap_generation.
  • The waiver removal is correctly scoped to tests/integration/test_lists/waives.txt.
  • The test path and waiver format are valid.
  • The production guard remains unchanged.
  • The test now sets Mock(_force_non_greedy_for_capture=False) to prevent unintended truthiness from Mock attribute auto-vivification.
  • No duplicate waiver or configuration issues were identified.

QA Engineer Review

  • Modified test-list file: tests/integration/test_lists/waives.txt.
  • Removed the waiver entry for unittest/_torch/executor/test_pytorch_model_engine.py::PyTorchModelEngineTestCase::test_promoted_context_precedes_speculative_overlap_generation.
  • No test-db/ or qa/ files were modified.
  • Verdict: needs follow-up because CBTS coverage data is unavailable.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b7bf94af-e843-4d57-aa6d-a34f792ead6c

📥 Commits

Reviewing files that changed from the base of the PR and between 7608520 and 7fcbbc6.

📒 Files selected for processing (1)
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

Walkthrough

The integration waiver entry for PyTorchModelEngineTestCase::test_promoted_context_precedes_speculative_overlap_generation is removed from tests/integration/test_lists/waives.txt.

Changes

Cohort / File(s) Summary
Test waiver removal
tests/integration/test_lists/waives.txt
Removes the waived test entry and its NVBug reference.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: allisonlim-nv, crazydemo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test fix and the specific Mock configuration change.
Description check ✅ Passed The description explains the root cause, fix, obsolete waiver removal, test plan, and related bug.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

…pling override

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6550803 branch from 8bc84eb to 7fcbbc6 Compare August 5, 2026 08:07
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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.

3 participants