Skip to content

Commit 6a9219d

Browse files
logannyeclaude
andcommitted
fix: trust on-ramp + hygiene — Action snippet, install checksum, CI, verify
The first-contact and trust surfaces, where a "verifiable" tool was not verifying: - The headline Action snippet `logannye/rosalind-budget@v1` did not resolve (no such repo/tag) — the single most important adoption action failed on first copy-paste. Fixed to `logannye/rosalind@v0.1.0` (the root action.yml) in README + CHANGELOG. - install.sh advertised checksum verification but never ran it. It now fetches the `.sha256` sidecar the release ships and verifies before unpacking, aborting on a mismatch (verified end-to-end against the live v0.1.0 release; a corrupt sidecar is correctly rejected). - CI cli-e2e regenerated reference.fa at 1 Mbp without --length, overwriting the committed 4 kbp fixture and checking freshly-generated files against freshly-generated sums (a tautology that also tested a different reference than ships). Now pins the committed reference to a known hash (a real anti-corruption gate) and simulates reads FROM it via --reference. - verify gains internal-consistency cross-checks (max_working_set <= peak_rss; contract_verdict agrees with peak-vs-budget) — the first line against a hand-edited receipt, since the manifest has no self-hash yet (a signed tamper-evident receipt is its own Act-2 feature). - Removed the dead IndexFreeIterator/MarkerScanner scaffolding: a public-API next_item() that was unimplemented!() (a panic landmine) with zero callers. - Track Cargo.lock (rosalind ships a binary → a pinned lockfile is part of the reproducible-build story and stabilizes CI cache keys). Full suite green; rustc 0 warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6b1c663 commit 6a9219d

10 files changed

Lines changed: 2276 additions & 75 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,20 @@ jobs:
9494
toolchain: stable
9595
profile: minimal
9696
override: true
97-
- name: Generate toy dataset
98-
run: python3 scripts/generate_toy_data.py examples/data/illumina_toy
99-
- name: Verify checksums
100-
run: sha256sum --check SHA256SUMS
101-
working-directory: examples/data/illumina_toy
97+
- name: Verify the committed toy reference is intact (pinned hash)
98+
# A real anti-corruption gate, not the old self-referential check: pin the
99+
# COMMITTED reference.fa (the one the release bundle + every other job
100+
# ships) to a known hash. The previous step regenerated reference.fa at
101+
# 1 Mbp without --length, overwriting the committed 4 kbp fixture and
102+
# checking freshly-generated files against freshly-generated sums (a
103+
# tautology that also tested a different reference than ships).
104+
run: |
105+
echo "ce8a6df801e836f4eda0b7661a68dcd7b7a9ab247c66d4582a89dbc207554efa examples/data/illumina_toy/reference.fa" \
106+
| sha256sum --check
107+
- name: Generate reads from the committed toy reference
108+
# --reference simulates reads FROM the committed reference (does not invent
109+
# or overwrite one), so cli-e2e exercises exactly the fixture that ships.
110+
run: python3 scripts/generate_toy_data.py examples/data/illumina_toy --reference examples/data/illumina_toy/reference.fa
102111
- name: Align to SAM
103112
run: |
104113
cargo run --release -- align \

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/target
33
**/*.rs.bk
44
*.pdb
5-
Cargo.lock
5+
# Cargo.lock IS tracked: rosalind ships a binary, so a pinned lockfile is part of
6+
# the reproducible-build story behind the receipts (and stabilizes CI cache keys).
67

78
# IDE
89
.idea/

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ contract** — predict it before you commit, honor it during the run, and verify
1212
- `rosalind variants … --enforce` — honor the budget: refuse up front (exit 3) or fail loud (exit 4),
1313
never a silent OOM-kill. Record-only without `--enforce`.
1414
- `rosalind verify` — re-check a run's BLAKE3 receipt without re-running.
15-
- The **`rosalind-budget` GitHub Action** — enforce the contract in *your* CI (fail the build on breach).
15+
- The **Rosalind budget GitHub Action** (`action.yml`, used as `logannye/rosalind@v0.1.0`) — enforce the
16+
contract in *your* CI (fail the build on breach).
1617

1718
### Variant calling
1819
- **Bounded whole-genome germline SNV calling** (`variants --index`) over a coordinate-sorted BAM and a

0 commit comments

Comments
 (0)