Context
PR #5 (feat(ggml): ggml-spanker crate with MatmulInt4 trait + MockSail) merged 2026-05-06 with deferred review findings. This issue tracks all five plus the originally-planned PR #5b scope (bindgen + real-device SailMatmul).
Items to address in PR #5b
From Agent R review of PR #5
| # |
Severity |
File:Line |
Action |
| 1 |
HIGH |
src/backends/ggml/src/lib.rs:49 |
Add #[non_exhaustive] to Error enum before PR #6 anchors on it (semver protection for the v0 contract). |
| 2 |
HIGH |
src/backends/ggml/src/lib.rs:58, mock.rs:95-130 |
Either implement the OutputTooSmall check (out.len() < expected) or remove the variant. Fix surface is the same as Finding #4. |
| 3 |
MEDIUM |
.gitmodules:4 |
Drop branch = master line (or replace with branch = <stable tag>). The committed SHA is the reproducible anchor; branch = master only matters for --remote updates and undercuts reproducibility. |
| 4 |
MEDIUM |
src/backends/ggml/src/mock.rs:95 (matmul_q4_k) |
Cross-check a.len(), b.len(), and out.len() against declared m × (k/QK_K) × Q4_K_BLOCK_BYTES. Same code site as Finding #2. |
| 5 |
LOW |
src/backends/ggml/src/lib.rs:111-118 |
Replace q4_k_block_bytes_constant_matches_known_layout (currently tautological) with a bindgen-derived cross-check against the actual GGML header. Not a supplement — a replacement. |
Originally-planned PR #5b scope (per PR #5's body)
- bindgen at whatever version reconciles with then-current MSRV
src/backends/ggml/build.rs invoking bindgen over wrapper.h
- private
mod ffi { include!("bindings.rs") } in lib.rs
- real-device
SailMatmul body using SPANKER_IOC_WORK_SUBMIT
- CI:
submodules: recursive + libclang-dev
Test coverage gaps to close
m=0 / n=0 with valid k should be either explicitly accepted (and tested as a no-op) or rejected with BadDims
OutputTooSmall triggered by undersized out slice
- Mismatched-dim slice lengths trigger
BadDims
SailMatmul::matmul_q4_k returns NotImplemented (assertion test for the deferred-stub state)
Dependencies
Owner
Agent 3 (Software Stack).
Branch suggestion
feat/stream-3/pr-05b-bindgen-and-real-device.
Context
PR #5 (
feat(ggml): ggml-spanker crate with MatmulInt4 trait + MockSail) merged 2026-05-06 with deferred review findings. This issue tracks all five plus the originally-planned PR #5b scope (bindgen + real-deviceSailMatmul).Items to address in PR #5b
From Agent R review of PR #5
src/backends/ggml/src/lib.rs:49#[non_exhaustive]toErrorenum before PR #6 anchors on it (semver protection for the v0 contract).src/backends/ggml/src/lib.rs:58,mock.rs:95-130OutputTooSmallcheck (out.len() < expected) or remove the variant. Fix surface is the same as Finding #4..gitmodules:4branch = masterline (or replace withbranch = <stable tag>). The committed SHA is the reproducible anchor;branch = masteronly matters for--remoteupdates and undercuts reproducibility.src/backends/ggml/src/mock.rs:95(matmul_q4_k)a.len(),b.len(), andout.len()against declaredm × (k/QK_K) × Q4_K_BLOCK_BYTES. Same code site as Finding #2.src/backends/ggml/src/lib.rs:111-118q4_k_block_bytes_constant_matches_known_layout(currently tautological) with a bindgen-derived cross-check against the actual GGML header. Not a supplement — a replacement.Originally-planned PR #5b scope (per PR #5's body)
src/backends/ggml/build.rsinvoking bindgen overwrapper.hmod ffi { include!("bindings.rs") }inlib.rsSailMatmulbody usingSPANKER_IOC_WORK_SUBMITsubmodules: recursive+libclang-devTest coverage gaps to close
m=0/n=0with validkshould be either explicitly accepted (and tested as a no-op) or rejected withBadDimsOutputTooSmalltriggered by undersizedoutsliceBadDimsSailMatmul::matmul_q4_kreturnsNotImplemented(assertion test for the deferred-stub state)Dependencies
SPANKER_IOC_WORK_SUBMITABI shape (covered by ADR-003 per PR feat(ggml): ggml-spanker crate with MatmulInt4 trait + MockSail #5 body)Owner
Agent 3 (Software Stack).
Branch suggestion
feat/stream-3/pr-05b-bindgen-and-real-device.