Release v1.0.10: Zero-Diff Hot-Path CPU & Heap Optimizations, Singleflight 16 MiB Illumina CRAM Cache, Hostile-Input BAM/BAI/CSI/SAM & Harness Hardening, and 691-Test Suite¶
[!NOTE] Historical Release Document: This document records the release certification for
v1.0.10(engine fingerprint2d82664ff81000f7). For the currentv1.1.0release certification, seedocs/release/v1.1.0-pr.md.
Target Branch: main
Source Branch: release/v1.0.10
Release Fingerprint: 2d82664ff81000f7 (perf_fingerprint 052f5458a6dd77bb)
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 (2d82664ff81000f7): 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.10 off main (a504e85), consolidating 6 engineering pull requests (PR #135–PR #140, following the post-tag v1.0.9 Bioconda recipe SHA-256 sync in PR #134):
- Zero-Diff Hot-Path CPU, Heap & Engine Consolidation (PR #137, PR #138, PR #140):
- Replaces software
count_ones()inswar_mismatch_count_u64with a 3-op branchless multiply-shift horizontal byte sum, tightensfind_35_match(Iterator::positioncandidate scanning + exact O(1)mm0IEEE-7540.1ratio pre-rejects,2.60×faster), addsfind_conseq_sliceeliminating allSclipdeepBTreeMap/IndexMapclones acrossrealignlgdel,find_del_paths, andfind_dup_disc_paths, replaces quadratictmp3scans inrealignlgins30with binary-searched window slices, indexesSOFTP2SVupfront viaSclipSlotinfind_sv, and unifiesfind_mm5/find_mm3and.var/genotype/CigarModifierformatting over stack-allocated buffers (StackBuf). - Clips CIGAR deletion coverage updates (
parse.rs) to sorted merged±5,000 bploaded reference windows with idempotenti64coordinate-compressedfinish_ref_coveragesweeps for> 64 bpspans, flattens multi-tilemax_read_lengthpre-scanning (lib.rs) into a non-nested250 kbpband pool with disjointalignment_startband ownership and a lazy4 MiB2-bitACGT+'N'side-map 12-mer index on 2nd+ parent-wide misses, and addsEXP_UNDERFLOW_LN_F64 = -746.00-ULPexp()short-circuiting and loop-invariantp3hoisting infisher.rs. - Shrinks
JavaHashMap<i32, Vars>to96 B(Option<Box<V>>cold fallback,Option<Box<Vec<K>>>NewKeyLog,active_tree_bins: u32, ASCIIjava_string_hash/java_comparefast-paths,into_entries), removes the private ~572-lineStrNodeRed-Black tree injava_hashmap_key_orderin favor ofJavaHashMap<&str, usize>, addsbuild_aligned_variants_prunedskipping Phase-2collect_reference_variantson doomed sub-threshold sites, consolidates.varserializers viaTableModeStyleacross Simple36/38, Amplicon38/40, and Somatic55/61, addsi64\(O(1)\) pre-regionMatchskipping / single-baseMatchspecialization / fused paired CIGAR scans />= 10Sand>= 12Smodify_pure_sm_in_placefast-paths, adds 2-slotBAM_META_TLS(BAM_CACHE_EPOCH),<= 4096 BBamFeedInnerstashes,ACGTacgt=fast-skip incompute_cram_nm,SeedKey::pair_17_12, and RAIIWorkerRegionGuard, retiresenv RUST_MIN_STACK=67108864inharness/cram_twin.sh, and expandscargo-fuzz(fuzz_modify_cigarSeedMap+fuzz_parse_and_realign) and the Cargo workspace test suite from664to691tests. - Singleflight 16 MiB Illumina CRAM Container Cache, 2-Slot
CRAM_META_TLS& Shared Index Metadata (PR #136, PR #139): - Raises
MAX_CACHED_CRAM_CONTAINER_BYTESincrates/vardictrust-core/src/bam.rsto16 MiB(should_cache_cram_container/fetch_cram_container_in), adds per-key singleflight container decode coalescing (InflightCramDecode/InflightCramGuardonCramContainerCacheShard), upgradesCRAM_META_TLSto 2 slots (lookup_cram_meta_tls/insert_cram_meta_tls), and buffersprevalidate_cram_container_slicesthrough a64 KiBseek-retaining window (SeekWindowReader) so standard10,000–10,240-read150–250 bpIllumina CRAM containers (~6.3–9.8 MiB) decode once across concurrent workers and hitCRAM_CONTAINER_CACHEwhile bounding8 × 4 = 32decoded-record slots to<= 512 MiBand bypassing oversized PacBio/ONT long-read containers, alongsideFileStamp-validated process-wideOnceLock.fai/.gzimetadata sharing across worker threads. - Hostile-Input Hardening, CLI/BGZF Sidecar Safety & CI Supply-Chain Hardening (PR #135, PR #136, PR #138):
- Adds pre-release libFuzzer
.bai/.csistructural header and remaining-byte count pre-validation (MAX_BAI_BYTES = 512 MiB,MAX_CSI_BYTES = 256 MiB,MAX_CSI_DECOMPRESSED_BYTES = 256 MiB, boundingn_ref,n_bin,n_chunk,n_intv, andl_auxbeforenoodlesindex allocation) inread_validated_bai_indexandread_validated_csi_index, and terminates non-advancing text SAM CIGARErrloops immediately inSamRecord::fill_from_alignment_recordandintersects_record(crates/vardictrust-core/src/bam.rs). - Makes
-th/--threadspositional-BED-safe (require_equals = true+ free-positional counting preserving Commons-CLI first-wins duplicate-th), cleans up stale.tbi/.csisidecars and preflight-rejects colliding or unremovable0555sidecars when overwriting BGZF--outputpaths without--tbi/--csi, stagesSpillableVcfAccumulatorspill files in--output's parent directory withstd::env::temp_dir()fallback, and trims unusedregexandnoodlesbed/vcffeatures from binary manifests. - Enforces single-pass FIFO-safe VCF loading, sample-column count parity, and
FORMATsubfield count parity inharness/compare_vcf.py; addsexecvp-safeportable.sh --timeout,resolve_data_root, and 16-pathfind_gitleakswhile removing BSD/macOS GNU-isms across 11 scripts (37harness self-tests); hardens.github/workflows/release.yml(!announcement_is_prerelease, step-scopedCARGO_REGISTRY_TOKEN, idempotent crate publishing, dropped emptyannounce),setup-conda-env(conda-env-v3-),docs.yml(playwright==1.62.0), andgcp_paper_runner.sh; and verifies SHA-256 digests onconcordance_multimodal.shtruth slices andrun_stage_6.shdownloads.
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 2d82664ff81000f7 (perf_fingerprint 052f5458a6dd77bb):
item 1: PASS (Unit tests: 691 total workspace tests: 491 lib + 110 corpus_parity + 29 engine_behavior + 2 amplicon_stream_mem + 3 cram_stack + 29 cli + 3 profile_smoke + 23 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.10, musl-ci PASS)
fingerprint 2d82664ff81000f7
Key Documentation & Validation Artifacts¶
- Project README & Documentation:
README.md - VarDictJava + R + Perl Migration Guide:
docs/migration.md - Omnibus Master Empirical Validation Report:
docs/validation/omnibus-empirical-validation.md - 92-Chromosome Per-Contig Parity Receipt (
v1.0.7):docs/validation/chr-parity-v107.md&benchmarks/chr-parity-v107.json(92 / 92 MATCHacross 5 cohorts, including full 22-autosomeGIAB HG0028,111,171variants) - Master Seven-Level Test Matrix & CI/CD Audit:
docs/testing/test-matrix-and-ci-audit.md - Release Engineering & Packaging Runbook:
CONTRIBUTING.md §9 - Historical Release Certifications:
docs/release/v1.0.9-pr.md,docs/release/v1.0.8-pr.md,docs/release/v1.0.7-pr.md,docs/release/v1.0.6-pr.md,docs/release/v1.0.5-pr.md,docs/release/v1.0.4-pr.md,docs/release/v1.0.3-pr.md,docs/release/v1.0.1-pr.md&docs/release/v1.0.0-pr.md