Skip to content

feat(cli)!: rename -s to -sc for --max-supercluster-size (#233) - #243

Merged
TimD1 merged 1 commit into
devfrom
233_td_sc-cli
Aug 11, 2026
Merged

feat(cli)!: rename -s to -sc for --max-supercluster-size (#233)#243
TimD1 merged 1 commit into
devfrom
233_td_sc-cli

Conversation

@TimD1-bot

@TimD1-bot TimD1-bot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Note

Authorship: the content below was drafted by Claude Opus 5 (an AI coding agent) and
filed via gh under @TimD1-bot, a bot account operated by @TimD1. It reflects the
agent's analysis, not a statement authored by @TimD1.

Resolves #233. Part of #47.

Warning

Breaking, user-facing CLI change. Any existing command line passing -s to vcfdist now
fails; see below.

Targets dev directly — the branch is rebased onto dev and carries a single commit.

Change

--max-supercluster-size moves from the short form -s to -sc.

Before After Long form
-s -sc --max-supercluster-size

-sc matches the multi-character convention already used by -sv, -mq, -ct and -ci. The
point of the move is to free the mnemonic -s for the stratification flag added under #47 — a
short form cannot mean two things at once.

Only the short form changes, so the long form still works, and the prose references to
--max-supercluster-size in src/cluster.cpp:580,977,1010 and the validation message at
src/globals.cpp:409 all still read correctly and are untouched.

No -s alias is retained

Deliberately. A silent alias would let an existing -s 15000 invocation be reinterpreted as a
file path once -s means stratification — a confusing failure at best, a wrong run at worst.
Bare -s now falls through to Unexpected option '-s' and exits 1, so an old command line
fails loudly instead of being silently reinterpreted.

Testing

  • ParseArgs.SuperclusterOk and ParseArgs.SuperclusterTooSmallErrors retargeted to -sc, as
    was the -l 200 -sc 100 case in ParseArgs.SuperclusterLtMaxSizePlus2Errors.
  • New ParseArgs.SuperclusterBareSDashRejected pins bare -s as rejected, so the no-alias
    decision cannot be silently undone.
  • New ParseArgs.SuperclusterLongFormOk pins the long form as unaffected by the rename.
  • PrintUsage.ListsDocumentedFlags now requires the usage text to advertise
    -sc, --max-supercluster-size.
  • Integration: test_max-supercluster-size_sc-short-form-accepted runs the swallowed_snps
    fixtures with -sc 20000 and pins counts identical to the default-flag run;
    test_max-supercluster-size_bare-s-rejected runs the same invocation with -s 20000 and
    requires exit 1 with Unexpected option '-s'.

Verified locally on a clean rebuild of the rebased tree: 777/777 unit tests pass, 124/124
pytest cases pass (122 before, plus the two new integration cases). -Wall -Wextra builds of
src/ and tests/unit/build/ produce no warnings, and doxygen src/Doxyfile reports none.

Blast radius

No in-repo caller passes vcfdist's -s; the only occurrences were the unit tests updated here.
No documentation under docs/ or README.md mentions the flag.

@TimD1-bot
TimD1-bot force-pushed the 232_td_error-unsorted-vcf branch 2 times, most recently from c9814f3 to 42041e3 Compare August 11, 2026 16:58
Base automatically changed from 232_td_error-unsorted-vcf to dev August 11, 2026 17:00
BREAKING CHANGE: --max-supercluster-size moves from the short form -s to -sc,
matching the existing multi-character convention of -sv, -mq, -ct, -md and -ci.
This frees the mnemonic -s for the stratification flag added under #47.

No -s alias is retained. A silent alias would let an existing '-s 15000'
invocation be reinterpreted as a file path once -s means stratification, so
bare -s is rejected outright and an old command line fails loudly.

Only the short form changes, so the long form and every prose reference to
--max-supercluster-size still read correctly.
@TimD1
TimD1 merged commit faf2ace into dev Aug 11, 2026
1 check passed
@TimD1
TimD1 deleted the 233_td_sc-cli branch August 11, 2026 17:07
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