Skip to content

refactor(features)!: collapse consensus features, repair reduced-feature CI, and structural fixes (1/6) - #458

Merged
nh13 merged 4 commits into
feat-runallfrom
nh/runall-fix-1-foundation
Jun 25, 2026
Merged

refactor(features)!: collapse consensus features, repair reduced-feature CI, and structural fixes (1/6)#458
nh13 merged 4 commits into
feat-runallfrom
nh/runall-fix-1-foundation

Conversation

@nh13

@nh13 nh13 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Stack: 1 / 6 · base: feat-runall

Foundation layer for the feat-runall fix series. Structural changes everything else builds on.

  • refactor(features)! — collapse the umbrella simplex/duplex/codec features into a single default-on consensus flag (the granular features still live one level down in fgumi-consensus for reduced-library builds). --no-default-features now cleanly drops all consensus code and still compiles; a new fgumi-feature-check CI job exercises the reduced-feature build so chain/runall code can never silently reference a gated module again.
  • fix(cli) — accept the removed --scheduler flag as a hidden, deprecated no-op (warns and ignores) so existing invocations don't hard-fail.
  • refactor(pipeline-core) — hoist the FinalizeHook trait into fgumi-pipeline-core so the sort hooks are single-sourced.
  • fix(bam-io) — fix BAI sidecar path naming for non-.bam/extensionless outputs (append .bai, samtools convention).

⚠️ Breaking: the consensus feature-flag surface changes.

Summary by CodeRabbit

  • New Features
    • Added public helpers to compute and write BAI sidecar files (consistent <bam>.bai naming), used automatically by the sort/index finalize flow.
    • Introduced clearer “consensus” feature gating so consensus-capable commands/options enable consistently across the app and tooling.
  • Bug Fixes
    • Finalization is more reliable: success-only cleanup now runs only after a fully successful pipeline; index writing follows that success path.
    • Feature-disabled builds now fail with clearer “requires consensus feature” messages for consensus commands.
    • Deprecated --scheduler is accepted as a no-op.
  • Chores
    • Expanded CI compile coverage for additional feature combinations; updated tests and documentation accordingly.

@nh13
nh13 temporarily deployed to github-actions June 24, 2026 18:29 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: aedca44f-5a4a-4b66-a694-ea5870b354c4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR consolidates consensus feature gating under consensus, adds reduced-feature CI coverage, and moves finalize/indexing behavior onto shared hook and sidecar helper APIs.

Changes

Consensus feature consolidation

