Repository navigation
Improve DotMatch core speed, reliability gates, and CI workflows - #188
Merged
Merged
Conversation
- Speed up native FASTQ/Hamming hot paths in src/qda.c: - Zero-copy fastq_read_sequence_view fast path inside gz_buf - Table-driven acgt_fold_code_values for dna2_code_local_fold / dna2_base_fold_value - Rolling 2-bit window encoder in guide_counter_count_seq and bounded offset range in score_offsets_for_seq - L1-resident exact_bits/seed_bits occupancy bitsets and inline 64-bit target_code in hamming_seed_entry - Direct hlookup-based ambiguous_nearby computation for --metric hamming --format dotmatch (skipping qdaln_index_build and per-target queries) - Fix levenshtein1_lookup_insert match_count over-counting on homopolymer indels (NET.md hole #6) - Eliminate all 22 -Wshadow warnings in src/qda.c and enable -Wshadow in STRICT_WARNINGS (NET.md hole #5) - Add 30-seed Python stream_assign vs native dotmatch count differential test across 14 metric/k/policy combinations (NET.md hole #1) - Fix GitHub CI workflows: install hypothesis in ci.yml and pin ubuntu-24.04 for Playwright in sensitivity-review.yml
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
dnncha
added a commit
that referenced
this pull request
Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
dnncha
added a commit
that referenced
this pull request
Nov 24, 2026
…tation testing, libFuzzer (#191) * Improve DotMatch core speed, reliability gates, and CI workflows - Speed up native FASTQ/Hamming hot paths in src/qda.c: - Zero-copy fastq_read_sequence_view fast path inside gz_buf - Table-driven acgt_fold_code_values for dna2_code_local_fold / dna2_base_fold_value - Rolling 2-bit window encoder in guide_counter_count_seq and bounded offset range in score_offsets_for_seq - L1-resident exact_bits/seed_bits occupancy bitsets and inline 64-bit target_code in hamming_seed_entry - Direct hlookup-based ambiguous_nearby computation for --metric hamming --format dotmatch (skipping qdaln_index_build and per-target queries) - Fix levenshtein1_lookup_insert match_count over-counting on homopolymer indels (NET.md hole #6) - Eliminate all 22 -Wshadow warnings in src/qda.c and enable -Wshadow in STRICT_WARNINGS (NET.md hole #5) - Add 30-seed Python stream_assign vs native dotmatch count differential test across 14 metric/k/policy combinations (NET.md hole #1) - Fix GitHub CI workflows: install hypothesis in ci.yml and pin ubuntu-24.04 for Playwright in sensitivity-review.yml * Gate provisions its own Python tools, runs on macOS, prints coverage make gate failed in 30 s on a fresh pool worker (No module named ruff): the gate leaned on whatever tools a machine happened to have. lint, typecheck and python-test now depend on make dev-env, which builds .venv from pyproject's runtime and dev requirements once per checkout. The pre-commit hook could never pass on the Mac: ASan aborts when detect_leaks=1 is set on Darwin. Leak detection stays on for Linux. The 75% line-coverage floor had no stated reason and was fitted to a measurement; make coverage now prints the number instead of failing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * FASTQ: one set of record checks for the buffered and refill paths #188's zero-copy fastq_read_sequence_view re-implemented header, plus and length validation by hand, bringing back the duplicate-reader class that 28889ac removed. The view now only splits lines and calls the same fastq_header_id_span / fastq_validate_* helpers as fastq_next_record. Guards: lint_c rejects a second copy of any fastq_error reason literal (red on #188's qda.c at five sites), and fuzz_fastq_cli reruns each case with a 1-96 byte reader buffer so records split across refills take the other path and must give byte-identical counts (red at seed 15 with the view's quality check removed). Co-Authored-By: Claude Opus 5.5 <[email protected]> * Python FASTQ reader follows the native contract on edge bytes The Python reader split lines on bare CR, split identifiers on Unicode whitespace (0x1c, NBSP) and accepted reads over 8,191 bases, so the same file passed in Python and failed natively. It now reads with newline='\\n', rejects a bare-CR handle, splits on the native space set and applies the native read-length limit. Guard: test_native_fastq_validation gains the four cases plus a 300-seed byte-mutation differential (Python accept == native accept); red at seed 170 on the old reader. Co-Authored-By: Claude Opus 5.5 <[email protected]> * MCP count_targets: let the native CLI name unlabelled samples Without sample_labels the server labelled each file by the text before its first dot, so sample.R1.fastq and sample.R2.fastq both became 'sample' and the count call failed on duplicate labels. It now passes no --sample-label and the CLI uses each file name. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Lockfile: next 16.4.5, sharp 0.35.5, source-map-js 1.2.2 for npm audit CI's Web audit step was red on main with one critical (next 16.0-16.4.4) and two high advisories (sharp < 0.35.5, source-map-js 1.0-1.2.1). npm audit fix --package-lock-only; npm audit now reports 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> * CI: pin Python where runner images moved past it Python 3.9 compatibility failed at setup: 3.9 is not built for the Ubuntu 26.04 ubuntu-latest image, so that matrix entry runs on ubuntu-24.04. The workflow-ecosystem micromamba env resolved Python 3.14, which planemo cannot install Galaxy into; it is pinned to 3.12. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Mutation testing for the C core; libFuzzer FASTQ differential; web audit tools/mutate_c.py flips every comparison operator in src/qdalign.c (660 mutants) and scores each with test_qdalign plus fuzz_qdalign_diff. make mutation-c-changed runs it on the lines a change touches and fails on a survivor (red on a touched line 2340 within 6 s); make mutation-c runs the whole file weekly in make nightly. Proven-equivalent mutants go in tools/mutate_c_equivalent.tsv with a reason. tests/libfuzz_fastq.c reads each input through the refill path, the buffered view and a small-buffer view and aborts if record counts or sequences differ. make libfuzz-fastq runs it for 20 s in the gate where the compiler has libFuzzer (Homebrew LLVM on the Mac) and prints SKIPPED elsewhere; 176k runs in 60 s were clean, and it crashed at once with the view's quality check removed. make web-audit (npm audit) joins make nightly. Co-Authored-By: Claude Opus 5.5 <[email protected]> * mutate_c skips comments and mutants the compiler drops; NET.md for 2026-11-24 The first sweep mutated text inside block comments and code under a disabled #if branch. Comments are now masked, and a mutant whose object file is byte-identical to the unmutated build is counted as not compiled rather than survived. The Makefile passes ARCH_FLAGS so the AVX2 paths are built on x86. NET.md: new signals and their triggers, the scheduled task ID (the weekly nightly task it described did not exist until today), seven new escape rows, and the 236 mutation survivors as the top hole. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fastq_io: import block spacing for ruff I001 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/qda.c):fastq_read_sequence_viewfast path insidegz_buf(preserving full FASTQ header/sequence/+/quality validation and AVX2-vectorizable ASCII checks).acgt_fold_code_valuesfordna2_code_local_foldanddna2_base_fold_value.guide_counter_count_seqfor multi-offset runs and bounded offset window inscore_offsets_for_seq.exact_bits/seed_bitsoccupancy bitsets onhamming_lookupand inlined 64-bittarget_codeinhamming_seed_entry.hlookup-basedambiguous_nearbycomputation fordotmatch count --metric hamming --format dotmatch, avoidingqdaln_index_buildand per-target index queries.NET.mdholes closed:python/tests/test_python_native_differential.py(30 deterministic seeds comparing Pythonstream_assignagainst nativedotmatch countacross all 14(metric, k, policy)combinations).-Wshadowwarnings insrc/qda.cand enabled-WshadowinSTRICT_WARNINGS.build_levenshtein1_lookupso a single target cannot over-countmatch_count..github/workflows/ci.yml: installhypothesisinbuild-testandpython-compat..github/workflows/sensitivity-review.yml: pinubuntu-24.04for Playwright 1.57.0 compatibility.Verification
make gateon Linux worker (commit4e7db47): passed (lint-c,ruff,strictwith-Wshadow -Werror, C unit tests,fuzz-smokeunder ASan/UBSan,netcheck,cli-test,asan,mypy --strict,pyright, and 2,193 Python tests passed).benchmarks/measure_command.c, 5 alternating repeats):origin/main(21c073e).guide-counter count --exact-match(gzipped): CPU0.740s -> 0.600s, wall0.766s -> 0.646s(1.13xmedian paired speedup).guide-counter count(1-mismatch, gzipped): CPU1.130s -> 1.100s(1.05x [1.02-1.13]across all 5 repeats).