Skip to content

[FIX] Correct defaultArrayLength in MzMLFile_negative_offsets.mzML test file - #8672

Merged
timosachsenberg merged 1 commit into
developfrom
fix/mzml-negative-offsets-test-arraylength
Jan 16, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
fix/mzml-negative-offsets-test-arraylength

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fixed incorrect defaultArrayLength="5" in test file that had empty binary arrays
  • Both spectra now correctly declare defaultArrayLength="0" to match actual content
  • Eliminates spurious warnings and potential Windows segfaults during MzMLFile tests

Problem

The test file MzMLFile_negative_offsets.mzML declared defaultArrayLength="5" for both spectra but had empty <binary> tags. This caused:

  • Warning: Float binary data array 'm/z array' has length 0, but should have length 5
  • Potential segfaults on Windows due to array size mismatches

Root Cause

The file was created in commit 7f9e926 to test negative isolation window offset handling. It was likely copied from another test file and the binary data was emptied, but defaultArrayLength was not updated to match.

Test plan

  • MzMLFile_test passes (100% pass rate)
  • No warnings about array length mismatches
  • Test "negative isolation window offsets are skipped" works correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated test data to validate spectrum array handling with modified data length parameters in mass spectrometry file formats.

✏️ Tip: You can customize this high-level summary in your review settings.

…st file

The test file declared defaultArrayLength="5" for both spectra but had
empty binary arrays (encodedLength="0", empty <binary> tags). This
mismatch violated the mzML specification and caused warnings:

  "Float binary data array 'm/z array' has length 0, but should have length 5"

On Windows, this could potentially cause segfaults due to the mismatch
between declared and actual array sizes.

Fixed by setting defaultArrayLength="0" to match the actual empty arrays.
The test purpose (verifying negative isolation window offsets are skipped)
remains unchanged.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A test data file (mzML format) is modified by reducing the defaultArrayLength attribute from 5 to 0 in two spectrum entries, adjusting expected data array lengths for m/z and intensity arrays without affecting other metadata.

Changes

Cohort / File(s) Summary
Test Data Update
src/tests/class_tests/openms/data/MzMLFile_negative_offsets.mzML
Two spectrum entries have defaultArrayLength reduced from 5 to 0, updating expected m/z/intensity array lengths

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • cbielow

Poem

🐰 Arrays once held five values high,
Now zero's the count, oh my, oh my!
The spectra shrink in mzML's embrace,
Testing limits in data's space. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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 describes the main change: correcting the defaultArrayLength values in a test mzML file to match actual content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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



📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86c8218 and 376d7d5.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/data/MzMLFile_negative_offsets.mzML
🧰 Additional context used
📓 Path-based instructions (1)
**

📄 CodeRabbit inference engine (AGENTS.md)

**: Do not commit secrets, credentials, or .env files to the repository
Never build the project unless explicitly asked, as it is extremely resource-intensive
Do not modify the contrib tree or third-party dependencies without explicit approval from the maintainers
Always run and extend tests when making code changes; do not skip tests
Follow Gitflow workflow: develop features on forks, open PRs against develop branch, use commit message format [TAG1,TAG2] summary with tags like NOP, DOC, COMMENT, API, INTERNAL, FEATURE, FIX, TEST, FORMAT, PARAM, IO, LOG, GUI, RESOURCE, BUILD
Update AUTHORS and CHANGELOG files when making significant contributions; add Fixes #N or `Closes `#N to commit messages for issue tracking
When changing C++ APIs, update corresponding .pxd files and pyOpenMS addons; when adding TOPP tools, register in src/topp/executables.cmake and ToolHandler.cpp; when changing file formats, update FileHandler::NamesOfTypes[] and schemas

Files:

  • src/tests/class_tests/openms/data/MzMLFile_negative_offsets.mzML
🧠 Learnings (1)
📚 Learning: 2025-12-04T16:25:07.026Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp:5069-5074
Timestamp: 2025-12-04T16:25:07.026Z
Learning: In OpenMS mzML writing, PSI-MS term MS:1003441 "ion mobility centroid frame" is a spectrum-level cvParam. It should be written at spectrum level (not scan level).

