Skip to content

fix(zipper): name the tag-skipping flag after the tag it actually writes - #617

Merged
nh13 merged 1 commit into
mainfrom
nh/fix-skip-tc-tags-alias
Jul 22, 2026
Merged

nh13 merged 1 commit into
mainfrom
nh/fix-skip-tc-tags-alias

Conversation

@nh13

@nh13 nh13 commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

The flag was --skip-pa-tags and its help said it skipped "pa (primary alignment) tags" — but the struct field is skip_tc_tags and the command writes tc (template coordinate). No pa tag has ever been written, so a user who grepped the output for the thing the flag named found nothing.

Renamed to --skip-tc-tags, with --skip-pa-tags kept as an alias rather than renamed outright, so existing scripts keep working. Repo precedent for that is the --queue-memory* aliases. Help text and the internal step comment now say tc.

One detail worth flagging: the tag bytes are lowercase tc, not TC — SamTag::TC is the Rust constant's name, not the tag's spelling (assert_eq!(*SamTag::TC, [b't', b'c'])). The help refers to it as tc accordingly, since that is what a user would actually grep for.

The existing parsing test gains cases for the new spelling alongside the retained alias, covering the bare flag, explicit true/false, and the = form for both — 13 cases total.

cargo ci-test (5539 tests), cargo ci-fmt, cargo ci-lint, RUSTDOCFLAGS="-D warnings" cargo ci-doc pass.

Summary by CodeRabbit

  • New Features

    • Added the --skip-tc-tags command-line option for controlling template-coordinate tags on supplementary reads.
    • Retained --skip-pa-tags as a backward-compatible alias.
  • Documentation

    • Updated command help text to accurately describe template-coordinate tag behavior.

The flag was `--skip-pa-tags` and its help said it skipped "`pa` (primary
alignment) tags", but the field is `skip_tc_tags` and the command writes `tc`
(template coordinate). No `pa` tag has ever been written, so a user grepping the
output for what the flag named found nothing.

Renames it to `--skip-tc-tags` and keeps `--skip-pa-tags` as an alias rather
than renaming outright, so existing scripts keep working; repo precedent for
that is the `--queue-memory*` aliases. The help text and the internal step
comment now say `tc`.

Note the tag bytes are lowercase `tc` -- `SamTag::TC` is the constant's name,
not the tag's spelling -- so the help refers to it that way.

The existing parsing test gains cases for the new spelling alongside the alias,
covering the bare flag, explicit true/false, and the `=` form for both.
@nh13
nh13 temporarily deployed to github-actions July 21, 2026 01:48 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed249817-cb3e-48d9-8dfb-d8aad8b7580d

📥 Commits

Reviewing files that changed from the base of the PR and between 3da9945 and 43e9cab.

📒 Files selected for processing (1)
  • src/lib/commands/zipper.rs

Walkthrough

The Zipper flag is renamed to --skip-tc-tags, while --skip-pa-tags remains an alias. Help text, the merge step comment, and parsing tests now use the corrected template-coordinate terminology.

Changes

Zipper template-coordinate tag flag

Layer / File(s) Summary
Flag contract and parsing validation
src/lib/commands/zipper.rs
The public flag uses --skip-tc-tags with --skip-pa-tags as an alias; related documentation, comments, and boolean parsing tests were updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 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 describes the main change: renaming the zipper tag-skipping flag to match the tc tag it controls.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nh/fix-skip-tc-tags-alias

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

@codecov

codecov Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.42%. Comparing base (f3b0c78) to head (43e9cab).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #617      +/-   ##
==========================================
- Coverage   93.42%   93.42%   -0.01%     
==========================================
  Files         175      175              
  Lines      104807   104797      -10     
==========================================
- Hits        97919    97909      -10     
  Misses       6888     6888              

☔ 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 Jul 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 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 Jul 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 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 1db2c5b into main Jul 22, 2026
14 checks passed
@nh13
nh13 deleted the nh/fix-skip-tc-tags-alias branch July 22, 2026 18:33
@nh13 nh13 mentioned this pull request Jul 22, 2026
@emmcauley emmcauley mentioned this pull request Jul 31, 2026
3 of 6 tasks
nh13 added a commit that referenced this pull request Aug 1, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Two tests pin the help: one rejects a denial of the `pa` history, one requires
the version boundary, `re-zipper`, and `dedup` so the help keeps pointing at
the failure a user with pre-0.2.0 output will actually hit.

Closes #679
nh13 added a commit that referenced this pull request Aug 2, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Two tests pin the help: one rejects a denial of the `pa` history, one requires
the version boundary, `re-zipper`, and `dedup` so the help keeps pointing at
the failure a user with pre-0.2.0 output will actually hit.

