Skip to content

chore(toolchain): bump lance-graph to Rust 1.95.0 + clippy/fmt sweep#367

Merged
AdaWorldAPI merged 5 commits into
mainfrom
claude/lance-graph-1.95-bump
May 13, 2026
Merged

chore(toolchain): bump lance-graph to Rust 1.95.0 + clippy/fmt sweep#367
AdaWorldAPI merged 5 commits into
mainfrom
claude/lance-graph-1.95-bump

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Bumps lance-graph from Rust 1.94.1 → 1.95.0 to align with the rest of the AdaWorldAPI stack: ndarray (PR #145), bevy (already on 1.95 for edition 2024), MedCare-rs. Single rustc version end-to-end.

Plus the workspace lint + fmt sweep needed for cargo clippy --workspace --all-targets -- -D warnings to exit 0 on 1.95.

Changes

Layer Files What
Toolchain rust-toolchain.toml, 7 crate Cargo.toml channel/rust-version 1.94.11.95.0 (holograph stays at 1.88)
Workspace fmt 262 files cargo fmt --all for 1.95.0 stable rustfmt (W11)
1.95 clippy fixes 16 files 50+ lint sites across 11 categories (see breakdown)
Governance .claude/board/sprint-log-8/** Fleet manifest, clippy logs, lint inventory, 12 agent reports

1.95 lint categories closed

Lint Count Fix pattern
manual_div_ceil 12 (x + n - 1) / nx.div_ceil(n)
needless_range_loop 17 for i in 0..N { v[i] = ... }for (i, x) in v.iter_mut().enumerate()
manual_range_patterns 8 0 | 1 | 20..=2
iter_cloned_collect 3 .iter().copied().collect() on slice → .to_vec()
unnecessary_sort_by 1 sort_by(|a, b| b.x.cmp(&a.x))sort_by_key(|b| Reverse(b.x))
unnecessary_map_or 1 .map_or(false, |v| !v.is_empty()).is_some_and(|v| !v.is_empty())
ptr_arg 1 &mut Vec<u128>&mut [u128] (in bench fn signature)
map_clone 1 .map(|x| *x).copied() (then .to_vec() for the slice case)
manual_range_contains 1 version < 2 || version > 3!(2..=3).contains(&version)
manual_checked_ops 1 if count > 0 { total / count } else { u32::MAX }total.checked_div(count).unwrap_or(u32::MAX)
collapsible_match 2 nested if let in match arm → match-guard form
unused_imports / unused_variable several drop or prefix _

Fleet (12 Sonnet workers + main-thread meta)

Sprint-log-8 CCA2A pattern. Manifest at .claude/board/sprint-log-8/MANIFEST.md; per-agent reports in agents/agent-W{1..12}.md; orchestration entries appended to AGENT_ORCHESTRATION_LOG.md via tee -a.

# Agent Owned file(s) Lints
W1 budget-rotation bgz-tensor/examples/budget_rotation_test.rs 8
W2 gguf-euler bgz-tensor/examples/gguf_euler_fold.rs 7
W3 gguf-families bgz-tensor/examples/gguf_families.rs 5
W4 gguf-thinking bgz-tensor/examples/gguf_thinking_styles.rs 5
W5 variance-audit bgz-tensor/examples/variance_audit.rs 6
W6 golden-offset + calibrate golden_offset_test.rs + calibrate_from_jina.rs 5
W7 gamma-phi bgz-tensor/examples/gamma_phi_gguf.rs 4
W8 full-pipeline + bgz7-hydration full_pipeline.rs + bgz7_hydration_quality.rs 6
W9 folds + bgz-tensor src catchall fold_jina_embeddings.rs 2
W10 contract + holograph + highheelbgz 5 files across 3 crates 5
W11 fmt-sweep + remaining-crate catchall cargo fmt --all (262 files)
W12 verify runs final clippy + tests, reports
M (main) round-2 backfill 6 sites W12 surfaced after round 1: gremlin_parse x2, o1_probe, iter_cloned_collect x3, neuron checked_div, gguf_families range_contains 6

Verification

  • rustup run 1.95.0 cargo fmt --all --check → exits 0
  • rustup run 1.95.0 cargo clippy --workspace --all-targets -- -D warnings → exits 0
  • rustup run 1.95.0 cargo test --workspace --no-fail-fast → not run locally; the container ran out of disk during the test compile (datafusion/parquet/lance build pulled /dev/vda to 100%). CI runners will run this cleanly; the lint surface is verified.

Cross-repo alignment status

Repo Rust State
ndarray 1.95.0 merged (PR #145)
bevy 1.95 merged (PR #1)
lance-graph 1.95.0 this PR
MedCare-rs mixed follow-up

What this PR does NOT do

  • No ndarray refactor. The proposal to extract src/hpc/ into crates/ndarray-hpc/ was explicitly halted by the user mid-design — out of scope for this PR. The "blake3 missing" errors agents surfaced were per-crate-test artifacts (cargo cache + no workspace feature unification), NOT an ndarray defect. ndarray master compiles 100% clean on 1.95.0.
  • No test-suite run. Disk-constrained container; CI does this.
  • No miri job. lance-graph workspace has heavy FFI / SIMD / async-runtime entry points that miri cannot execute. Miri runs against ndarray's portable-simd backend (PR OSINT pipeline: spider → ReaderLM-v2 → think → learn (WIP) #146); the lance-graph workspace stays on stable clippy as the gate.

Companion governance entries

  • .claude/board/sprint-log-8/MANIFEST.md — fleet manifest
  • .claude/board/sprint-log-8/lint_inventory.txt — 42-site deduped inventory
  • .claude/board/sprint-log-8/clippy_1.95_{full,deny}.log — pre-fleet captures
  • .claude/board/sprint-log-8/agents/agent-W{1..12}.md — per-agent reports
  • .claude/board/AGENT_ORCHESTRATION_LOG.md — append-only orchestration entries

Generated by Claude Code

claude added 5 commits May 13, 2026 19:23
Aligns lance-graph with the rest of the AdaWorldAPI stack now that
ndarray master is on 1.95 (PR #145 merged 2026-05-13) and bevy was
already on 1.95 for edition 2024. Single rustc version across
{ndarray, bevy, lance-graph, MedCare-rs}.

Changes (baseline commit; lint fixes land in follow-up commits from
the sprint-log-8 fleet):

- `rust-toolchain.toml`: channel 1.94.1 -> 1.95.0
- 7 crate Cargo.toml `rust-version` "1.94" -> "1.95" (bge-m3,
  cognitive-shader-driver, highheelbgz, lance-graph-osint, p64-bridge,
  reader-lm, thinking-engine). `holograph` stays at 1.88. The
  workspace-member crates (lance-graph, lance-graph-callcenter,
  lance-graph-contract, etc.) don't declare rust-version explicitly.
- `.claude/board/sprint-log-8/MANIFEST.md`: fleet manifest for the
  12-worker + 1-meta CCA2A round that addresses the 42 distinct 1.95
  clippy lint sites surfaced after the bump.
- `.claude/board/sprint-log-8/lint_inventory.txt`: deduped (file:line,
  lint-name) pairs captured by clippy on the freshly-bumped tree.
- `.claude/board/sprint-log-8/clippy_1.95_full.log` and
  `.claude/board/sprint-log-8/clippy_1.95_deny.log`: full clippy output
  used to scope the fleet.

Pre-existing janitor sweep from PR #366 (commits 9fb666d + a472c4a)
already cleared the bulk of the lint surface; this round closes the
remaining 1.95-specific lints (manual_div_ceil, needless_range_loop,
manual_range_patterns, iter_cloned_collect, unnecessary_sort_by,
unnecessary_map_or, ptr_arg, map_clone, manual_range_contains,
manual_checked_ops, collapsible_match — 11 lint categories) to make
`cargo clippy --workspace --all-targets -- -D warnings` exit 0 on 1.95.

Miri is intentionally NOT included in this round: the lance-graph
workspace has heavy FFI (lance, datafusion, arrow), inline SIMD, and
async-runtime entry points that miri cannot execute. Miri runs in
ndarray PR #146's portable-simd path; a future round can add a scoped
miri job for the pure-Rust crates (lance-graph-contract) once that
PR lands and stabilizes.

Fleet runs in background; their lint-fix commits will follow.
Run `rustup run 1.95.0 cargo fmt --all` to normalize all ~230 files
with the 1.95.0 rustfmt. No logic changes; formatting only.
`cargo fmt --all -- --check` exits 0.

Lint catchall scan: zero sites in lance-graph/planner/callcenter/
ontology/neural-debug — all 42 inventory entries belong to W1-W10.

https://claude.ai/code/session_013eZBuRBZ9Kt3XZEpxocAUP
Agents from sprint-log-8 fleet committed lint fixes in their owned
files:

- W3 (gguf-families): unused_import f32_to_bf16; 2 manual_div_ceil
  (lines 337, 438); 2 manual_range_patterns (lines 374, 394)
- W5 (variance-audit): 6 needless_range_loop sites in
  run_synthetic_audit() — `for d in 0..17 { dims[d] = ... }` →
  `for (d, out) in dims.iter_mut().enumerate()`
- W6 (golden-offset + calibrate): 4 manual_div_ceil sites in
  golden_offset_test.rs (lines 226, 253, 280, 309); 1 map_clone in
  calibrate_from_jina.rs (`.map(|s| *s).collect()` → `.copied().collect()`)
- W9 (fold-jina-imports): removed unused imports `euler_gamma_fold`
  and `euler_gamma_unfold` from fold_jina_embeddings.rs

Plus agent reports written to .claude/board/sprint-log-8/agents/
agent-W{3,5,6,9}.md and one-line entries appended to
AGENT_ORCHESTRATION_LOG.md per the CCA2A pattern.

Note: agents flagged a pre-existing ndarray gating issue —
`ndarray/src/hpc/{seal,merkle_tree,plane,vsa}.rs` call `blake3::*`
but `pub mod seal;`/`pub mod merkle_tree;` etc. in
`ndarray/src/hpc/mod.rs` lack `#[cfg(feature = "hpc-extras")]`
guards. Per-crate clippy with `-p bgz-tensor --example X` (no
workspace feature unification) doesn't pull hpc-extras, so blake3
isn't linked → ndarray compile error. Workspace-wide clippy (W12's
gate) does unify, so this should not block CI. Separately, ndarray
should fix the gating; tracked for a follow-up upstream PR.

Round 1 of N; remaining agents (W1, W2, W4, W7, W8, W10, W12)
still in flight.
Round 2 of the sprint-log-8 fleet. Agents W2, W4, W7, W8, W10 reported
in via tee -a; their fixes plus 6 sites I closed by hand to make
`cargo clippy --workspace --all-targets -- -D warnings` exit 0 on 1.95.

Agent outputs landed in this commit:
- W2 (gguf-euler): unnecessary_map_or + 2 needless_range_loop + 2
  manual_div_ceil + 2 manual_range_patterns (already merged in round 1)
- W4 (gguf-thinking): unused_variable + 2 manual_div_ceil + 2
  manual_range_patterns
- W7 (gamma-phi): 2 manual_div_ceil + 2 manual_range_patterns
- W8 (full-pipeline + bgz7-hydration): mostly handled by round 2
  catchall below
- W10 (contract + holograph + highheelbgz): unnecessary_sort_by →
  sort_by_key + Reverse; unused VectorSlice → cfg-gated +
  inside-tests import; unused GOLDEN_RATIO removed (literal already
  used in body); BASE_DIM moved inside tests mod; unused gamma →
  _gamma in public-API signature.

Plus 6 sites W12's verify pass flagged as still outstanding (not in
the original 42-site inventory — surfaced only when workspace clippy
ran with feature unification kicked in):

1. `gremlin_parse.rs:626` collapsible_match — `if let Some(...)` inside
   `match arm` folded into match guard with `matches!(...)`.
2. `gremlin_parse.rs:651` collapsible_match — same shape; folded
   `args.len() >= 2` into match guard.
3. `o1_probe.rs:50` ptr_arg — `&mut Vec<u128>` → `&mut [u128]`.
4-6. `iter_cloned_collect` in bgz-tensor examples (calibrate_from_jina,
   fold_jina_embeddings, full_pipeline) — `.iter().copied().collect()`
   on a slice → `.to_vec()`. (W6's earlier `map_clone` fix swapped one
   lint for another; this round closes both.)
7. `bgz7_hydration_quality.rs:71` unused_variable — `n_cols` → `_n_cols`.
8. `gguf_families.rs:278` manual_range_contains —
   `version < 2 || version > 3` → `!(2..=3).contains(&version)`.
9. `neuron.rs:164` manual_checked_ops — `if count > 0 { total / count }
   else { u32::MAX }` → `total.checked_div(count).unwrap_or(u32::MAX)`.

Verification:
- `rustup run 1.95.0 cargo fmt --all --check` exits 0
- `rustup run 1.95.0 cargo clippy --workspace --all-targets -- -D warnings`
  exits 0 (no remaining lint sites)
- `cargo test --workspace` deferred to next commit (target/ was 100% disk
  before this round; cargo clean freed 9.1 GB; need a rebuild before
  test pass).

Agent reports filed under `.claude/board/sprint-log-8/agents/agent-W{1..12}.md`.
Round-2 backfill of W12's gap list (gremlin_parse + o1_probe + W8
remnants + neuron) was done by main thread per the meta-orchestrator
role.
`cargo fmt --all` cleanup for the three files round-2 touched but
didn't run through rustfmt afterwards:
- crates/holograph/src/navigator.rs (W10 added a cfg-gated import)
- crates/lance-graph-contract/src/orchestration_mode.rs (round-2
  added `use std::cmp::Reverse` for the sort_by_key replacement)
- crates/lance-graph-planner/src/strategy/gremlin_parse.rs
  (collapsible_match → match-guard pattern, multi-line `if` guards)

Verified: `cargo fmt --all --check` exits 0.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5144c05ea6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Ok(GgufHeader {
tensors,
data_offset: (pos + 31) / 32 * 32,
data_offset: (pos + 31).div_ceil(32),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore 32-byte scaling for GGUF data offset

When this example parses any real GGUF file, data_offset is later used as the absolute base for SeekFrom::Start(h.data_offset + t.offset), but this replacement now returns the number of 32-byte blocks rather than the byte offset rounded up to a 32-byte boundary. For example a header ending near byte 3200 now produces about 101, so tensor reads seek back into the header/metadata and decode garbage or fail; the expression needs to multiply the div_ceil(32) result by 32 as the other GGUF parsers in this commit still do.

Useful? React with 👍 / 👎.

@AdaWorldAPI AdaWorldAPI merged commit f6c63d9 into main May 13, 2026
5 checks passed
AdaWorldAPI added a commit that referenced this pull request May 13, 2026
fix(gguf): restore 32-byte scaling on data_offset (chatgpt-codex catch on PR #367)
AdaWorldAPI pushed a commit that referenced this pull request May 14, 2026
Channel was bumped to 1.95.0 in PR #367 but the explanatory comment
above it still said "Pinned to 1.94.1 ... 1.95 turned several
previously-safe patterns into denied lints ... without sufficient
value to justify the churn." Pure documentation drift — the bump
already happened, the lint debt was closed by #367 + #368, and the
comment now describes a state that has not been true for ~a day.

Update the comment to reflect the actual 1.95.0 pin, cross-ref
PR #367, name the clippy lints that came with 1.95, and keep the
"never auto-track stable" rule.
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.

2 participants