Applied to files:

  • src/tests/class_tests/openms/data/MzMLFile_negative_offsets.mzML
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build-wheels-linux-arm
  • GitHub Check: build-wheels-linux
  • GitHub Check: build-wheels-macos
  • GitHub Check: build-wheels-windows
  • GitHub Check: build-and-test (macos-14, xcode, 15.4)
  • GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
  • GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
  • GitHub Check: cppcheck-test
🔇 Additional comments (2)
src/tests/class_tests/openms/data/MzMLFile_negative_offsets.mzML (2)

31-31: Looks good: array length now matches empty binary arrays.

This aligns the declared default array length with the actual (empty) binary data.


56-56: Looks good: array length now matches empty binary arrays.

Consistent fix for the second spectrum entry.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 b255f12 into develop Jan 16, 2026
@timosachsenberg
timosachsenberg deleted the fix/mzml-negative-offsets-test-arraylength branch January 16, 2026 15:51
claude Bot pushed a commit that referenced this pull request Jan 18, 2026
Added 19 missing PRs to OpenMS 3.6.0 changelog:

PyOpenMS:
- #8530: Build system modernization with py-build-cmake
- #8633: SpectrumNativeIDParser wrapper
- #8655: Arrow/Parquet export with DataFrame methods (BREAKING: method renames)
- #8661: Build dependency docs
- #8664: Biosaur2Algorithm wrap-inherits
- #8668: wrap-doc documentation
- #8674: Docstring validation tests

TOPP tools:
- #8643: FileInfo FASTA stats
- #8650: FileConverter MSP support
- #8649: PeakPickerHiRes parameter

OpenMS Library:
- #8633: SpectrumNativeIDParser class
- #8655: ArrowExport helper
- #8651, #8656, #8659, #8660, #8662: Performance optimizations

Fixes:
- #8645: DataArray handling in filters
- #8672: Test file correction
- #8678: UniqueIdGenerator seed collision fix

Build System:
- #8675, #8676: Claude CI workflows

Also reorganized misplaced entries from lines 122-129.

Co-authored-by: Timo Sachsenberg <[email protected]>
timosachsenberg added a commit that referenced this pull request Jan 18, 2026
* Add comprehensive changelog for OpenMS 3.6.0

Includes changes from 96 merged PRs since version 3.5.0:

- General: macOS Intel discontinued, Ubuntu 24.04, notarization in CI
- Dependencies: Autowrap >= 0.26.0, Eigen minimum 3.4.0
- PyOpenMS: Pythonic methods (__len__, __str__, __repr__, __hash__),
  DataFrame support, new wrappers, string handling improvements
- TOPP tools: MapAligner spectra transformation, FileInfo improvements,
  IsobaricWorkflow fixes, SageAdapter thread handling
- OpenMS Library: PeakFileOptions, ParamIterator, SpectrumAnnotator
- Breaking changes: Matrix<T> Eigen decoupling, API renames, FileWatcher move
- Bug fixes: NucleicAcidSearchEngine, LogConfigHandler, decoy generation
- Documentation: Targeted Quantitation, parameter annotations, AGENTS.md
- Build: macOS notarization, Parquet support, pytest fixtures

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* Add missing changelog entries for recently merged PRs

Added 19 missing PRs to OpenMS 3.6.0 changelog:

PyOpenMS:
- #8530: Build system modernization with py-build-cmake
- #8633: SpectrumNativeIDParser wrapper
- #8655: Arrow/Parquet export with DataFrame methods (BREAKING: method renames)
- #8661: Build dependency docs
- #8664: Biosaur2Algorithm wrap-inherits
- #8668: wrap-doc documentation
- #8674: Docstring validation tests

TOPP tools:
- #8643: FileInfo FASTA stats
- #8650: FileConverter MSP support
- #8649: PeakPickerHiRes parameter

OpenMS Library:
- #8633: SpectrumNativeIDParser class
- #8655: ArrowExport helper
- #8651, #8656, #8659, #8660, #8662: Performance optimizations

Fixes:
- #8645: DataArray handling in filters
- #8672: Test file correction
- #8678: UniqueIdGenerator seed collision fix

Build System:
- #8675, #8676: Claude CI workflows

Also reorganized misplaced entries from lines 122-129.

Co-authored-by: Timo Sachsenberg <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Timo Sachsenberg <[email protected]>
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.

1 participant