fix(qa): format_parity SKIPs on non-GGUF primary instead of FAILing#907
Merged
Conversation
`apr qa <safetensors>` previously exited 5 with "Failed gates: format_parity" because the format_parity gate treated a non-GGUF primary as a failure rather than as a category mismatch. This surfaced in the 2026-04-19 MCP M4 free-form integration session (see evidence/mcp/m4-freeform-session-2026-04-19.md) — 11 of 12 gates correctly SKIPped on non-GGUF, but format_parity alone FAILed, which in turn made apr.qa via the MCP surface return isError=true on otherwise healthy SafeTensors checkpoints. Peer gates (ollama_parity, ptx_parity, capability_match, gpu_state_isolation, gpu_speedup) all SKIP cleanly on non-GGUF with a reason string. This aligns format_parity with that convention. Also reorders the check so we peek the primary's 8-byte magic *before* resolving the SafeTensors reference or reading the full (potentially multi-GB) GGUF blob. When the primary isn't GGUF, we skip before doing any expensive work. The P0-QA-001 "never silently skip" invariant still holds — when the primary IS GGUF but the reference SafeTensors can't be found, the gate still FAILs with the actionable `huggingface-cli download` hint. Regression coverage: - format_parity_skips_safetensors_primary — creates a minimal .safetensors and asserts SKIP + "Non-GGUF" message - format_parity_skips_apr_primary — same for APR magic bytes Verified end-to-end: `apr qa qwen2.5-coder-0.5b-instruct/model.safetensors` now exits 0 with "All QA gates passed (6 executed, 6 skipped)".
noahgift
added a commit
that referenced
this pull request
Apr 19, 2026
…ffold Cuts a patch release combining the two PRs that landed post-v0.31.0 (#907, #908) plus incidental `cargo fmt --all` normalization across the workspace. Wire-level changes: - Workspace + root `aprender` package bumped 0.31.0 → 0.31.1 - All 60+ path-dep pins updated in lockstep so the published crates resolve against each other without range-version drift - `opentelemetry` / `opentelemetry_sdk` / `opentelemetry-otlp` kept at 0.31.0 (external deps — global sed caught them as false-positives during bump) CHANGELOG.md covers: - Fixed: `apr qa` format_parity gate SKIPs non-GGUF primaries (#907) - Added: `pmcp = "2.3"` optional dep behind `pmcp-dispatcher` feature (#908) Pre-push gates: - cargo fmt --all (applied — 45 lines across 17 non-Cargo files) - cargo test -p aprender-contracts --lib: 1371 passed / 0 failed - cargo deny check advisories: advisories ok Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
noahgift
added a commit
that referenced
this pull request
Apr 19, 2026
…ffold (#909) * chore(release): v0.31.1 — QA format_parity SKIP fix + MCP M5 pmcp scaffold Cuts a patch release combining the two PRs that landed post-v0.31.0 (#907, #908) plus incidental `cargo fmt --all` normalization across the workspace. Wire-level changes: - Workspace + root `aprender` package bumped 0.31.0 → 0.31.1 - All 60+ path-dep pins updated in lockstep so the published crates resolve against each other without range-version drift - `opentelemetry` / `opentelemetry_sdk` / `opentelemetry-otlp` kept at 0.31.0 (external deps — global sed caught them as false-positives during bump) CHANGELOG.md covers: - Fixed: `apr qa` format_parity gate SKIPs non-GGUF primaries (#907) - Added: `pmcp = "2.3"` optional dep behind `pmcp-dispatcher` feature (#908) Pre-push gates: - cargo fmt --all (applied — 45 lines across 17 non-Cargo files) - cargo test -p aprender-contracts --lib: 1371 passed / 0 failed - cargo deny check advisories: advisories ok Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * ci(release): disable sccache — sovereign-ci runner image missing rustc-sccache wrapper The `sovereign-ci:stable` container image is currently missing the `rustc-sccache` wrapper script, causing every sccache-gated CI job (ci/test, ci/lint, ci/coverage, ci/gate) to fail at the rustc probe: error: could not execute process `rustc-sccache /.../rustc -vV` (never executed) Caused by: No such file or directory (os error 2) Reruns fail identically — not transient. Workaround: flip `enable_sccache: true → false` on this repo's workflow input. The sovereign-ci reusable workflow reads this to set `RUSTC_WRAPPER: ${{ inputs.enable_sccache && 'rustc-sccache' || '' }}`, so disabling it removes the wrapper entirely and CI builds proceed normally (just slower, since there's no compile cache). Revert once paiml/.github ships a runner image with the wrapper present — this is a temporary unblock for the v0.31.1 release PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apr qa <safetensors>previously exited 5 with "Failed gates: format_parity" because the gate treated a non-GGUF primary as a failure, not a category mismatchevidence/mcp/m4-freeform-session-2026-04-19.md) —apr.qavia MCP correctly propagatedisError: true, but the underlying CLI gate was the bugWhat changes
run_format_parity_gatepeeks the primary's 8-byte magic first (cheap) and SKIPs immediately on non-GGUF, before resolving the SafeTensors reference or reading the full (potentially multi-GB) blobhuggingface-cli downloadhintfeature = "inference":format_parity_skips_safetensors_primary— minimal.safetensorsheader → SKIP + "Non-GGUF"format_parity_skips_apr_primary— APR magic bytes → SKIP + "Non-GGUF"Verification
Before (reproducer):
After:
Test plan
cargo test -p apr-cli --features inference --lib format_parity— 2 new tests greenci/gate+workspace-testgreen🤖 Generated with Claude Code