Layer / File(s) Summary
Feature contract and exports
Cargo.toml, src/lib/mod.rs, src/lib/consensus/mod.rs, src/lib/commands/mod.rs
The root feature set now defaults to consensus; consensus module exports and command modules are gated under the umbrella feature, and simulate now depends on it.
CLI and command gating
src/main.rs, src/lib/commands/common.rs, src/lib/commands/filter.rs, src/lib/commands/consensus_runner.rs, src/lib/reference.rs
Consensus subcommands, methylation helpers, and feature-required command hints now compile under consensus; SchedulerOptions also adds a hidden deprecated --scheduler alias.
Pipeline consensus gates and validation
src/lib/pipeline/chains/options_bag.rs, src/lib/pipeline/chains/commands/mod.rs, src/lib/pipeline/chains/builder.rs, src/lib/pipeline/chains/validate.rs
Consensus-specific stage options, command builders, bridge helpers, and validation paths now compile only when consensus is enabled, with non-consensus builds returning explicit errors for the consensus-only stages.
Reduced-feature tooling and test gating
.github/workflows/check.yml, crates/xtask/Cargo.toml, crates/xtask/src/generate_tools.rs, docs/DEVELOPING.md, CLAUDE.md, tests/integration/*
CI adds fgumi-feature-check, xtask command generation and docs reflect the umbrella feature, and consensus integration tests are gated behind consensus.

Finalize hook and BAI sidecar flow

Layer / File(s) Summary
Finalize hook contract
crates/fgumi-pipeline-core/Cargo.toml, crates/fgumi-pipeline-core/src/finalize.rs, crates/fgumi-pipeline-core/src/lib.rs, src/lib/pipeline/chains/finalize.rs
FinalizeHook is defined in fgumi-pipeline-core as a boxed trait returning anyhow::Result<()>, and src/lib/pipeline/chains/finalize.rs re-exports it.
BAI sidecar helpers
crates/fgumi-bam-io/src/lib.rs, crates/fgumi-bam-io/src/writer.rs
fgumi-bam-io now exports bai_sidecar_path and write_bai_sidecar, which derive <bam_path>.bai from the full BAM path and write the index after reopening the finished BAM.
Sort finalize wiring
crates/fgumi-sort-cli/src/chains.rs, crates/fgumi-sort-cli/src/sort.rs, src/lib/pipeline/chains/commands/sort.rs
SortFinalizeHook and IndexBamFinalizeHook now implement the shared finalize trait, Sort::execute_sort runs summary finalization before propagating pipeline errors and before optional index finalization, and the pipeline sort module re-exports the hook types from fgumi-sort-cli.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • fulcrumgenomics/fgumi#389 — Introduced the finalize-hook machinery that this PR re-exports from pipeline core and uses in sort finalization.
  • fulcrumgenomics/fgumi#447 — Modifies the same fgumi-sort-cli finalize hooks and BAI sidecar path handling that this PR now consumes.
  • fulcrumgenomics/fgumi#91 — Touches the same consensus feature-gating surface that this PR consolidates under the consensus feature.

Suggested labels

continuous-integration, fgumi runall

🚥 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 Title matches the main changes: consensus feature collapse, reduced-feature CI repair, and related structural fixes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nh/runall-fix-1-foundation

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

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.77465% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat-runall@59d15ee). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/pipeline/chains/builder.rs 77.77% 2 Missing ⚠️
src/lib/commands/common.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             feat-runall     #458   +/-   ##
==============================================
  Coverage               ?   93.96%           
==============================================
  Files                  ?      109           
  Lines                  ?    48466           
  Branches               ?        0           
==============================================
  Hits                   ?    45540           
  Misses                 ?     2926           
  Partials               ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nh13

nh13 commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13

nh13 commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13

nh13 commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
tests/integration/test_bgzf_eof.rs (1)

638-670: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the rejected family identity, not just EOF.

These setups rely on --min-reads 2 rejecting a single paired-end template, but the test only proves both BAMs were closed and the rejects header was copied. A regression that miscounts the pair as two reads, or routes the wrong family to the wrong file, still passes. Read both BAMs back and assert the reject family is present in rejects.bam and absent from the kept output.

Based on learnings, --min-reads here should be validated at the template level, and as per path instructions, tests under **/tests/**/*.rs should assert the stated contract instead of a weaker end-to-end side effect.

Also applies to: 723-763

🤖 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 `@tests/integration/test_bgzf_eof.rs` around lines 638 - 670, The test in
test_simplex_rejects_has_bgzf_eof only checks EOF and header copying, so it can
miss misrouted or miscounted families. Update this and the related reject-path
test to read both BAM outputs back and assert the reject family from
create_rejected_family/write_grouped_bam is present in rejects_bam and absent
from the kept output, using the Simplex execute path and the min-reads contract
as the source of truth.

Sources: Path instructions, Learnings

src/lib/commands/filter.rs (1)

481-488: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Change the rebuild hint to consensus.

This fallback still tells users to rebuild with --features simplex, but the root crate no longer exposes that feature. In a --no-default-features build, following this message now leads straight into another build failure instead of the intended recovery path.

Suggested fix
-                    "reference-dependent methylation filters require building fgumi with the `simplex` feature"
+                    "reference-dependent methylation filters require building fgumi with the `consensus` feature"
🤖 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 `@src/lib/commands/filter.rs` around lines 481 - 488, The rebuild hint in the
`filter.rs` fallback is stale and still points users to `simplex`, which the
root crate no longer exposes. Update the `bail!` message in the `ref_base_map` /
`require_strand_methylation_agreement` path to tell users to rebuild with the
`consensus` feature instead, so the guidance matches the current feature set.
src/lib/commands/common.rs (1)

