VarDictRust Contributor Guide¶
Welcome to the VarDictRust developer and contributor guide! VarDictRust is an idiomatic, production-grade Rust rewrite of VarDictJava v1.8.3, built under the principles of the rewrites.bio manifesto.
This document serves as the authoritative, standalone manual for developing, testing, benchmarking, and submitting contributions to the VarDictRust codebase.
1. The rewrites.bio Parity Mission¶
VarDictRust is built with one central commitment: to produce output identical to VarDictJava v1.8.3 on valid inputs by default (--compat=vardictjava / --parity) while scaling gracefully to deep whole-genome sequencing (WGS), with opt-in --compat=off (CompatProfile) correctness fixes and consolidated VCF capabilities.
1.1 The Prime Directive (AGENTS.md §5)¶
All variant calling output on valid genomic inputs must match VarDictJava v1.8.3 by default (--compat=vardictjava / --parity):
- Exact Variant Parity: The variant set (CHROM, POS, REF, ALT), every FILTER decision, INFO and FORMAT tags, genotypes (GT), variant TYPE, and somatic STATUS must match upstream VarDictJava.
- Float Tolerance: P-values, odds ratios, and allele frequencies must match within \(\varepsilon = 10^{-6}\), adhering strictly to IEEE 754 half-even banker's rounding (round_half_even).
- Intermediate Column Counts: Intermediate .var tables must strictly adhere to upstream column schemas:
- Simple Mode: 36 columns (default) / 38 columns (--fisher).
- Amplicon Mode: 38 columns (default) / 40 columns (--fisher).
- Somatic Mode: 55 columns (default) / 61 columns (--fisher).
- Bug Emulation & Compatibility Policy (--compat=vardictjava|off): If VarDictJava v1.8.3 has an output quirk (such as SV split-read requirements or <dup-N> symbolic tokens), replicate it faithfully under the default --compat=vardictjava profile (--parity). Output-changing corrections ship only behind opt-in --compat=off (CompatProfile in crates/vardictrust-core/src/config.rs, stamping ##VarDictRustCompat=off in VCF headers — never proliferated --fix <id> CLI flags) per ROADMAP.md, while multi-allelic VCF emission mirrors var2vcf_*.pl -A via explicit --vcf-all-alleles (--all-alleles). Where VarDictJava crashes (e.g. modifyCigar #341 or NPEs), VarDictRust must produce valid output or fail fast without panicking.
1.2 Integrity: Evidence Before Assertions (AGENTS.md §0 & §0b)¶
- Never claim a task is done without verifiable evidence. Evidence consists of passing
harness/compare.sh(MATCH), passingcargo test, or passingharness/acceptance.sh. - Never fake a pass. You must never relax
--eps, narrow column ranges, hand-edit golden/expected files, or skip failing fixtures to force a match. If a check fails, the Rust port is wrong: fix the port, not the test.
2. Prerequisites & Repository Setup¶
2.1 Cloning the Repository with Submodules¶
VarDictRust relies on the upstream VarDictJava test suite as a git submodule:
# Clone with all submodules initialized:
git clone --recurse-submodules https://github.com/palakpsheth/VarDictRust.git
cd VarDictRust
# Or if cloned without --recurse-submodules:
git submodule update --init --recursive
2.2 Toolchain Requirements¶
- Rust Toolchain:
- Rust stable (
rustc >= 1.91.0,cargo,rustfmt,clippy): - Oracle Environment (VarDictJava v1.8.3):
- The reference oracle runs VarDictJava v1.8.3 via bioconda on
Linux x86_64(where R uses x87 80-bitlong double,.Machine$sizeof.longdouble == 16, required for exact Fisher MLE parity inteststrandbias.Randtestsomatic.R): - On macOS (
Darwin/arm64) orLinux/aarch64hosts,harness/run_oracle.shandharness/compare.shfail fast withORACLE-PLATFORMunlessORACLE_CONTAINER=1is set to execute the oracle inside alinux/amd64container (docker run --rm --platform linux/amd64 ...). - Bioinformatics & Security Utilities:
- Tools required for testing and secret scanning:
samtools,bwa,rtg-tools, andgitleaks(gitleaksis installed separately via host package manager such asbrewor distro package, or an upstream release binary, rather than theconda-forge/biocondag4-tools.ymlspec; seefind_gitleaksinharness/lib/portable.sh): - Conda Package Manager:
- If
condais not installed on your system, install Miniforge or Miniconda. - Reference Genomes & Test Data Ingestion:
- Ingest the minimal reference assets required for differential testing:
2.3 The Three-Tier Environment Model (Zero-Virtualenv Architecture)¶
VarDictRust enforces a clear separation of toolchains across three distinct environments:
| Tier | Environment Scope | Managed By | Specification & Lockfile |
|---|---|---|---|
| Tier 1 | Rust Engine Core (Compilation, benchmarks, unit tests) | rustup, cargo |
Cargo.lock (cryptographically locked) |
| Tier 2 | Test & Metrology Harness (VCF comparators, self-tests) | System python3 (3.8+) |
100% Python Standard Library (Zero PyPI / Zero Venv) |
| Tier 3 | Genomics Oracle & Benchmarks (vardict-java, rtg-tools, samtools) |
Bioconda / Conda-Forge | benchmarks/env/vardict-oracle.yml, harness/env/g4-tools.yml |
| (Ephemeral) | Ad-Hoc Developer Tools (cffconvert, pre-commit) |
Astral uvx (Zero-install) |
Ephemeral user cache (no permanent virtualenv) |
[!NOTE] Toolchain Tiers vs Test Verification Tiers: The Tiers in the table above classify environment isolation and package management. They are distinct from the Seven-Level Test Architecture and Differential Testing Tiers (Tier-1
.vartable parity vs Tier-2 VCF parity vs Tier-3 truth concordance) described indocs/testing/test-matrix-and-ci-audit.mdandharness/README.md.No Python Virtual Environment Required: All scripts in
harness/andharness/tests/depend exclusively on the Python standard library (argparse,json,gzip,math,subprocess,unittest). Contributors do not need to create avenvor runpip installto execute the regression harness. This zero-PyPI contract is enforced continuously byharness/tests/test_stdlib_purity.py.
2.4 Building VarDictRust¶
VarDictRust is built using standard Cargo workflows:
# Build debug binary (faster compile, includes debug symbols):
cargo build
# Build optimized release binary (recommended for benchmarking and production):
cargo build --release
# Inspect the compiled binary and CLI options:
./target/release/vardictrust --help
./target/release/vardictrust --version
3. Automated Pre-Commit Hook Framework¶
To catch formatting issues, lint warnings, and accidentally staged secrets before commits enter git history, VarDictRust supports automated pre-commit hooks.
Track A: Zero-Dependency Native Git Hook (Recommended)¶
VarDictRust includes a native bash pre-commit hook that requires no Python or pip dependencies:
This configures Git to use repository-managed hooks in.githooks/ (git config core.hooksPath .githooks).
What it checks in \(<3\) seconds:
1. Staged File Filtering: If no Rust or Cargo files are staged (e.g. documentation, markdown, or shell script commits), cargo fmt and cargo clippy are skipped, completing in \(<0.3\) seconds.
2. Code Formatting: Runs cargo fmt --all -- --check.
3. Clippy Lints: Runs cargo clippy --all-targets --all-features -- -D warnings.
4. Secret Scanning: Runs gitleaks protect --staged -v using any available gitleaks installation.
Track B: Standard Python Pre-Commit (Optional)¶
Contributors who prefer the standard Python pre-commit framework can use .pre-commit-config.yaml:
# First unset core.hooksPath if Track A was previously active:
git config --unset core.hooksPath
# Install and activate python pre-commit:
pip install pre-commit
pre-commit install
[!NOTE] Track A and Track B are mutually exclusive. To switch back to Track A at any time, run
bash harness/setup_hooks.sh. To disable all hooks, rungit config --unset core.hooksPath.
3.4 Repository-Specific Agent Skills (.agents/skills/)¶
VarDictRust ships four repository-specific Agent Skills under .agents/skills/ that encode the repository's verification gates, profiling workflows, and release runbooks for both human contributors and AI coding agents:
| Skill | Path | When to Use & Bundled Tools |
|---|---|---|
vardictrust-issue |
.agents/skills/vardictrust-issue/SKILL.md |
Filing, triaging, or reproducing GitHub issues (default --compat=vardictjava parity/crash bugs vs v1.1+ --compat=off CompatProfile proposals) with harness/slice.sh and harness/compare.sh. |
vardictrust-pr |
.agents/skills/vardictrust-pr/SKILL.md |
Opening, recertifying (harness/recertify.sh), reviewing, or squash-merging PRs, completing .github/pull_request_template.md, and replying inline to review threads. |
vardictrust-profiling |
.agents/skills/vardictrust-profiling/SKILL.md |
Running profile-cpu, profile-heap, or profile-dhat via harness/profile.sh and harness/profile_catalog.py (API reference). |
vardictrust-release |
.agents/skills/vardictrust-release/SKILL.md |
Cutting a release across GitHub Releases, Crates.io, Bioconda, Nextflow nf-core/modules, and ReadTheDocs (consistency validator & 20-file surface map). |
Discovery across AI tools: .agents/skills/ is committed in-tree and discovered automatically by Gemini CLI, OpenAI Codex, GitHub Copilot, Cursor, and OpenCode. Contributors can also run the bundled release consistency validator directly:
python3 .agents/skills/vardictrust-release/scripts/check_release_consistency.py --version 1.2.0 --phase pre-tag --verify-cargo-list
4. Architectural Invariants & Safety¶
All contributions to crates/vardictrust-core/ and crates/vardictrust/ must adhere strictly to the following architectural rules:
4.1 Memory Safety & The No-Panic Rule¶
#![forbid(unsafe_code)]: The core engine crate strictly forbidsunsafecode.- Zero Panics in Library Code: In
crates/vardictrust-core/src/**(outside#[cfg(test)]), you must never useunwrap(),expect(),panic!(),unreachable!(), bare slice indexingx[i]without prior bounds checks, or arithmetic that can overflow on user input. - Actionable Error Propagation: Return
Result<T, VardictError>with the?operator.
4.2 Coordinate Indexing (AGENTS.md §6)¶
- 0-based Coordinates (
Pos0): Coordinates from BAM/SAM alignments (via noodles) are 0-based, half-open[start, end). - 1-based Coordinates (
Pos1): VCF output and internal VarDict logic are 1-based inclusive[start, end]. - Strict Conversions: Always convert via
.to_one_based()and.to_zero_based(). Never add a raw integer to a coordinate.
4.3 Determinism & Fidelity Hazards (AGENTS.md §8)¶
- Banker's Rounding: Every floating-point metric written to table or VCF output must use IEEE 754 half-even rounding via
round_half_even(default--compat=vardictjavaOpenJDKDecimalFormatunderflow-tie parity) orround_half_even_compat(exact binary IEEE 754 ties under--compat=off). Never use Rust's default formatter rounding. - Java HashMap Iteration Parity: Java's
HashMapiteration order is emulated using deterministicJavaHashMap, which reproduces OpenJDK 8+ hash bucket spread, binning, and iteration semantics. Never replace it withstd::collections::HashMapin output or realignment paths. - Sequences as Bytes: Biological sequences are byte slices (
&[u8]orVec<u8>), neverString. - Phred Quality Scores: Encoded as Phred+33:
Phred(byte.saturating_sub(33)).
4.4 Bounded Memory & Scale (AGENTS.md §10)¶
- Tile-and-Halo Traversal: Regions
<= 1 Mbprun untiled by default (DEFAULT_UNTILED_SPAN_MAX = 1_000_000); intervals> 1 Mbpare partitioned into discrete100 kbptiles (DEFAULT_TILE_SIZE = 100_000, overridable via--tile-size) with overlapping read/SV halo windows,SplitVarDeduper(200 kbpcross-tile.varboundary retention), andSpillableVcfAccumulator(8 MiBwhole-stream spill threshold). State is streamed through the per-tile pipeline and dropped promptly via RAII. - Zero Whole-Chromosome Buffering: Never load or buffer entire chromosomes in memory.
5. Testing Hierarchy & Developer Inner Loop¶
VarDictRust enforces a multi-tiered testing hierarchy designed for fast local iteration and exhaustive verification.
flowchart LR
Smoke["1. Inner Loop\nharness/rgate.sh\n(<30s)"] --> Diff["2. Differential Test\nharness/compare.sh\n(Live Oracle)"]
Diff --> PRGate["3. PR Gate\nharness/pr_check.sh\n(6 Stages)"]
PRGate --> AccGate["4. Acceptance Gate\nharness/acceptance.sh\n(8 Items)"]
5.1 The Port Loop (AGENTS.md §7)¶
When porting or modifying variant calling logic, follow the rewrites.bio port loop:
1. Read the upstream VarDictJava implementation and cite it (e.g. /// ports CigarModifier.java:61-71).
2. Write the Rust code and its corresponding unit test.
3. Verify against the live oracle using harness/compare.sh.
4. Commit when differential comparison yields MATCH.
5.2 Inner Developer Loop (rgate.sh & Cargo)¶
For fast local iteration while coding:
# Automated compound inner loop (<30s):
bash harness/rgate.sh
# Or execute specific Cargo steps directly:
cargo test --workspace # Run all workspace unit tests
cargo test -p vardictrust-core cigar # Run tests in a specific module
cargo clippy --all-targets --all-features -- -D warnings # Zero-warning linter
cargo fmt --all -- --check # Check code formatting
5.3 Differential Testing (compare.sh)¶
Compare VarDictRust output against the live VarDictJava oracle:
# Simple / Germline Mode:
bash harness/compare.sh <ref.fa> <sample.bam> <regions.bed> [sample_name]
# Somatic Paired Mode (tumor|normal syntax):
bash harness/compare.sh <ref.fa> "tumor.bam|normal.bam" <regions.bed> [sample_name]
5.4 Comprehensive PR Verification (pr_check.sh — Tier A Per-PR Gate)¶
Before submitting any pull request, run the 6-stage PR validation suite defined in harness/pr_check.sh:
<25s using the pinned golden baseline store and automatically verifies:
1. Stage 1 (Hygiene & Unit Tests): Formatting, Clippy lints, and all 934 workspace unit and integration tests (Level 1).
2. Stage 2 (Crash Robustness): PR #402, missing index #187, and Issue #341 family fixtures (executed within the workspace test run).
3. Stage 3 (Upstream Integration Corpus): 92 fixtures (Level 2) across 8 parallel workers, asserting 91 PASS / 1 XFAIL (UB-4 upstream fixture defect).
4. Stage 4 (Dual-Engine Differential Parity): Micro differential fixture, all 10 standard slices (s1a..s9), 17-modality extended coverage (--no-record), and 18-slice multimodal suite (--no-record) against the VarDictJava oracle (Level 3).
5. Stage 5 (Performance & Memory Budgets): 5-target regression budget via harness/perf_budget.py (Level 5).
6. Stage 6 (Security Hygiene): Staged and repository secret scanning with gitleaks.
5.5 Master Release Recertification & Acceptance Gate (recertify.sh & acceptance.sh — Tier B Release Gate)¶
When cutting a release (release/vX.Y.Z) or certifying a milestone baseline against committed benchmark evidence, run the push-button recertification and 8-item acceptance gate:
harness/recertify.sh refreshes all 15 non-scale evidence JSONs in benchmarks/evidence/*.json (reusing pinned VarDictJava/vardictcpp baselines and cached rtg vcfeval truth evaluations), synchronizes the 16-row SHA-256 and fingerprint tables across documentation via python3 harness/sync_evidence_docs.py, and executes bash harness/acceptance.sh to enforce the 8 acceptance criteria defined in AGENTS.md §15 and docs/testing/test-matrix-and-ci-audit.md §2. (harness/scale_bench.sh is required only when bash harness/engine_fingerprint.sh --perf changed since benchmarks/evidence/scale.json.)
Additionally, contributors can execute the diagnostic self-test suite (Level 6) at any time:
For the complete seven-level testing architecture, push-button reproduction commands, and dataset provenance catalog, see the Master Reproducibility Runbook in docs/testing/test-matrix-and-ci-audit.md.
6. Pull Request Lifecycle & Requirements¶
6.1 Atomic Commits¶
- Use descriptive conventional commits:
fix(cigar): <short description>orfeat(somatic): <short description>. - Do not combine unrelated refactorings or formatting changes with algorithmic edits.
6.2 The Pull Request Checklist¶
When opening a pull request (see the vardictrust-pr skill), complete all items in .github/pull_request_template.md:
- [ ] Code compiles with zero warnings: cargo clippy --all-targets --all-features -- -D warnings.
- [ ] Code formatting verified: cargo fmt --all -- --check.
- [ ] All unit tests pass: cargo test --workspace.
- [ ] PR validation suite passes: bash harness/pr_check.sh.
- [ ] No regression against the 5-target performance budget (runtime regression \(\le 5\%\), peak RSS 0% increase across HG008, SEQC2, HG002, Amplicon, and HG008 CRAM twin \(\le 2.50\times\)).
- [ ] No secrets or credentials in git history (gitleaks).
- [ ] Multi-skill review completed and findings fixed through /ponytail-review, /rust-router, and /pragmatic-rust-guidelines.
- [ ] Waited for copilot-pull-request-reviewer[bot] review to finish; every review comment refuted or fixed with an inline reply and every review thread resolved (resolveReviewThread).
6.3 Mandatory Multi-Skill & Automated PR Review Resolution Gate (AGENTS.md §15.8)¶
Before merging any pull request into main:
1. Multi-Skill Audit & Fix: Run /ponytail-review, /rust-router, and /pragmatic-rust-guidelines on the PR diff (git diff origin/main...HEAD) and fix all identified correctness, ownership/mutability, error-handling, performance, and idiomatic Rust issues via Red/Green TDD.
2. Wait for Copilot PR Review Completion: Never merge a PR solely because GitHub Actions CI checks are green while copilot-pull-request-reviewer[bot] is still pending in requested_reviewers or has not posted its review for the latest commit. Poll until the Copilot review is posted:
gh api --paginate repos/palakpsheth/VarDictRust/pulls/<PR>/reviews \
--jq '.[] | {id: .id, user: .user.login, state: .state, commit_id: .commit_id}'
copilot-pull-request-reviewer[bot] or any other automated/human reviewer:
- Evaluate the finding technically; push a surgical fix commit (or prepare a technical refutation with code/oracle evidence if the suggestion is invalid) and re-run bash harness/pr_check.sh.
- Reply inline to each comment (repos/palakpsheth/VarDictRust/pulls/<PR>/comments/<COMMENT_ID>/replies).
- Resolve every review thread via the GitHub GraphQL resolveReviewThread mutation before running gh pr merge <PR> --squash --delete-branch.
7. Governance & Repository Policies¶
Contributors must adhere to the following governance policies:
7.1 Commit Trailer Hygiene Policy¶
- Strictly Zero
Co-Authored-ByTrailers: Do not includeCo-Authored-Bytrailers in commit messages. - Transparent AI Disclosures: Machine assistance and AI tool participation are documented transparently in
README.mdandCITATION.cff, not in commit metadata.
7.2 Concurrency & Resource Management¶
- Parallel Testing on Constrained Systems: Running heavy multi-threaded test suites (e.g.
cargo test --workspace) spawns threads proportional to available logical CPU cores. On systems with constrained memory, restrict test parallelism using standard Cargo flags or environment variables: - Differential Runner Threads: Scripts accepting thread flags (such as
compare.sh -th <N>) default to multi-threaded execution. Adjust<N>to match your hardware capacity.
8. Getting Help & Security¶
- Reporting Issues: Search existing issues before creating a new report (see the
vardictrust-issueskill). Include the exact BAM slice, reference region, and command line to reproduce. - Reporting Security Vulnerabilities: Please review our Security Policy to report vulnerabilities privately. Do not disclose security issues publicly in GitHub Issues.
9. Release Process & Packaging Runbook¶
Releases are executed through a disciplined three-phase workflow (Pre-Release PR → Annotated Tag & CI Release → Post-Tag Downstream Sync) governed by AGENTS.md §§0, 0b, 5, 15, 18 and automated by the vardictrust-release skill (check_release_consistency.py). Direct pushes to main are blocked by .githooks/pre-push.
9.1 Release Policy & SemVer Governance¶
v1.0.xPatch / Maintenance Releases: Preserve pure byte-for-byte and floating-point parity (\(\varepsilon = 10^{-6}\)) with VarDictJava v1.8.3 on valid inputs (AGENTS.md §5). Allowed changes include crash/robustness fixes, harness/reproducibility additions, packaging, and documentation updates.v1.1.0+Feature &--compat=offReleases: Default invocations remain 100% byte-identical to VarDictJava v1.8.3 (--compat=vardictjava, aliasesvardictjava-1.8.3/1.8.3, or--parity). Output-changing corrections to upstream VarDictJava bugs ship only behind explicit opt-in--compat=off(CompatProfile, stamping##VarDictRustCompat=offin VCF headers) with a strict diff-confinement gate, alongside explicit opt-in CLI features (--preset,--vcf-all-alleles/--all-alleles,--amplicon-single-primer/-sp,--output,--tbi/--csi,--stats-json,--completions,--manpage) perROADMAP.md.
9.2 Phase 1 — Pre-Release Branch, Version Bump & Fingerprint Rule¶
- Branch off fresh
origin/main: - Update the 20 version-bearing surfaces (
18pre-tag files; keeppackaging/bioconda/recipes/vardictrust/meta.yamlandpackaging/nf-core/modules/vardictrust/for Phase 3): Cargo.toml([workspace.package] version = "X.Y.Z") andcrates/vardictrust/Cargo.toml(vardictrust-core = { version = "X.Y.Z", path = "../vardictrust-core" }), followed bycargo update -wsoCargo.lockupdates only the workspace packages.CHANGELOG.md: add## [X.Y.Z] - YYYY-MM-DD(required bycargo-distto populate GitHub Release notes) and preserve exact Bioconda subdir names (linux-64,linux-aarch64,osx-arm64,osx-64).CITATION.cff(versionanddate-released),README.md(install tags and BibTeX version),.github/ISSUE_TEMPLATE/bug_report.yml,.github/SECURITY.md(activeX.Y.xSupported Versions row),packaging/bioconda/prepare_bioconda_pr.sh, andpackaging/nf-core/prepare_nfcore_pr.sh(VERSION="${1:-X.Y.Z}").- Release certification dossier
docs/release/vX.Y.Z-pr.mdand release metadata references indocs/testing/test-matrix-and-ci-audit.md,docs/validation/omnibus-empirical-validation.md,DIVERGENCES.md,benchmarks/README.md,harness/README.md,zensical.toml, andwiki/. - Engine Fingerprint & Live Recertification Rule (
AGENTS.md §0b): harness/engine_fingerprint.shhashes the rawHEAD:<path>git blob OIDs of allGATE_FILES(includingCargo.toml,crates/vardictrust/Cargo.toml, andCargo.lock), so bumpingX.Y.Zin Step 2 advancesFPandPERF_FPand requires runningbash harness/recertify.shonrelease/vX.Y.Zto certify all 16 evidence JSONs inbenchmarks/evidence/.- If any engine source (
crates/*/src), external dependency (Cargo.lock), comparator, runner, or fixture inGATE_FILESchanged since the last certification, you must runbash harness/recertify.shto re-run the live dual-engine parity suites and stamp updated evidence JSONs honestly (never hand-editbenchmarks/evidence/*.json).
9.3 Phase 1 — Commit-First Verification Sequence & Crates.io Dry-Run¶
Because harness/engine_fingerprint.sh enforces git diff --quiet HEAD -- "${GATE_FILES[@]}" and hashes HEAD:<path>, commit the release edits on release/vX.Y.Z (with zero Co-Authored-By trailers per §7.1) before running the harness gates:
# 1. Verify formatting, zero-warning Clippy, workspace tests, and --version output
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
RUST_TEST_THREADS=4 cargo test --workspace
cargo build --release -p vardictrust
./target/release/vardictrust --version
# 2. Commit tracked release changes on release/vX.Y.Z (clean HEAD required by engine_fingerprint.sh)
git commit -m "chore(release): prepare vX.Y.Z release"
# 3. Verify engine fingerprint and run all 37 diagnostic self-tests
bash harness/engine_fingerprint.sh
bash harness/run_self_tests.sh
# 4. Stage and verify Zensical documentation site in strict mode (then clean build dirs)
python3 harness/prepare_docs_site.py
zensical build --clean --strict
rm -rf .docs_staged site .cache
# 5. Pre-tag crates.io packaging verification
# Note: `cargo publish -p vardictrust --dry-run` queries crates.io for `vardictrust-core = "^X.Y.Z"`,
# which is published first by release.yml during Phase 2. Validate binary packaging via `cargo package --list`.
cargo publish -p vardictrust-core --dry-run
cargo package --list -p vardictrust
# 6. Run Tier B Release Recertification (refreshes any stale evidence JSONs, syncs documentation SHA-256/fingerprint tables, and runs acceptance.sh 8/8) + 6-stage PR gate (--no-record, zero working-tree dirtiness)
bash harness/recertify.sh
bash harness/pr_check.sh
python3 .agents/skills/vardictrust-release/scripts/check_release_consistency.py --version X.Y.Z --phase pre-tag --require-head-fingerprint --verify-cargo-list
9.4 Phase 1 — Opening & Merging the Release PR¶
Push release/vX.Y.Z and open a pull request to main via gh pr create, completing every section of .github/pull_request_template.md and including the mandatory validation receipt (validated vs VarDictJava 1.8.3, dataset <name>, cmd <…> per AGENTS.md §15). Merge to main once all required GitHub Actions workflows (ci.yml, differential.yml, docs.yml, security.yml) are green.
9.5 Phase 2 — Tagging main, cargo-dist SLSA Level 3 & Crates.io Publish¶
- Sync
mainand push an annotated SemVer tag: - Automated Release Pipeline (
.github/workflows/release.yml): PushingvX.Y.Ztriggerscargo-dist 0.33.0, which executes: plan: parsesCHANGELOG.mdfor## [X.Y.Z]and computes the 5 build targets (x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl,aarch64-unknown-linux-musl,aarch64-apple-darwin,x86_64-apple-darwin).build-local-artifacts&build-global-artifacts: compiles release archives across all 5 target triples and generates the shell installer and SHA-256 checksums (muslvsgnuVCF byte equivalence on Linux x86_64 is certified pre-tag viaharness/bin_equiv.shinsideharness/recertify.shand verified byharness/acceptance.shItem 8).host: creates the GitHub Release and generates SLSA v1.0 Level 3 build provenance attestations viaactions/attest-build-provenance.publish-crates: publishesvardictrust-coretocrates.iofirst, then polls up to30 × 10sfor index propagation before publishingvardictrust.announce: finalizes and publishes the GitHub Release.- Verify Release Artifacts & SLSA Attestations:
9.6 Phase 3 — Post-Tag Bioconda, Nextflow nf-core/modules & ReadTheDocs Sync¶
- Update and test the Bioconda recipe (
packaging/bioconda/recipes/vardictrust/meta.yaml):packaging/bioconda/prepare_bioconda_pr.shenforces Rule 0b by downloadinghttps://github.com/palakpsheth/VarDictRust/archive/refs/tags/vX.Y.Z.tar.gzdirectly from GitHub (refusing localgit archivefallbacks):Open and merge a follow-up PR updatingbash packaging/bioconda/prepare_bioconda_pr.sh X.Y.Z bash harness/test_bioconda_recipe.sh python3 .agents/skills/vardictrust-release/scripts/check_release_consistency.py --version X.Y.Z --phase post-biocondapackaging/bioconda/recipes/vardictrust/meta.yamlonmain, and submit the recipe update tobioconda/bioconda-recipes. - Update the Nextflow
nf-core/modulesmodule (packaging/nf-core/prepare_nfcore_pr.sh): Oncebioconda::vardictrust=X.Y.Zis indexed onanaconda.orgfor bothlinux-64andlinux-aarch64, updateenvironment.yml, provision multi-arch Seqera Wave containers, and updatenf-testsnapshots (settingNFCORE_MODULES_DIRexplicitly to a trusted localnf-core/modulescheckout):Once the upstreamNFCORE_MODULES_DIR=/path/to/nf-core-modules bash packaging/nf-core/prepare_nfcore_pr.sh X.Y.Z python3 .agents/skills/vardictrust-release/scripts/check_release_consistency.py --version X.Y.Z --phase post-nfcorenf-core/modulesPR passes all CI checks (conda,docker,singularity,nf-core lint,pre-commit) andcopilot-pull-request-reviewer[bot]review, do NOT mass-ping@nf-core/maintainersor request"team_reviewers":["maintainers"]on routinenf-core/modulesversion-bump PRs (per@famosabonnf-core/modules#13830). Instead: (1) apply the"Ready for Review"and"update module"labels (gh api repos/nf-core/modules/issues/<nfcore-pr>/labels -X POST --input - <<< '{"labels":["Ready for Review","update module"]}'), and (2) request review in thenf-coreSlack#request-reviewchannel (or request a specific prior module maintainer such as@nvnieuwkor@SPPearceindividually only when appropriate, without@nf-core/maintainers), then enqueue into the merge queue once approved (gh api graphql -f query='mutation($id: ID!) { enqueuePullRequest(input: {pullRequestId: $id}) { mergeQueueEntry { id state position } } }' -f id="$(gh api repos/nf-core/modules/pulls/<nfcore-pr> --jq '.node_id')"). - Sync ReadTheDocs Tags & Trigger
stable+latestDocumentation Builds:
9.7 Rollback, Partial-Release Recovery & Hotfix Runbook¶
- Transient CI Job Failure in
release.yml: If a runner experiences a transient network or registry timeout during Phase 2, re-run failed jobs viagh run rerun <run-id> --failed. Ifvardictrust-corealready published tocrates.iobeforepublish-cratesfailed onvardictrust, publishvardictrustmanually withcargo publish -p vardictrustor cutvX.Y.(Z+1). - Never Force-Move or Delete Published Release Tags: Once
crates.iocrates or SLSA Level 3 attestations are emitted forvX.Y.Z, never delete or force-push the tag. If a critical regression is discovered post-release: - Yank affected crates on
crates.io:cargo yank --version X.Y.Z vardictrust && cargo yank --version X.Y.Z vardictrust-core. - Mark the GitHub Release
vX.Y.Zas pre-release/yanked with a notice linking to the replacement version. - Cut and certify
vX.Y.(Z+1)offmainfollowing §§9.2–9.6.