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

  • Updated spec_metadata to set _force_non_greedy_for_capture=False.
  • This prevents Mock auto-vivification from triggering the production assertion.
  • Removed the obsolete waiver entry.
  • The changes preserve the production guard and have no API or performance impact.
  • The waiver removal uses the existing test name and does not expand test scope.

Verdict: sufficient.

QA Engineer Review

  • Modified test: test_promoted_context_precedes_speculative_overlap_generation.
  • The test is covered by the removed entry in tests/integration/test_lists/waives.txt.
  • No test-db or QA entry was added or modified.

Verdict: sufficient.

…pling override

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@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: 320657d5-88c2-4ebd-af9e-5eb1c1390cea

📥 Commits

Reviewing files that changed from the base of the PR and between 73efcee and 8bc84eb.

📒 Files selected for processing (2)
  • tests/integration/test_lists/waives.txt
  • tests/unittest/_torch/executor/test_pytorch_model_engine.py
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

Walkthrough

The speculative decoding test fixture now sets _force_non_greedy_for_capture explicitly to False. Its integration waiver and NVBug reference are removed.

Changes

Speculative decoding test correction

Layer / File(s) Summary
Correct capture setup and remove waiver
tests/unittest/_torch/executor/test_pytorch_model_engine.py, tests/integration/test_lists/waives.txt
The fixture sets _force_non_greedy_for_capture=False. The test waiver is removed.

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

Possibly related PRs

Suggested reviewers: qijune, brnguyen2

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the bug, fix type, and specific Mock configuration change that resolves the test failure.
Description check ✅ Passed The description explains the root cause, fix, obsolete waiver removal, test plan, and linked bug, but does not reproduce the full checklist template.
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.

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.

2 participants