Skip to content

Dragnet 2026-11-24: one FASTQ validator, self-provisioning gate, C mutation testing, libFuzzer - #191

Merged
dnncha merged 11 commits into
mainfrom
dragnet/2026-11-24
Nov 24, 2026
Merged

dnncha merged 11 commits into
mainfrom
dragnet/2026-11-24

Conversation

@dnncha

@dnncha dnncha commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Builds on #188 (included; its local gate is green here).

Defects fixed

  • Improve DotMatch core speed, reliability gates, and CI workflows #188's zero-copy FASTQ path duplicated header/plus/length validation (duplicate-reader class from 28889ac). It now calls the shared fastq_validate_* helpers.
  • Python FASTQ reader accepted files native rejects: bare CR line endings, 0x1c or NBSP in IDs, reads over 8,191 bases.
  • MCP count_targets without labels failed on sample.R1.fastq + sample.R2.fastq (duplicate labels it invented).
  • make gate failed on a fresh worker (no ruff); the pre-commit hook could never pass on macOS (ASan detect_leaks).
  • Public CI red on main: npm audit (next, sharp, source-map-js), Python 3.9 on Ubuntu 26.04, Galaxy on Python 3.14.
  • NET.md described a weekly scheduled nightly that did not exist. It exists now: scheduled-task:a6f21d78…, Mondays 03:00.

New signals

  • lint_c: a second copy of any FASTQ record check is an error.
  • fuzz-smoke: 1-96 byte reader buffer vs 1 MiB.
  • make libfuzz-fastq: libFuzzer differential of the refill, view and small-buffer view paths (gate where libFuzzer exists, 15 min weekly).
  • Python vs native FASTQ byte-mutation accept/reject differential (300 seeds).
  • tools/mutate_c.py: changed-line mutants in the gate, full sweep weekly (first sweep: 424/660 killed; survivors are NET.md hole 1).
  • make dev-env, make web-audit; the coverage floor now prints instead of failing.

Verification

gate-run -C … -- 'make gate' on Agent37 at 495f58b: exit 0, 2,194 Python tests passed. The worker skipped libfuzz-fastq and mutation-c-changed, so both ran on the Mac and passed. Web npm ci && lint && audit && build passed on Agent37.

🤖 Generated with Claude Code

dnncha and others added 10 commits November 23, 2026 22:23
- 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
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]>
#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]>
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]>
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]>
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]>
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]>
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]>
…26-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]>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-24T01:28:37.032261Z
We couldn’t complete this review. Comment @codex review to try again.
495f58b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@dnncha
dnncha merged commit 0e470fe into main Nov 24, 2026
23 of 32 checks passed
@dnncha
dnncha deleted the dragnet/2026-11-24 branch November 24, 2026 01:33
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