Fix 17 test failures: age range typo in test data generator and boundary detection test fragility#2
Closed
Fix 17 test failures: age range typo in test data generator and boundary detection test fragility#2
Conversation
…nd improve boundary detection test data Co-authored-by: jackmurphy2351 <120122776+jackmurphy2351@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix remaining test failures while preserving perfect separation tests
Fix 17 test failures: age range typo in test data generator and boundary detection test fragility
Feb 25, 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.
Two root causes produced 17 CI failures. The
create_cachar_inspired_data()helper had a typo causing a crash in every test that called it, and two boundary detection tests used data patterns that accidentally triggered perfect separation instead of the intended large-SE scenario.create_cachar_inspired_data()— wrong age range (10 failures)Boundary detection large-SE tests (2 failures)
Test 1 ("handles large standard errors"): replaced single confounder with 4 (x1–x4), giving 6 parameters across 50 observations — sufficient to push SE/coefficient ratios above the detection threshold reliably.
Test 2 ("specifically identifies large standard errors"): replaced deterministic alternating outcome
rep(c(0,1,...), 2)— which, combined with seed-999 random confounders, accidentally triggered perfect separation — withrbinom(50, 1, 0.5). Also bumped n from 20 → 50 for stable detection. The existingskip()guard covers the rare case where a different boundary type is prioritized.All hardcoded perfect-separation tests (
c(rep(0, n/2), rep(1, n/2))patterns) are untouched.Original prompt
This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.