Repository navigation
Fix basic_burden_sanity() crashing on failed checks - #18
Merged
Merged
Conversation
Use a scalar comparison so failed checks return their documented messages without appending PASS or erroring on modern R. Add regression coverage for clean estimates and each failed-check path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot CLI created this pull request from a session on behalf of
david-mears-2
November 3, 2026 15:45
david-mears-2
marked this pull request as ready for review
November 3, 2026 15:45
Contributor
|
@copilot You should increment the patch version when you do a bugfix. Increment it and document this requirement. |
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Contributor
Author
Bumped |
Copilot started work to fix failing Actions workflows on behalf of
david-mears-2
November 3, 2026 16:11
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
kgaythorpe
approved these changes
Nov 4, 2026
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.
GitHub Copilot informed me about a bug in vimcheck so I asked it to fix it. The bug report was:
I don't speak R so would appreciate a review.
Copilot's PR description
Bug validation
Confirmed on R 4.3.3: missing values, negative estimates, non-numeric estimates, and combined missing/negative estimates each produce
the condition has length > 1. Clean numeric estimates return the header andPASS..This is a bug, not an intentional rejection of invalid estimates. The documented return value is a character vector of check messages, and the function explicitly accumulates those messages. These are strings prefixed with
Warning:, not emitted R warning conditions. Once a failed check appends a message,mes == mes_startis a logical vector rather than the scalar required byif. On older R versions, using its first (always TRUE) element also incorrectly appendsPASS.alongside failed-check messages.Changes
identical(mes, mes_start)soPASS.is appended only when no failed-check messages were added.NaN; negative and non-numeric estimates; and simultaneous missing/negative values. Assert exact output and absence of emitted conditions.NEWS.md.Validation
The full
tests/testthat/test-burden_diagnostics.Rfile passes on R 4.3.3 (36 expectations), with repository R sources and example data loaded.git diff --checkpasses.Review requested from @kgaythorpe and @david-mears-2.