Skip to content

Release v1.0.7: Comprehensive A–N Parity & Robustness Audit, Bounded 512 MiB CRAM Reference Cache, Parallel Amplicon Mode, and 519-Test Suite

[!NOTE] Historical Release Document: This document records the release certification for v1.0.7 (engine fingerprint 356eb13ba068790c). For the current v1.0.8 release certification, see docs/release/v1.0.8-pr.md.

Target Branch: main
Source Branch: release/v1.0.7
Release Fingerprint: 356eb13ba068790c (perf_fingerprint a8972d03c6daa8fa)
Repository: https://github.com/palakpsheth/VarDictRust
Author / Maintainer: Palak Sheth palakpsheth@gmail.com
Governing Manifesto: rewrites.bio
Acceptance Gate: 8/8 Items PASS (harness/acceptance.sh)
Release Recertification Receipt (356eb13ba068790c): validated vs VarDictJava 1.8.3, dataset micro + s1a-s9 + 17-modality extended + 18-slice multimodal + HG008/SEQC2/HG002(chr20)/Amplicon + 5 truth cohorts + chr1 scale, cmd bash harness/recertify.sh && bash harness/pr_check.sh && bash harness/acceptance.sh


Overview

This pull request prepares and certifies VarDictRust v1.0.7 off main (d5cae8a), consolidating 16 pull requests (PR #67–PR #82) across the comprehensive A–N parity, robustness, and performance audit:

  1. VarDictJava v1.8.3 Oracle Statistical, CIGAR/SV, VCF & Formatting Parity (PR #69, PR #74, PR #75, PR #76, PR #77, PR #78, PR #79):
  2. Replicates HashMap.putVal 9-node treeify trigger (bin_len >= TREEIFY_THRESHOLD in JavaHashMap::insert), JavaHashMap::get_or_put_with / variations::get_or_put_vars, ToVarsBuilder::build_aligned_variants empty-Vars insertion parity before collect_reference_variants, and STRICT_VAR_ORDER=1 unsorted .var row-order verification (crates/vardictrust-core/src/javamap.rs, src/variations/mod.rs, src/tovars.rs, src/realign.rs) (PR #74).
  3. Replicates inc_cnt / insertion tp signed i32 arithmetic and realignlgins signed max_read_length - 10 bounds, excludes =/X from get_soft_clipped_length/get_match_insertion_length/prepare_sv_structures_for_analysis (query_consumed_len in bam.rs), scales CigarModifier::modify_cigar's iteration bound with CIGAR operator count, and traverses svffus/svrfus in is_best_sv_used in OpenJDK HashMap<String, List<Sclip>> bucket order (java_string_hash, java_hashmap_key_order in crates/vardictrust-core/src/cigar/modify.rs, src/cigar/parse.rs, src/realign.rs, src/javamap.rs, src/sv.rs, src/variations/mod.rs) (PR #75).
  4. Replicates DUPRATE=0 snapshot parity, Utils.getRoundedValueToPrint "N."/"-0." formatting (push_java_rounded), FisherExact::get_odds_ratio java_double_to_string scientific notation under --fisher, Apache Commons Math 3 SaddlePointExpansion / HypergeometricDistribution (--fisher), and R 4.x fround 5-decimal even-mantissa tie-break (round_as_r) (crates/vardictrust-core/src/output/table.rs, src/output/vcf.rs, src/stats/fisher.rs, src/types.rs, src/variations/mod.rs) (PR #76, PR #77).
  5. Replicates whole-stream VCF $hash{chr}{start} candidate accumulation and 4-decimal round_half_even AF winner selection across BED regions, Perl sub reorder chromosome ordering (perl_reorder_chromosomes), and > 1 Mbp multi-tile max_read_length pre-scan (scan_multi_tile_max_read_lengths) plus -t (config.dedup) boundary duplicate continuity (crates/vardictrust-core/src/lib.rs, src/output/vcf.rs, src/cigar/modify.rs) (PR #78).
  6. Replicates Commons-CLI createNumber (parse_java_number_*) & first-wins scalar options, -F Integer.decode & samfilter_raw != "0", adaptor 6-mer i + 6 < sequence.len() & ACGTacgt-only complement (realign::fill_adaptor_maps), BED header/delimiter/4-col auto-detect (java_split, detect_amplicon_bed, parse_amp_bed_from_reader java_hashmap_key_order), resolve_mode precedence (#378 / --DP ERR), amplicon segment splice chaining, and zero-coverage -p amplicon null-row formatting (amplicon_38_into / amplicon_40_into) (crates/vardictrust/src/cli.rs, crates/vardictrust-core/src/realign.rs, src/regions.rs, src/postprocess/amplicon.rs, src/output/table.rs) (PR #69, PR #79).
  7. Bounded 512 MiB CRAM Reference Cache, Indexed CRAI Seek & Parallel Amplicon Mode (Issue #63, PR #70, PR #81, PR #82):
  8. Adds a bounded 512 MiB byte-budgeted reference cache (DEFAULT_FASTA_CACHE_BUDGET_BYTES) with active-CramFeed Arc<ContigSlot> pinning (Arc::strong_count == 1 eviction), RegistryDelegatingAdapter handle pooling (MAX_POOLED_FASTA_ADAPTERS = 8), and IndexedCrai binary-searched CRAM slice lookup in crates/vardictrust-core/src/bam.rs (PR #81).
  9. Parallelizes run_amplicon across (chrom, seg_idx) groups via runner::run_parallel with deterministic input-order reassembly, switches VariationMap::get_variation to zero-allocation RawEntryMut, uses FxBuildHasher on Vars::var_desc_to_variant, boxes VariationMap::sv: Option<Box<Sv>>, adds an integer u128 fast path in types::round_half_even, and eliminates hot-path allocations across tovars.rs, sv.rs, util.rs, and variations/util.rs (Issue #63, PR #82).
  10. Splits _rjem_malloc_conf by target OS (background_thread:true on Linux vs background_thread:false,dirty_decay_ms:250,muzzy_decay_ms:0,narenas:8 on non-Linux via MALLOC_CONF_LINUX_DEFAULT, MALLOC_CONF_NON_LINUX_DEFAULT, malloc_conf_bytes_for_target in crates/vardictrust/src/main.rs) (PR #70).
  11. Robustness Hardening, Harness Portability & 519-Test Workspace Suite (PR #67–PR #73, PR #80):
  12. Enforces harness/lint_ratchet.sh (forbidding production unwrap/expect/panic!/unreachable!), rejects truncated BGZF EOF (UnexpectedEof), validates CRAM/FASTA contig spans (validate_cram_span, fetch_subsequence past-end error) with 3' chromosome-end overhang padding (CRAM_REF_OVERHANG_PAD = 65_536), preserves raw Vec<u8> quality bytes for Phred >= 95 (normalize_cram_base), enforces i32 region coordinate bounds (parse_int_with_commas <= i32::MAX) and the 16 MiB worker stack floor (WORKER_THREAD_STACK_FLOOR_BYTES / run_with_worker_stack in crates/vardictrust-core/src/runner.rs), guards x86_64 80-bit long double oracle environments (harness/run_oracle.sh, harness/compare.sh, harness/golden_store.py), eliminates GNU-isms across harness scripts (harness/lib/portable.sh), expands the workspace test suite from 427 to 519 tests, and expands the harness diagnostic self-test suite to 36/36 scripts (25 shell tests and 11 Python test suites).

Acceptance Gate & PR Check Certification

Both bash harness/pr_check.sh (6/6 stages) and bash harness/acceptance.sh (8/8 items) pass under certified engine fingerprint 356eb13ba068790c (perf_fingerprint a8972d03c6daa8fa):

item 1: PASS (Unit tests: 519 total workspace tests: 350 lib + 110 corpus_parity + 26 engine_behavior + 2 amplicon_stream_mem + 3 cram_stack + 19 cli + 3 profile_smoke + 5 robustness + 1 version)
item 2: PASS (Level 2: 91/92 static expected matches + UB-4 isolated; micro live oracle smoke.sh PASS)
item 3: PASS (Level 3: 17/17 benchmarks MATCH: micro + 10 slices + HG008 + SEQC2 exome + SEQC2 slices + HG002 + Amplicon + 17-mode extended + 18-slice multimodal)
item 4: PASS (Robustness: crash corpus + HG008 CRAM twin PASS)
item 5: PASS (Level 5 Scale & Perf-Budget PASS)
item 6: PASS (Level 4 Truth set: HG008, SEQC2, HG002, HG005, NA24385 b37 EQUAL across all 5 cohorts)
item 7: PASS (Hygiene: fmt, clippy, audit, deny, gitleaks 0 leaks)
item 8: PASS (Distribution: --version metadata 1.0.7, musl-ci PASS)
fingerprint 356eb13ba068790c

Key Documentation & Validation Artifacts