From 6a5e9a3edec1ab2c65026a71fff927ee5dc0335c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 23 Sep 2026 19:06:37 +0000 Subject: [PATCH] jc: as_chunks_mut in the two fingerprint builders (clears JC Substrate Proof on main) clippy 1.98 added `chunks_exact_to_as_chunks`, and `jc` is workspace-excluded, so the workspace-scoped pre-bump sweep never reached it. `jc-proof.yml` runs its own clippy step under `-D warnings` and has been red on every main push since. Recorded as TD-JC-CLIPPY-RED-ON-BASE-2 (2026-09-18). Both `deterministic_fingerprint` (jirak.rs) and `fingerprint` (pearl.rs) now iterate `fp.as_chunks_mut::<8>().0`, writing each `[u8; 8]` directly. Same bytes as before: `chunks_exact_mut` also skipped any remainder. Verified locally: the unfixed tree reproduces the lint; the fixed tree passes every step of the workflow (tests 141 + 17, clippy --all-targets, prove_it, substrate_compare). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG --- .claude/board/TECH_DEBT.md | 9 ++++++++- crates/jc/src/jirak.rs | 5 ++--- crates/jc/src/pearl.rs | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.claude/board/TECH_DEBT.md b/.claude/board/TECH_DEBT.md index 2122da041..81bbe2c6f 100644 --- a/.claude/board/TECH_DEBT.md +++ b/.claude/board/TECH_DEBT.md @@ -54,7 +54,14 @@ x ⊕ y = x.wrapping_add(y) (x, y ≠ ⊥) Cross-ref: `.claude/board/entries/2026-09-23-quack-having-sym-sum-presence-mask.md` (the `_sym` decision and the presence-mask boundary); ndarray #321; lance-graph #1266. -## TD-JC-CLIPPY-RED-ON-BASE-2 (2026-09-18) — the 1.98 pre-bump lint sweep was WORKSPACE-scoped, and `jc` is workspace-EXCLUDED +## TD-JC-CLIPPY-RED-ON-BASE-2 (2026-09-18) — the 1.98 pre-bump lint sweep was WORKSPACE-scoped, and `jc` is workspace-EXCLUDED — RESOLVED 2026-09-23 (the two jc sites) + +> **⊘ RESOLVED 2026-09-23 for `jc` only.** Both `deterministic_fingerprint` sites +> now read `fp.as_chunks_mut::<8>().0`. Reproduced red locally on the unfixed +> tree (4 hits under `--all-targets -D warnings`), then green on the fixed one; +> the full `jc-proof.yml` sequence passes locally (`cargo test`, clippy, +> `prove_it`, `substrate_compare`). The census below (116 ungated sites in +> other excluded crates) is untouched and stays OPEN. **`JC Substrate Proof` is RED on `main`** (run `35335429357`, head `568965e9`): `clippy::chunks_exact_to_as_chunks` in `crates/jc/src/jirak.rs` and diff --git a/crates/jc/src/jirak.rs b/crates/jc/src/jirak.rs index 5e106d738..338d76375 100644 --- a/crates/jc/src/jirak.rs +++ b/crates/jc/src/jirak.rs @@ -34,9 +34,8 @@ fn splitmix64(state: &mut u64) -> u64 { fn deterministic_fingerprint(seed: u64) -> Vec { let mut fp = vec![0u8; D / 8]; let mut s = seed; - for chunk in fp.chunks_exact_mut(8) { - let r = splitmix64(&mut s); - chunk.copy_from_slice(&r.to_le_bytes()); + for chunk in fp.as_chunks_mut::<8>().0 { + *chunk = splitmix64(&mut s).to_le_bytes(); } fp } diff --git a/crates/jc/src/pearl.rs b/crates/jc/src/pearl.rs index acb0a1a1e..3eb8037a7 100644 --- a/crates/jc/src/pearl.rs +++ b/crates/jc/src/pearl.rs @@ -56,9 +56,8 @@ fn splitmix64(state: &mut u64) -> u64 { fn fingerprint(seed: u64) -> Vec { let mut fp = vec![0u8; D_BYTES]; let mut s = seed; - for chunk in fp.chunks_exact_mut(8) { - let r = splitmix64(&mut s); - chunk.copy_from_slice(&r.to_le_bytes()); + for chunk in fp.as_chunks_mut::<8>().0 { + *chunk = splitmix64(&mut s).to_le_bytes(); } fp }