775-788: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Emit the deprecation warning on fgumi sort too.

Line 779 only helps builder paths that call warn_unwired_pipeline_flags(), but ChainBuilder::add_sort never does. fgumi sort --scheduler ... is therefore accepted and silently ignored instead of degrading with the promised warning. Move this warning closer to CLI parsing, or invoke the helper from both sort branches as well.

🤖 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 `@src/lib/commands/common.rs` around lines 775 - 788, The deprecation warning
for --scheduler is only emitted inside warn_unwired_pipeline_flags(), so fgumi
sort can still accept and ignore it silently through ChainBuilder::add_sort.
Update the sort command path to call the same warning helper, or move the
warning into the CLI parsing layer so both builder and sort branches share it;
use warn_unwired_pipeline_flags and ChainBuilder::add_sort as the key places to
wire this in.
🤖 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 @.github/workflows/check.yml:
- Around line 197-198: The new Checkout code step currently leaves the GitHub
token persisted in git config, which exposes credentials to PR code executed by
cargo check. Update the actions/checkout usage in this workflow step to set
persist-credentials to false so untrusted build scripts and proc macros cannot
access GITHUB_TOKEN.

In `@crates/xtask/src/generate_tools.rs`:
- Around line 72-75: `collect_commands()` is missing the `runall` command, so
consensus builds can expose it in `main.rs` without actually
discovering/registering it. Update the command import/register list in
`generate_tools.rs` to include `runall` alongside the other consensus commands,
and add an explicit assertion that `runall` is present in the collected command
names instead of relying only on the weaker `names.len()` check. Use the
existing `collect_commands()` flow and the consensus-gated command set as the
place to verify this.

In `@src/lib/pipeline/chains/builder.rs`:
- Around line 2459-2484: The reduced-build rebuild hint is inconsistent: the
consensus stubs in builder.rs already point to `--features consensus`, but the
remaining fallback in filter.rs still tells users to rebuild with `--features
simplex`. Update the bailout message in the filter command’s reduced-build path
to match the new consensus feature name so all reduced-build paths give the same
guidance.

In `@src/lib/pipeline/chains/commands/sort.rs`:
- Around line 43-45: The chain finalize list is incorrectly re-exporting
IndexBamFinalizeHook, which lets built pipelines drain and publish a .bai even
after a failed run. Update the sort chain wiring in the re-export around
build_sort_step/log_sort_start so ChainBuilder::add_sort only includes the
summary finalize hook, and move index writing to a success-gated post-run path
like the standalone sort flow after run_result?; keep IndexBamFinalizeHook out
of the always-drain finalize vec.

In `@src/lib/pipeline/chains/validate.rs`:
- Around line 176-181: The `validate_stage_opts_present()` match arm for
`Stage::Duplex`, `Stage::Codec`, and `Stage::Simplex` under `#[cfg(not(feature =
"consensus"))]` should not return `false`, because that causes `build_for()` to
surface a generic missing-options error instead of the intended feature-disabled
failure. Update this branch to explicitly bail with an error stating that the
`consensus` feature is required, keeping the behavior consistent with the
non-consensus stubs and the `build_for()` validation flow.

In `@tests/integration/main.rs`:
- Around line 34-40: The current gating in the integration test module is too
broad because test_runall_parity still includes non-consensus parity coverage
for always-supported runall paths. Update test_runall_parity so only the
consensus-specific cases remain under the consensus cfg, and keep the
sort/group/zipper/correct parity oracles available outside that gate, either by
moving them into an always-on module or applying inner #[cfg(feature =
"consensus")] only to the consensus-only tests. Use the test_runall_parity and
test_simplex_command module boundaries to separate reduced-feature coverage from
consensus-only coverage.

---

