Skip to content

fix(PM_compare): detect "Stopped (converged)" status - #400

Open
mhovd wants to merge 1 commit into
mainfrom
claude/pmetrics-pmcore-pharmsol-fixes-qdno6d-compare-converged
Open

mhovd wants to merge 1 commit into
mainfrom
claude/pmetrics-pmcore-pharmsol-fixes-qdno6d-compare-converged

Conversation

@mhovd

@mhovd mhovd commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Bug. The converged column of PM_compare() used a case-sensitive grepl("Converged"). PMcore writes the status as "Stopped (converged)", so the column was FALSE for every converged run.

Fix. Match case-insensitively, in a small helper.

Test. Checks the old and new status strings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GTyUgJEd5uCEmv9qYrv8dC


Generated by Claude Code

The converged column used a case-sensitive grepl("Converged"), so it was
FALSE for every run from the Rust backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTyUgJEd5uCEmv9qYrv8dC
Copilot AI balanced review requested due to automatic review settings October 11, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix correctly addresses the status mismatch with adequate regression coverage.

0 open findings

What changed in this PR

Updates PM_compare() to recognize PMcore’s lowercase converged status.

Changes:

  • Adds case-insensitive convergence detection.
  • Tests legacy, PMcore, non-converged, and empty statuses.
File Description
R/​PM_compare.R Adds and uses the status helper.
tests/​testthat/​test-pm-compare-converged.R Covers convergence status variants.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.78%. Comparing base (ef474a1) to head (99de227).

Files with missing lines Patch % Lines
R/PM_compare.R 50.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage   64.77%   64.78%           
=======================================
  Files          52       52           
  Lines       22964    22965    +1     
=======================================
+ Hits        14876    14877    +1     
  Misses       8088     8088           
Files with missing lines Coverage Δ
R/PM_compare.R 0.24% <50.00%> (+0.24%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

4 participants