Skip to content

Fix validate_chain_list() colnames check to compare all chains#529

Open
utkarshpawade wants to merge 3 commits intostan-dev:masterfrom
utkarshpawade:fix/validate-chain-list-colnames-check
Open

Fix validate_chain_list() colnames check to compare all chains#529
utkarshpawade wants to merge 3 commits intostan-dev:masterfrom
utkarshpawade:fix/validate-chain-list-colnames-check

Conversation

@utkarshpawade
Copy link
Copy Markdown
Contributor

Fixes #528

  • Fixed bug where identical(cnames[, 1], cnames[, 2]) only validated colnames of chains 1 and 2, silently ignoring mismatches in chains 3+
  • Replaced sapply with lapply + vapply to avoid matrix/list type ambiguity and compare all chains against the first

Copilot AI review requested due to automatic review settings April 7, 2026 08:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes validate_chain_list() so column-name consistency is validated across all chains (not just chains 1 and 2), preventing silent acceptance of mismatched parameter names/order in chains 3+.

Changes:

  • Replaced sapply(x, colnames) simplification logic with lapply(x, colnames) to avoid matrix/list ambiguity.
  • Updated the equality check to compare every chain’s colnames() against chain 1 via vapply(..., identical, ...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.67%. Comparing base (62fce06) to head (76c8db6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
- Coverage   98.71%   98.67%   -0.04%     
==========================================
  Files          35       35              
  Lines        5903     5901       -2     
==========================================
- Hits         5827     5823       -4     
- Misses         76       78       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

validate_chain_list() only compares colnames of chains 1 and 2, ignoring chains 3+

3 participants