Skip to content

docs(CHANGELOG): add entry for #9798 (Bioconda nightly deploy fix) - #9806

Closed
timosachsenberg wants to merge 1 commit into
developfrom
claude/gracious-goodall-ggn00i
Closed

timosachsenberg wants to merge 1 commit into
developfrom
claude/gracious-goodall-ggn00i

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Routine changelog audit of recently merged PRs against develop. All recently merged PRs already had CHANGELOG entries except #9798 ("[CI] Fix recurring Bioconda nightly deploy failure: rebase → merge"), which explicitly opted out of a CHANGELOG entry as "CI-only fix, not user-facing."

However, this CHANGELOG already documents comparable CI/nightly-build fixes (e.g. #9728, #9729, #9750 for the Arrow APT signing issues, and #9787 for the fork-PR CI breakage), so #9798 — a fix for a nightly deploy job that had been failing for 16 consecutive days — is added for consistency with that existing convention.

No code changes; CHANGELOG only.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes (N/A, documentation-only change)
  • Updated or added python bindings for changed or new classes (N/A, no code changes)

Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a changelog entry for OpenMS 3.6.0 documenting a fix to the nightly Bioconda deployment workflow.
    • Recorded improved handling of recipe merge conflicts while preserving OpenMS-managed files unchanged.

Merged PR #9798 fixed the recurring nightly Bioconda deploy failure but
was marked CI-only/not user-facing and skipped the changelog, though this
file already logs comparable CI/nightly-build fixes (e.g. #9728-9750).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017uH7SWzweaNVppStBLR9bo
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CHANGELOG adds an OpenMS 3.6.0 CI entry documenting the nightly Bioconda deployment workflow fix, including the switch from rebase to git merge --no-edit bioconda/master.

Changes

Bioconda CI documentation

Layer / File(s) Summary
Document Bioconda merge fix
CHANGELOG
Adds a CI changelog entry describing the merge-conflict fix and updated Bioconda merge command.

Possibly related PRs

  • OpenMS/OpenMS#9798: Implements the nightly Bioconda deployment workflow change documented here.

Suggested reviewers: singjc, aliviahossain

Poem

A bunny found a merge gone wrong,
And fixed the workflow with a song.
No rebase thorns, one merge in sight,
Bioconda hops through the night.
The changelog twinkles, neat and bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the documentation-only CHANGELOG entry for the Bioconda nightly deploy fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/gracious-goodall-ggn00i

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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG`:
- Line 23: Update the changelog entry’s stated failure count or date range so
they are factually consistent: July 10, 2026 through July 26, 2026 inclusive
covers 17 days. Preserve the workflow and merge details unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1ac085-ef34-443a-bea3-8e3209d066f1

📥 Commits

Reviewing files that changed from the base of the PR and between bef744a and ffb1f62.

📒 Files selected for processing (1)
  • CHANGELOG

Comment thread CHANGELOG
- Fix: pyOpenMS handed Python consumer callbacks a reference into the parser's batch buffer, so a consumer that kept the spectrum or chromatogram it was given read storage that had already been recycled. NanobindMSDataConsumer bridges a Python object to the C++ IMSDataConsumer interface for MzMLFile.transform(), MzXMLFile.transform() and ImzMLFile.load(filename, consumer); it passed each value with plain nb::rv_policy::reference, while MzMLHandler clears and refills spectrum_data_ as soon as the callback returns. Retaining the wrapper -- `kept.append(s)` in consumeSpectrum, a natural way to collect a subset while streaming -- therefore yielded objects whose scalars and peak data came from whatever had reused the memory, and the same applied to every child alias derived from them, including the zero-copy ndarray returned by get_peaks_struct(). Neither obvious fix works: copying into the callback would silently discard the consumer's edits, since IMSDataConsumer explicitly permits a consumer to modify the spectra and MzMLHandler passes the modified value onward (and the overload that writes results back, MzMLFile.h:136, is a plausible future binding even though only the streaming overload at :119 is wrapped today); invalidating the wrapper when the callback returns cannot reach those child views, does not unregister the pointer (nanobind unregisters only at deallocation, so a retained-and-invalidated wrapper can be handed back for a later spectrum from the recycled buffer), and risks destructing an object the binding does not own, because a reference cast may reuse any compatible registered instance. The callback is now given an object that owns its value: the value is moved out of the caller's storage for the duration of the call and moved back afterwards, so in-place modification still reaches downstream storage, and if the consumer kept a reference the value is copied back once, leaving Python a valid independent snapshot rather than a dangling alias. MSSpectrum and MSChromatogram both have defaulted noexcept moves, so the ordinary path copies no peak data; the restore is RAII so a raising callback cannot leave the parser holding a moved-from value. The hand-off also verifies that it really received a fresh object: nb::cast consults nanobind's instance registry for every policy except copy, so a move cast returns an already-registered wrapper -- having moved nothing -- whenever the address is one Python already knows. No caller can trigger that today, because the parser's batch storage is never handed to Python, but it would silently reinstate the aliasing the class exists to remove, so it now throws instead of degrading to a no-op. The uniqueness test is a reference count, so it is only sound while the GIL is held; that is guaranteed here, because a free-threaded build (NB_FREE_THREADED) takes the copy path unconditionally, and a module built without that macro does not emit nanobind's Py_mod_gil/Py_MOD_GIL_NOT_USED slot, so CPython re-enables the GIL even on a free-threaded interpreter. The restore is an explicit, throwing step on the success path, so a failure to put the value back propagates rather than letting the parser continue with moved-from storage; the destructor repeats it only as a best-effort fallback while a callback exception is already unwinding. The map-collecting transform overloads (MzMLFile.h:136, MzXMLFile.h:99) are additionally wrapped as MzMLFile.transform(filename, consumer, exp) / MzXMLFile.transform(filename, consumer, exp); they set alwaysAppendData, so each spectrum is appended after the consumer has seen it, which is what makes the write-through contract observable -- and testable -- from Python for the first time. The streaming overloads, by contrast, no longer put the value back at all: MzMLFile/MzXMLFile::transform(filename, consumer) parse into a function-local dummy map that is destroyed immediately, and the handler appends to it only when AlwaysAppendData is set (MzMLHandler.cpp:181-190, MzXMLHandler.cpp:1251-1266), so nothing observable can read the value back and restoring it would deep-copy the peak data into storage nobody reads -- which is exactly what the motivating kept.append(s) pattern did. Retaining every spectrum while streaming now costs about 4% over a consumer that drops them (measured on 1.2M peaks) instead of one full copy of every spectrum; the map-collecting overloads still restore, because they must, and the flag that distinguishes the two defaults to restoring so a caller added later is correct before it is fast. 23 regression tests were added; 8 fail against the previous caster, 4 of them by terminating the interpreter, and 2 more fail if the aliasing is instead 'fixed' by handing the callback a copy (R-4.7, part of #9792)
- Fix: 21 pyOpenMS binding registrations held on to borrowed references that could outlive their referent, and four wrapped classes could not be used safely at all -- the same defect class as the __iter__ use-after-free fixed in #9794. Two shapes were fixed in place and a third was removed. (1) Twelve setters/constructors passed OpenMS a raw pointer to a Python-owned object that C++ then stored verbatim and kept using after the call. nb::keep_alive cannot repair these, because every receiver is copyable and a C++ copy duplicates the stored pointer *without* carrying the Python-side lifetime edge: `d2 = EnzymaticDigestion(d1); del d1, e` dangles even with a correct edge on d1, and copies also escape through getPrefix()/getSubsequence()/__copy__. They are now made safe by guaranteeing the pointee has process lifetime -- NASequence::set/setFivePrimeMod/setThreePrimeMod/setSequence and AASequence::setModification(size_t, Residue*) validate RibonucleotideDB/ResidueDB pointer ownership and raise ValueError otherwise; EnzymaticDigestion::setEnzyme and RNaseDigestion::setEnzyme validate ProteaseDB/RNaseDB ownership (which additionally fixes an unrelated hard crash, since RNaseDigestion::setEnzyme dynamic_casts to DigestionEnzymeRNA and dereferences the result without a null check, so any protease was an immediate null-pointer dereference -- and because setEnzyme is virtual, that requirement is keyed off the receiver's dynamic type rather than off which binding was entered, so explicitly invoking the base descriptor with a derived receiver, EnzymaticDigestion.setEnzyme(rnase_digestion, protease), is guarded too instead of dispatching straight into the unchecked downcast); AASequence::set{,N-terminal,C-terminal}Modification(ResidueModification*) and Residue::setModification(ResidueModification*) now route through the existing by-reference overloads, which intern a copy into ModificationsDB and store the database-owned pointer. That last group mattered most: the indexed AASequence setter funnels the pointer into ResidueDB, which caches the modified Residue for the life of the process, so a Python-owned modification corrupted *later, independently constructed* sequences long after every possible keep-alive nurse had been released. Note these raw-pointer overloads were registered ahead of their safe by-reference siblings and, since nanobind resolves overloads in registration order and both match an instance in the strict pass, positional and `modification=` calls always took the unsafe path while only the `mod=` spelling reached the safe one; both spellings are preserved. (2) The IsobaricQuantifier/IsobaricNormalizer/IsobaricChannelExtractor constructors (9 registrations) store the IsobaricQuantitationMethod by reference and gained nb::keep_alive<1, 2>(), with the pointer-duplicating copy paths on the first two removed. (3) Four bindings were removed rather than repaired. The KDTreeFeatureMaps, KDTreeFeatureNode and MapAlignmentAlgorithmKD trio: KDTreeFeatureMaps::addMaps received the maps through nanobind's *copying* STL list caster while C++ stored pointers into that call-local copy, so every accessor read freed memory even with the caller's map still alive -- silently wrong from ~100 features and a hard segfault from ~5000 -- and it was the class's only entry point; MapAlignmentAlgorithmKD's entire public API requires a KDTreeFeatureMaps and was therefore unreachable, and KDTreeFeatureNode had no constructible path at all. FeatureGroupingAlgorithmKD, which builds the tree internally over storage it owns, is the supported entry point and is unaffected. Dropping KDTreeFeatureMaps also required removing the FeatureMapping_FeatureMappingInfo.kd_tree property, whose member is of that type and which would otherwise have raised an unconvertible-return-value TypeError on access. PeakIndex was removed for a different reason: it was orphaned. Its only producer anywhere in OpenMS is AreaIterator::getPeakIndex(), and AreaIterator/areaBegin/areaEnd are not wrapped, so no binding could ever hand one out; constructed by hand from indices the caller already has, idx.getFeature(fm) was merely a longer spelling of fm[i], and its accessors range-checked only through OPENMS_PRECONDITION, which expands to nothing in a release build, so an out-of-range PeakIndex read past the end of the container. Should area iteration be wrapped later, PeakIndex should return alongside it, with the keep-alive edge on the map argument rather than on the index. 43 regression tests were added; 24 of them fail or hard-crash without the fix. Found while editing the same lines and fixed alongside: NASequence::set() and AASequence::setModification(Size, const Residue*) index their internal vectors without any range check (a bare seq_[index]/peptide_[index] assignment), unlike the sibling ResidueModification overloads which throw Exception::IndexOverflow, so an out-of-range index from Python was an out-of-bounds write rather than an error; NASequence::get() reads unchecked in the same way while the __getitem__ binding right next to it already guarded. All three bindings now raise IndexError, matching the `if (i >= self.size()) throw nb::index_error();` idiom already used elsewhere in the same file. The wrapping guide gains a section on retained pointers, including the note that an audit must grep `nb::init<` as well as `.def(...)`, which is how the isobaric constructors were originally missed (part of #9792)
- Fix: MSChromatogram and Mobilogram silently mis-associated per-peak metadata when sorted, because their sort routines did not permute all binary data arrays alongside the peaks. MSChromatogram::sortByPosition() guarded its metadata-ignoring fast path on float_data_arrays_.empty() alone, and MSChromatogram::sortByIntensity() on an inverted condition (float_data_arrays_.empty() && !string_data_arrays_.empty() && !integer_data_arrays_.empty()), i.e. it took the fast path precisely when string and integer arrays were present. This was reachable on the mzML load path: MzMLHandler populates chromatogram integer/string binary data arrays and then calls sortByPosition() when 'sort_chromatograms_by_rt' is set, so a chromatogram carrying integer/string arrays but no float array had its peaks reordered while the arrays stayed in file order -- and the mismatch was written back out on store. Mobilogram::sortByIntensity()/sortByPosition() were a bare stable_sort over the peaks and never touched any of the three array families (no in-tree caller sorts a Mobilogram, but both sorts and all array accessors are exposed via pyOpenMS, whose docstring already promised the arrays would follow). Both classes now permute peaks and all float/string/integer arrays together, reusing the select()-based approach already used by MSSpectrum; Mobilogram gains the select() and sort(Predicate) members it was missing (its class test already contained a placeholder section for the latter). A sort that actually permutes a container whose data array size does not match the peak count now throws Exception::Precondition instead of corrupting the association (a sort that short-circuits because the peaks are already in order does not inspect the arrays), and MSChromatogram sorting became stable (std::sort -> std::stable_sort), matching MSSpectrum. Additionally, Mobilogram::clear() and MSChromatogram::clear(false) retained the data arrays while dropping the peaks, leaving the container internally inconsistent; both now clear the arrays and ranges, matching MSSpectrum::clear() (for MSChromatogram the 'clear_meta_data' flag now governs only ChromatogramSettings and the name). This also removes a latent accumulation bug in PeakPickerMobilogram, which does clear() -> resize() -> push_back and would have appended to stale array entries on any reuse of the output Mobilogram (#9795, part of #9792)
- CI: fixed the nightly "Deploy to Bioconda" workflow, which had failed every night for 16 consecutive days (2026-07-10 through 2026-07-26) with a merge conflict in recipes/pyopenms/meta.yaml. The job integrated the OpenMS bioconda-recipes fork's 'nightly' branch (carrying OpenMS-specific dev version pins and build fixes) with upstream bioconda/master via `git rebase bioconda/master`; since 'nightly' already periodically merges upstream on its own, replaying its commits one at a time onto today's master tip reintroduced conflicts that upstream and 'nightly' had already resolved together, even though the two branch tips merge cleanly. Switched to `git merge --no-edit bioconda/master`, which diffs tip-vs-tip once instead of replaying stale history; verified locally to merge without conflicts, leaving all OpenMS-owned recipe files byte-identical (#9798)

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the failure count or date range.

July 10, 2026 through July 26, 2026 is 17 calendar days inclusively, not 16. Please change either the count or the endpoint so the changelog remains factually consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG` at line 23, Update the changelog entry’s stated failure count or
date range so they are factually consistent: July 10, 2026 through July 26, 2026
inclusive covers 17 days. Preserve the workflow and merge details unchanged.

timosachsenberg added a commit that referenced this pull request Jul 30, 2026
Audited recently merged develop PRs against CHANGELOG (last backfill
attempt was #9811/#9806, covering up to #9803). Four merged PRs since
then were missing entries: #9824 (IsobaricWorkflow empty-feature
pruning fix), #9523 (new CI build/release workflows), #9812 (pyOpenMS
docstring fixes) and #9798 (Bioconda nightly deploy fix, whose two
prior backfill attempts were closed unmerged). #9821 (internal
TODO-comment correction, no behavior/doc change) and #9805/#9803
(test-only / already covered by the #9792 write-up) were left out,
consistent with this repo's convention of not logging
test-infrastructure-only or already-documented changes.


Claude-Session: https://claude.ai/code/session_01WU21QuzvxLH5BuSxatVikX

Co-authored-by: Claude <[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.

2 participants