Repository navigation
fix(correct): rejects BAM carries the input header verbatim (#332 contract) - #397
Merged
Merged
Conversation
…tract) `fgumi correct --rejects` stamped the rejects BAM with header_as_unsorted(self.header), stripping the input's @hd GO/SS sort fields and forcing SO:unsorted. Per the PR #332 rejects contract, rejects are raw-input records (input order, already via correct's fan-out branch) and must carry the INPUT header verbatim. For correct, self.header IS the input header (correct preserves input order and does not swap in a consensus header), so use it as-is for the rejects writer. Fixes test_bgzf_eof::{test_correct_rejects_has_bgzf_eof, test_correct_single_threaded_rejects_has_bgzf_eof}. The simplex/duplex/codec rejects paths still use header_as_unsorted via their mutex side-channel; correcting those requires the full fan-out migration (input header + input order together, since a header-only change would mislabel the mutex-order records) — tracked separately.
nh13
added a commit
that referenced
this pull request
Jun 18, 2026
…tract) (#397) `fgumi correct --rejects` stamped the rejects BAM with header_as_unsorted(self.header), stripping the input's @hd GO/SS sort fields and forcing SO:unsorted. Per the PR #332 rejects contract, rejects are raw-input records (input order, already via correct's fan-out branch) and must carry the INPUT header verbatim. For correct, self.header IS the input header (correct preserves input order and does not swap in a consensus header), so use it as-is for the rejects writer. Fixes test_bgzf_eof::{test_correct_rejects_has_bgzf_eof, test_correct_single_threaded_rejects_has_bgzf_eof}. The simplex/duplex/codec rejects paths still use header_as_unsorted via their mutex side-channel; correcting those requires the full fan-out migration (input header + input order together, since a header-only change would mislabel the mutex-order records) — tracked separately.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR (stack position 06) of the #330 unified-pipeline landing. Targets the long-lived integration branch
feat-runall(notmain); #396 (lock-free unpark) is its merged predecessor. One commit.fgumi correct --rejectsstamped the rejects BAM withheader_as_unsorted(self.header), stripping the input's@HDGO/SSsort fields and forcingSO:unsorted. Per the #332 rejects contract, rejects are raw-input records (input order, via correct's fan-out branch) and must carry the input header verbatim. Forcorrect,self.headeris the input header (correct preserves input order and does not swap in a consensus header), so use it as-is for the rejects writer.src/lib/pipeline/chains/builder.rs, +9/−6.Turns 3 rejects-family tests green (verified locally,
nextest run rejects, 3/3 deterministic):test_bgzf_eof::test_correct_rejects_has_bgzf_eof,test_bgzf_eof::test_correct_single_threaded_rejects_has_bgzf_eof,test_correct_command::test_correct_command_rejects_streaming_threaded_integrity.Expected CI (documented): the simplex/duplex/codec rejects paths still use
header_as_unsortedvia their mutex side-channel; correcting those needs the full fan-out migration (input header and input order together — a header-only change would mislabel the mutex-order records), which is the next PR (stack-07,fix(consensus)). So this PR is still red on the remaining 5 rejects tests —test_*_{simplex,duplex,codec}_rejects_has_bgzf_eof,test_duplex_command::{test_duplex_command_with_rejects,test_duplex_command_rejects_contain_no_duplicates}— which all go green at stack-07 (verified full-suite 1813/1813 there).Note on CI failure counts: these rejects tests have shared-state interference, so under full-suite parallelism CI may report a varying subset of those 5 as failing run-to-run (the isolated
nextest run rejectsset is the deterministic truth). Any failure outside the 5-test set above is a real regression. This commit is a one-filebuilder.rscorrectness fix and introduces no new failures.