Outside diff comments:
In `@src/lib/commands/common.rs`:
- Around line 775-788: The deprecation warning for --scheduler is only emitted
inside warn_unwired_pipeline_flags(), so fgumi sort can still accept and ignore
it silently through ChainBuilder::add_sort. Update the sort command path to call
the same warning helper, or move the warning into the CLI parsing layer so both
builder and sort branches share it; use warn_unwired_pipeline_flags and
ChainBuilder::add_sort as the key places to wire this in.

In `@src/lib/commands/filter.rs`:
- Around line 481-488: The rebuild hint in the `filter.rs` fallback is stale and
still points users to `simplex`, which the root crate no longer exposes. Update
the `bail!` message in the `ref_base_map` /
`require_strand_methylation_agreement` path to tell users to rebuild with the
`consensus` feature instead, so the guidance matches the current feature set.

In `@tests/integration/test_bgzf_eof.rs`:
- Around line 638-670: The test in test_simplex_rejects_has_bgzf_eof only checks
EOF and header copying, so it can miss misrouted or miscounted families. Update
this and the related reject-path test to read both BAM outputs back and assert
the reject family from create_rejected_family/write_grouped_bam is present in
rejects_bam and absent from the kept output, using the Simplex execute path and
the min-reads contract as the source of truth.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d952c40-37e9-43c0-b36f-abc5b4b65ced

📥 Commits

Reviewing files that changed from the base of the PR and between 59d15ee and 5b4d0ad.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (30)
  • .github/workflows/check.yml
  • CLAUDE.md
  • Cargo.toml
  • crates/fgumi-bam-io/src/lib.rs
  • crates/fgumi-bam-io/src/writer.rs
  • crates/fgumi-pipeline-core/Cargo.toml
  • crates/fgumi-pipeline-core/src/finalize.rs
  • crates/fgumi-pipeline-core/src/lib.rs
  • crates/fgumi-sort-cli/src/chains.rs
  • crates/fgumi-sort-cli/src/sort.rs
  • crates/xtask/Cargo.toml
  • crates/xtask/src/generate_tools.rs
  • docs/DEVELOPING.md
  • src/lib/commands/common.rs
  • src/lib/commands/consensus_runner.rs
  • src/lib/commands/filter.rs
  • src/lib/commands/mod.rs
  • src/lib/consensus/mod.rs
  • src/lib/mod.rs
  • src/lib/pipeline/chains/builder.rs
  • src/lib/pipeline/chains/commands/mod.rs
  • src/lib/pipeline/chains/commands/sort.rs
  • src/lib/pipeline/chains/finalize.rs
  • src/lib/pipeline/chains/options_bag.rs
  • src/lib/pipeline/chains/validate.rs
  • src/lib/reference.rs
  • src/main.rs
  • tests/integration/main.rs
  • tests/integration/test_bgzf_eof.rs
  • tests/integration/test_streaming_input.rs
💤 Files with no reviewable changes (1)
  • docs/DEVELOPING.md

Comment thread .github/workflows/check.yml
Comment thread crates/xtask/src/generate_tools.rs Outdated
Comment thread src/lib/pipeline/chains/builder.rs
Comment thread src/lib/pipeline/chains/commands/sort.rs
Comment thread src/lib/pipeline/chains/validate.rs Outdated
Comment thread tests/integration/main.rs Outdated
nh13 added 3 commits June 24, 2026 18:16
… flag and repair reduced-feature CI

Collapse the umbrella crate's `simplex`/`duplex`/`codec` features into a single
default-on `consensus` feature. The shipped binary always bundles all three
consensus callers, so the per-codec split of the umbrella crate bought nothing
while letting the always-compiled chain/runall layer reference a half-present
consensus surface: every reduced-feature build of `fgumi` failed to compile
(X1-001, escalating S5d-001), and the `--no-default-features` cleanliness
promised by #314 had regressed. The granular `simplex`/`duplex`/`codec` features
are preserved one level down in `fgumi-consensus` for embedders that want a
reduced library build.

