Skip to content

fix(correct): rejects BAM carries the input header verbatim (#332 contract) - #397

Merged
nh13 merged 1 commit into
feat-runallfrom
feat-runall-06-correct-rejects-header
Jun 15, 2026
Merged

nh13 merged 1 commit into
feat-runallfrom
feat-runall-06-correct-rejects-header

Conversation

@nh13

@nh13 nh13 commented Jun 15, 2026

Copy link
Copy Markdown
Member

Stacked PR (stack position 06) of the #330 unified-pipeline landing. Targets the long-lived integration branch feat-runall (not main); #396 (lock-free unpark) is its merged predecessor. One commit.

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 #332 rejects contract, rejects are raw-input records (input order, 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.

  • Net change: 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_unsorted via 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 rejects set is the deterministic truth). Any failure outside the 5-test set above is a real regression. This commit is a one-file builder.rs correctness fix and introduces no new failures.

…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
nh13 had a problem deploying to github-actions June 15, 2026 05:12 — with GitHub Actions Failure
@nh13
nh13 merged commit 08e3f15 into feat-runall Jun 15, 2026
6 of 8 checks passed
@nh13
nh13 deleted the feat-runall-06-correct-rejects-header branch June 15, 2026 05:26
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

1 failed deployment
github-actions — e2fc88fe Deployed Jun 15, 2026 by nh13 via coverage #1614
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