Closes #679
nh13 added a commit that referenced this pull request Aug 2, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Scope the rename-in-place escape hatch in both the help and the changelog.
`pa` is also bwa-mem's `pa:f` score tag on primary reads, so an unqualified
"rename the tag" points at the wrong one: only the legacy sort key itself —
the six-element `pa:B:i` array on secondary and supplementary reads — may be
renamed to `tc`. Renaming `pa:f` destroys alignment metadata and leaves a
`tc:f` where a `tc:B:i` belongs, and that fails silently: dedup only checks
that `tc` is present, so a wrong-typed tag clears `missing_tc_tag` and then
fails to parse in `TemplateCoordinateInfo::from_tag_value`.

An rstest table pins each clause of that history and every documented way out
— including the two cases that scope the rename — so the help keeps pointing
at the failure a user with pre-0.2.0 output will actually hit; a companion
test rejects any return to denying the `pa` history.

Closes #679
nh13 added a commit that referenced this pull request Aug 3, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Scope the rename-in-place escape hatch in both the help and the changelog.
`pa` is also bwa-mem's `pa:f` score tag on primary reads, so an unqualified
"rename the tag" points at the wrong one: only the legacy sort key itself —
the six-element `pa:B:i` array on secondary and supplementary reads — may be
renamed to `tc`. Renaming `pa:f` destroys alignment metadata and leaves a
`tc:f` where a `tc:B:i` belongs, and that fails silently: dedup only checks
that `tc` is present, so a wrong-typed tag clears `missing_tc_tag` and then
fails to parse in `TemplateCoordinateInfo::from_tag_value`.

An rstest table pins each clause of that history and every documented way out
— including the two cases that scope the rename — so the help keeps pointing
at the failure a user with pre-0.2.0 output will actually hit; a companion
test rejects any return to denying the `pa` history.

Closes #679
nh13 added a commit that referenced this pull request Aug 4, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Scope the rename-in-place escape hatch in both the help and the changelog.
`pa` is also bwa-mem's `pa:f` score tag on primary reads, so an unqualified
"rename the tag" points at the wrong one: only the legacy sort key itself —
the six-element `pa:B:i` array on secondary and supplementary reads — may be
renamed to `tc`. Renaming `pa:f` destroys alignment metadata and leaves a
`tc:f` where a `tc:B:i` belongs, and that fails silently: dedup only checks
that `tc` is present, so a wrong-typed tag clears `missing_tc_tag` and then
fails to parse in `TemplateCoordinateInfo::from_tag_value`.

An rstest table pins each clause of that history and every documented way out
— including the two cases that scope the rename — so the help keeps pointing
at the failure a user with pre-0.2.0 output will actually hit; a companion
test rejects any return to denying the `pa` history.

Closes #679
nh13 added a commit that referenced this pull request Aug 4, 2026
`--skip-tc-tags` long help said the former `--skip-pa-tags` spelling
"described a `pa` tag that this command has never written ... the tag is and
always was `tc`". Both halves are false: v0.1.3 zipper contains
`let pa_tag = b"pa"`, and 40b685c ("rename sort-key tag from pa to tc",
0.2.0) is the commit that changed the literal to `tc`. The claim came in with
#617, which correctly renamed the flag but overcorrected on the history.

It also misinforms the users who have such BAMs. A BAM zippered by a pre-0.2.0
release carries `pa` and no `tc`; dedup counts `missing_tc_tag` on its
secondary/supplementary reads and bails with a re-zipper instruction. The help
told those users nothing about their output had changed.

Replace the sentence with the actual history and the way out, and correct the
0.2.0 changelog entry, which claimed the flag rename landed there. It renamed
the tag and the `missing_pa_tag` metric; the flag stayed spelled
`--skip-pa-tags` through 0.4.0 and was renamed in 0.5.0 (#617). Anyone who
followed those release notes and passed `--skip-tc-tags` on 0.2.0-0.4.0 got an
unknown-argument error.

Scope the rename-in-place escape hatch in both the help and the changelog.
`pa` is also bwa-mem's `pa:f` score tag on primary reads, so an unqualified
"rename the tag" points at the wrong one: only the legacy sort key itself —
the six-element `pa:B:i` array on secondary and supplementary reads — may be
renamed to `tc`. Renaming `pa:f` destroys alignment metadata and leaves a
`tc:f` where a `tc:B:i` belongs, and that fails silently: dedup only checks
that `tc` is present, so a wrong-typed tag clears `missing_tc_tag` and then
fails to parse in `TemplateCoordinateInfo::from_tag_value`.

An rstest table pins each clause of that history and every documented way out
— including the two cases that scope the rename — so the help keeps pointing
at the failure a user with pre-0.2.0 output will actually hit; a companion
test rejects any return to denying the `pa` history.

Closes #679

This branch was previously deployed

1 inactive deployment
github-actions — 43e9cab6 Deployed Jul 21, 2026 by nh13 via coverage #2824
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