- Co-gate the always-compiled consensus references behind `consensus`: the
  chain command modules (codec/duplex/simplex), the option-bag slots, the
  builder `add_simplex`/`add_duplex`/`add_codec` methods and their helpers
  (`finish_consensus_tail`, `wire_consensus_rejects_branch`, `templates_to_mi_step`,
  `FuseState`), and the validator option-presence arms. The builder keeps
  `bail!` stubs for the three consensus stages so `add_stage` stays exhaustive
  when consensus is off.
- Collapse the feature-gated-command hint to one `consensus` hint and add the
  missing `runall` entry (S5d-009); drop the dead `stress-tests` feature (X3-004).
- Repair the reduced-feature CI so the regression cannot recur: give xtask its
  own default-on `consensus` feature mapping to `fgumi/consensus` (gating the
  consensus command doc-gen imports) plus `default-features = false`, so the
  workspace `--no-default-features` check stops masking the breakage via
  feature-unification (X1-002); and add a dedicated `fgumi-feature-check` job
  covering the reduced, `--features consensus`, and default combos (X1-003).

The repaired CI fails at the pre-collapse tip and passes after, closing the
masking (X1-002) and coverage gap (X1-003). Docs updated (CLAUDE.md Features);
CHANGELOG #314 wording deferred to the docs pass.

BREAKING CHANGE: the `simplex`, `duplex`, and `codec` cargo features of the
`fgumi` crate are removed; build with `consensus` (default-on) instead.
The pluggable scheduler-strategy mechanism was removed in the issue #330
typed-step dispatch migration, so feat-runall dropped the (already hidden)
`--scheduler` flag from the shared `SchedulerOptions`. Scripts still passing
`--scheduler <strategy>` then hard-failed with a clap "unexpected argument"
error. Re-add it as a hidden, deprecated no-op that accepts any value and logs
a deprecation warning on the multi-threaded dispatch path, so legacy
invocations degrade gracefully — mirroring the `--queue-memory*` alias
precedent. The value is ignored; the typed-step model has no scheduler strategy
to select. (AUDIT-002)
…e sort hooks

The `FinalizeHook` trait lived only in the umbrella `fgumi` crate, so
`fgumi-sort-cli` — which builds its `fgumi sort` pipeline directly on
`fgumi-pipeline-core` without the umbrella's `ChainBuilder` — could not
implement it. As a result `SortFinalizeHook` and `IndexBamFinalizeHook` were
defined twice with byte-identical bodies: an inherent-method copy in sort-cli
and a `impl FinalizeHook` copy in the umbrella (X1-005). The duplicated
`IndexBamFinalizeHook` body also carried the `with_extension("bam.bai")` path
footgun in both copies (S3-006 / S5b2-008), forcing any fix to be applied
twice.

Hoist the bare trait into `fgumi-pipeline-core` (its natural home — it owns
`Pipeline`), re-export it from the umbrella's `chains::finalize` so the
canonical `crate::pipeline::chains::FinalizeHook` path and all ~13 in-crate
impls are unchanged. sort-cli's two hooks now `impl FinalizeHook` directly and
the umbrella re-exports them, deleting both umbrella struct twins and the
duplicated BAI round-trip test. `BuiltPipeline`, `drain_finalize`, and the
built-in stats/timing hooks stay umbrella-side (they reference umbrella-only
types).

sort-cli's standalone `Sort::execute` updates its two hook call sites to invoke
the trait (`Box::new(hook).finalize()`), preserving the existing semantics that
the summary hook drains even on the error path while the pipeline-run error
takes precedence.

