Fix compaction test error handler raising TypeError and masking the real failure - #2435
Fix compaction test error handler raising TypeError and masking the real failure#2435Anai-Guo wants to merge 1 commit into
Conversation
…to handle_test_error handle_test_error has no mock_generation_config parameter, so the error handler in test_compaction.py raises TypeError itself. Because the call sits inside `except Exception as e:`, the original test failure is replaced by a TypeError from the handler and never reported. The two other call sites already pass only supported arguments.
|
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe compaction test removes the ChangesCompaction Test
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This PR removes a stale keyword argument from a test-only error-handler call; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
handle_test_erroraccepts six parameters and has no**kwargs(
tests/llm/utils/property_manager.py:299):but
tests/llm/test_compaction.pypasses a seventh,mock_generation_config=None,so the call raises
TypeError: handle_test_error() got an unexpected keyword argument 'mock_generation_config'.Why this matters more than a normal arity slip
The call is the body of the test's error handler:
So whenever a compaction test genuinely fails, the real failure is discarded and
replaced by a
TypeErrororiginating in the error handler — theraiseat theend is never reached, and the actual assertion error never surfaces. The
centralized reporting this helper exists to provide (Braintrust logging,
property recording) is also skipped entirely for this file.
The other call sites are already correct
tests/llm/test_ask_holmes.py:140tests/llm/test_holmes_checks.py:244tests/llm/test_compaction.py:252mock_generation_configtest_ask_holmes.py:140passes exactly the same keyword set as this call siteminus
mock_generation_config, which makes the intended shape unambiguous.Binding the real upstream signature against all three, with the two working
call sites as the control group:
mock_generation_configis not referenced anywhere else in the repository, sothis drops the single stale line rather than adding a parameter nothing reads.
ruff checkpasses, and the change is format-neutral.🤖 Generated with Claude Code
Summary by CodeRabbit