Skip to content

v0.0.2: auto-detect passes through when nothing found, trims the strongest when mixed - #5

Merged
alejandrogzi merged 2 commits into
masterfrom
v0.0.2
Aug 9, 2026
Merged

alejandrogzi merged 2 commits into
masterfrom
v0.0.2

Conversation

@alejandrogzi

Copy link
Copy Markdown
Member

What

bqc adapter --auto-detect no longer aborts on two detection outcomes:

  • Nothing clears the confidence gates → the file passes through untrimmed (was: exit 2, no output).
  • Two or more unrelated adapters clear them (mixed) → the run trims with the highest-confidence match and the report notes the mixed decision (was: exit 2).

Flag-validation errors (--detect-* without --auto-detect, out-of-range values) still abort.

Changes

  • sniff/adapters.rs: assemble() always recommends the strongest high-confidence candidate; sniff adapters --emit-config still requires a confident result and the sniff mixed warning stays.
  • config.rs: add_detected() appends each mate's recommendation and never errors on a detection outcome; the has_overlap escape is subsumed.
  • adapter.rs: an empty AdapterStage is the documented pass-through (engine already handles zero adapters; a fully empty workflow is still rejected).
  • report.rs: non-confident picks are suffixed with the decision name (e.g. , mixed).
  • Docs and tests updated; the five tests asserting the old aborts now assert pass-through / strongest-wins behavior.

Verification

  • cargo test: 240 unit + 88 integration + 16 property + 1 doctest, all passing.
  • cargo clippy --all-targets: clean.
  • Key coverage: mixed → configured adapter equals sniff candidates[0], r1_reads_trimmed in (0, 6000), decision mixed; inconclusive → full record count preserved, 0 trimmed; primer never auto-selected.

Auto-detection no longer aborts the run when detection is inconclusive or
mixed. A file where nothing clears the confidence gates passes through
untrimmed; a mixed library is trimmed with the highest-confidence match,
and the report shows the decision beside the chosen sequence.

- sniff/adapters: recommend the strongest high-confidence candidate even
  for a mixed file; sniff --emit-config still requires a confident result
- config: add_detected appends each mate's recommendation, never errors on
  a detection outcome; flag-validation errors still abort
- adapter: an empty AdapterStage is the documented pass-through
- report: non-confident picks are suffixed with their decision name
- docs and tests updated to the pass-through and mixed-choice paths
@alejandrogzi
alejandrogzi merged commit 0fd4eb4 into master Aug 9, 2026
12 checks passed
@alejandrogzi
alejandrogzi deleted the v0.0.2 branch August 9, 2026 21:35
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