This is the structural prerequisite for Phase 4, which moves the single
remaining `IndexBamFinalizeHook` body into `fgumi-bam-io::write_bai_sidecar` and
fixes the path footgun once.
@nh13
nh13 force-pushed the nh/runall-fix-1-foundation branch from 5b4d0ad to 5900b0d Compare June 25, 2026 01:17
@nh13
nh13 temporarily deployed to github-actions June 25, 2026 01:17 — with GitHub Actions Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@crates/fgumi-sort-cli/src/chains.rs`:
- Around line 74-76: Update the docs in the `chains.rs` comment near the BAM
index-writing flow to match the current `write_bai_sidecar` behavior. Replace
the stale `<output>.bam.bai`/`fgumi_bam_io::write_bai_index` wording with
language that reflects appending `.bai` to the full output path, so
`build_chain` and the sidecar contract are described correctly for non-`.bam`
outputs.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 97ab60da-6f43-4c3a-8494-f757777ee74d

📥 Commits

Reviewing files that changed from the base of the PR and between 5b4d0ad and 5900b0d.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (32)
  • .github/workflows/check.yml
  • CLAUDE.md
  • Cargo.toml
  • crates/fgumi-bam-io/src/lib.rs
  • crates/fgumi-bam-io/src/writer.rs
  • crates/fgumi-pipeline-core/Cargo.toml
  • crates/fgumi-pipeline-core/src/finalize.rs
  • crates/fgumi-pipeline-core/src/lib.rs
  • crates/fgumi-sort-cli/src/chains.rs
  • crates/fgumi-sort-cli/src/sort.rs
  • crates/xtask/Cargo.toml
  • crates/xtask/src/generate_tools.rs
  • docs/DEVELOPING.md
  • src/lib/commands/common.rs
  • src/lib/commands/consensus_runner.rs
  • src/lib/commands/filter.rs
  • src/lib/commands/mod.rs
  • src/lib/consensus/mod.rs
  • src/lib/mod.rs
  • src/lib/pipeline/chains/builder.rs
  • src/lib/pipeline/chains/commands/mod.rs
  • src/lib/pipeline/chains/commands/sort.rs
  • src/lib/pipeline/chains/finalize.rs
  • src/lib/pipeline/chains/options_bag.rs
  • src/lib/pipeline/chains/validate.rs
  • src/lib/reference.rs
  • src/main.rs
  • tests/integration/helpers/assertions.rs
  • tests/integration/main.rs
  • tests/integration/test_bgzf_eof.rs
  • tests/integration/test_runall_parity.rs
  • tests/integration/test_streaming_input.rs
💤 Files with no reviewable changes (1)
  • docs/DEVELOPING.md

Comment thread crates/fgumi-sort-cli/src/chains.rs Outdated
`IndexBamFinalizeHook` derived its sidecar path with
`output_path.with_extension("bam.bai")`, which *replaces* whatever follows the
last `.` rather than appending. It produced the correct `foo.bam` →
`foo.bam.bai` only because the input was assumed to always end in `.bam`; any
other output path was silently mis-named (`foo` → `foo.bam.bai`,
`foo.sorted` → `foo.bam.bai` instead of `foo.bai` / `foo.sorted.bai`)
— S3-006 / S5b2-008.

Move the index-and-write body into `fgumi-bam-io::write_bai_sidecar`, with the
path derived by a new `bai_sidecar_path` that appends `.bai` to the full path
(samtools convention), correct for any path. The single `IndexBamFinalizeHook`
(de-duplicated in the preceding trait-hoist commit) collapses to one call plus
its log lines, so the fix lives in exactly one place (X1-004).

`bai_sidecar_path` is a pure function unit-tested over `.bam`, extensionless,
and non-`.bam`-extension paths; the sort-cli hook smoke test continues to
round-trip a real BAM through `write_bai_sidecar`. No behavior change on the
common `*.bam` path.
@nh13
nh13 force-pushed the nh/runall-fix-1-foundation branch from 5900b0d to 12ef53a Compare June 25, 2026 01:36
@nh13
nh13 temporarily deployed to github-actions June 25, 2026 01:36 — with GitHub Actions Inactive
@nh13

nh13 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13

nh13 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13
nh13 merged commit 41f9d3c into feat-runall Jun 25, 2026
18 of 19 checks passed
@nh13
nh13 deleted the nh/runall-fix-1-foundation branch June 25, 2026 04:13
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