Skip to content

Fix TOPP_MSGFPlusAdapter Windows CI failures - #9486

Merged
timosachsenberg merged 1 commit into
developfrom
claude/laughing-wozniak-uq0a8q
Jun 12, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
claude/laughing-wozniak-uq0a8q

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the 6 TOPP_MSGFPlusAdapter test failures on Windows introduced by PRs #9461 and #9450.

Root cause 1 — parallel test race (main failure):
PR #9461 added TOPP_MSGFPlusAdapter_2, which uses the same proteins.fasta and spectra.mzML as test 1. MSGF+ creates temp/cache files alongside those shared inputs. On Windows, two MSGF+ processes racing for the same temp files causes file-access conflicts, making both test 1 and test 2 fail. Fix: add DEPENDS "TOPP_MSGFPlusAdapter_1" so test 2 is serialized after test 1.

Root cause 2 — scan-number parsing regression:
PR #9450 converted elements[1] from OpenMS::String to std::string and replaced elements[1].suffix('=').toInt() with StringUtils::toInt32(elements[1]). For SpecIDs like "controllerType=0 controllerNumber=1 scan=17", the old call extracted the integer after the last =; the new call throws ConversionError on the whole string. Fix: use rfind('=') + substr to restore the original behaviour. (This code path is hit when the ScanNum TSV column is empty or -1; not exercised by the existing tests, but is a real regression.)

Test plan

  • Windows CI: TOPP_MSGFPlusAdapter_1, TOPP_MSGFPlusAdapter_1_out1, TOPP_MSGFPlusAdapter_1_out2, TOPP_MSGFPlusAdapter_2, TOPP_MSGFPlusAdapter_2_out1, TOPP_MSGFPlusAdapter_2_out2 should all pass
  • Linux/macOS CI: no regression (tests were already passing, serialising them has no effect on correctness)

https://claude.ai/code/session_01RjUeua8ecNatvyBSSjfeGe


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Updated scan number extraction logic in the adapter to correctly handle alternative input formats.
  • Tests

    • Enhanced test documentation to clarify execution order requirements and prevent conflicts.

Two issues addressed:

1. Serialize TOPP_MSGFPlusAdapter_2 after TOPP_MSGFPlusAdapter_1 in
   CTest (DEPENDS). Both tests share the same proteins.fasta and
   spectra.mzML; MSGF+ creates temp/cache files alongside those inputs,
   causing file-access conflicts on Windows when the two tests run in
   parallel. Parallel execution was never safe for these tests — they were
   just never co-scheduled until test 2 was added in #9461.

2. Fix scan-number extraction from SpecID in the legacy TSV fallback path
   (MSGFPlusAdapter.cpp). PR #9450 changed elements[1] from OpenMS::String
   to std::string and replaced `elements[1].suffix('=').toInt()` with
   `StringUtils::toInt32(elements[1])`. For SpecIDs of the form
   "controllerType=0 controllerNumber=1 scan=17" the old call extracted
   the integer after the last '='; the new call tries to convert the whole
   string and throws ConversionError. Restore the correct behaviour with
   rfind('=') + substr.

https://claude.ai/code/session_01RjUeua8ecNatvyBSSjfeGe
@github-actions

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Claude

Please consider applying the following patch:

--- AUTHORS	2026-06-12 03:56:59.062824299 +0000
+++ AUTHORS.new	2026-06-12 03:57:04.125801139 +0000
@@ -22,8 +22,9 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
+ - Claude
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9c4682b3-c81e-465a-bf4b-c53f62c0bc6a

📥 Commits

Reviewing files that changed from the base of the PR and between b5323d6 and 13f3afd.

📒 Files selected for processing (2)
  • src/tests/topp/THIRDPARTY/third_party_tests.cmake
  • src/topp/MSGFPlusAdapter.cpp

📝 Walkthrough

Walkthrough

Two focused changes update MSGFPlusAdapter's TSV scan number parsing to handle key-value formatted input strings, and test documentation is added explaining ordering requirements to prevent Windows file-access conflicts from shared temporary files between sequential test runs.

Changes

MSGFPlusAdapter Scan Number Parsing and Test Ordering

Layer / File(s) Summary
Scan number extraction logic update
src/topp/MSGFPlusAdapter.cpp
Legacy TSV row processing now interprets elements[1] as a key-value formatted string and extracts the value after the last =, instead of direct integer conversion.
Test ordering and conflict documentation
src/tests/topp/THIRDPARTY/third_party_tests.cmake
Explanatory comments are added to TOPP_MSGFPlusAdapter_2 documenting that it must run after TOPP_MSGFPlusAdapter_1 to avoid Windows file-access conflicts from shared MaRa-related temp/cache files.

Possibly related PRs

  • OpenMS/OpenMS#9461: Both PRs modify third_party_tests.cmake around the TOPP_MSGFPlusAdapter_2 test entry and touch MSGFPlusAdapter.cpp, but address different logic paths (scan-number parsing vs CLI flag wiring).

Suggested labels

Review effort 2/5

Suggested reviewers

  • jpfeuffer

Poem

🐰 A scan through the scan number, now parsed with care,
From key-value strings, with equals signs rare,
And tests that must dance in the Windows-safe way,
Temp files won't clash when they're ordered today!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main fix: addressing Windows CI test failures in TOPP_MSGFPlusAdapter. It accurately reflects the primary objective of this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/laughing-wozniak-uq0a8q

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@timosachsenberg
timosachsenberg merged commit 28de924 into develop Jun 12, 2026
43 checks passed
@timosachsenberg
timosachsenberg deleted the claude/laughing-wozniak-uq0a8q branch June 12, 2026 07:46
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.

2 participants