BOT: Fix #718: Reset rlang warning verbosity in repeated test runs#1092
Draft
nikosbosse wants to merge 1 commit intomainfrom
Draft
BOT: Fix #718: Reset rlang warning verbosity in repeated test runs#1092nikosbosse wants to merge 1 commit intomainfrom
nikosbosse wants to merge 1 commit intomainfrom
Conversation
Add rlang::reset_warning_verbosity("small_interval_range") before
expect_warning() calls in test-metrics-interval-range.R so that
cli_warn(.frequency = "once") warnings fire reliably on repeated
devtools::test() runs in the same R session. Add rlang to Suggests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1092 +/- ##
=======================================
Coverage 97.83% 97.83%
=======================================
Files 35 35
Lines 1845 1845
=======================================
Hits 1805 1805
Misses 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nikosbosse
commented
Feb 13, 2026
Collaborator
Author
nikosbosse
left a comment
There was a problem hiding this comment.
CLAUDE: APPROVE — Clean, minimal fix that correctly addresses root cause of test flakiness when running devtools::test() repeatedly. Uses the correct rlang::reset_warning_verbosity() (not reset_message_verbosity), adds rlang to Suggests appropriately. New idempotency test validates the reset mechanism. Only 1 instance of .frequency='once' exists in the codebase, so no other tests need similar treatment. Independently verified the bug reproduces on main and the fix resolves it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devtools::test()is run repeatedly in the same R sessioncli_warn(.frequency = "once", .frequency_id = "small_interval_range")inassert_input_interval()suppresses warnings after first emission per R session, causingexpect_warning()to fail on subsequent runsrlang::reset_warning_verbosity("small_interval_range")beforeexpect_warning()calls to reset the one-time warning gaterlangtoSuggestsin DESCRIPTION (needed forrlang::reset_warning_verbosity()in tests)Test plan
assert_input_interval() warns about small interval_range on repeated callspasses🤖 Generated with Claude Code