Skip to content

test(skippy-ffi): update llama_context_params layout for b12199 - #2987

Merged
i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/llama-draft-layout-test
Nov 12, 2026
Merged

i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/llama-draft-layout-test

Conversation

@Virgile-pct

@Virgile-pct Virgile-pct commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Original problem

llama_draft::tests::mirrors_match_the_pinned_upstream_layouts fails on main: size_of::<LlamaContextParams>() is 176, the test expects 168. The b12199 upgrade (#2953) regenerated bindings/llama.rs with the new moe_cache_cpu_share field of llama_context_params, and the expected sizes in this test were not updated. CI did not catch it because ci-rust-tests-slice.yml skips skippy-ffi in its test loop and the Windows unit row doesn't list it; I hit it in a full cargo test --workspace --lib pass on Windows.

Diagnostics

The bindings are right, the test values are stale. llama.h at the pinned upstream revision (372dc5ca1, skippy/llama_cpp/upstream.txt) declares float moe_cache_cpu_share after moe_cache_size, and the patch queue doesn't touch the struct. Compiled with MSVC against those headers: llama_context_params is 176 bytes, moe_cache_cpu_share at 120, abort_callback at 128, embeddings at 144, samplers at 152, ctx_other at 168. llama_batch (56) and llama_model_params (80, unchanged offsets) still match.

Fix

Update the llama_context_params expectations to those measured values, and also pin moe_cache_cpu_share and abort_callback so the next field change shows up at the field rather than only in the total.

Validation

cargo test -p skippy-ffi --lib --features skippy-ffi/dynamic-runtime on Windows: 13 passed. cargo fmt --all --check clean.

Summary by CodeRabbit

  • Tests
    • Updated layout checks to reflect the current size and field offsets of LlamaContextParams.

The b12199 bindings added moe_cache_cpu_share; the expected sizes and offsets still described the previous header.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pinned-layout test updates its expected LlamaContextParams size to 176 bytes. It adds offset checks for moe_cache_cpu_share and abort_callback, and updates the expected offsets of embeddings, samplers, and ctx_other.

Changes: Context parameter layout

Layer / File(s) Summary
Pinned layout assertions
skippy/crates/skippy-ffi/src/llama_draft.rs
The layout test expects a 176-byte LlamaContextParams, checks the offsets of moe_cache_cpu_share and abort_callback, and updates the offsets of embeddings, samplers, and ctx_other.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 9787b

The layout assertions are updated; no concrete merge-blocking issue was found.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: updating the llama_context_params layout test for b12199.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 726082d8-b20c-4649-a13e-e9ddeab6bc99
Commits

Reviewing files that changed from the base of the PR and between bdadd4b and 9787bfa.

Files selected for processing: 1

  • skippy/crates/skippy-ffi/src/llama_draft.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

kleinbem added a commit to kleinbem/nix-packages that referenced this pull request Nov 11, 2026
…kage (#296)

Three canaries fail on upstream main for reasons unrelated to the
nixpkgs recipes under review. Each fix stays in the canary's overlay, so
the pinned release builds don't change.

- **buzz-app** (#215): main dropped the `/usr/bin/printenv` git shim in
`crates/plugin-manager/src/imports.rs` (block/buzz-app#2665, which
supersedes block/buzz-app#2417), so the recipe's `--replace-fail`
stopped matching in patchPhase. The canary turns that substitution into
`--replace-quiet`. The 0.7.16 recipe keeps it as is; it can go once the
recipe's buzz-app version contains #2665.
- **mesh-llm** (#253): `skippy-ffi`
`llama_draft::tests::mirrors_match_the_pinned_upstream_layouts` fails on
every platform (176 vs 168). That isn't our llama.cpp: the size comes
from the committed bindgen output (`src/bindings/llama.rs`), which
gained `moe_cache_cpu_share` with the b12199 upgrade
(Mesh-LLM/mesh-llm#2953) while the test kept the old numbers. Upstream
CI doesn't run that crate's tests. Skipped in the canary. upstream:
Mesh-LLM/mesh-llm#2987
- **Buzz** (#291): a new buzz-cli test (block/buzz#9270) checks its
child with `/bin/kill`, which the Linux sandbox lacks (darwin passed).
The canary substitutes util-linux's `kill` on Linux. tracking: #295

Checked by evaluating each overlay against `kleinbem/nixpkgs`
buzz-app-prep, mesh-llm-dev and buzz-next. I'll start the three canaries
on this branch to confirm.

Part of #215, #253, #291.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Updated packaging adjustments for Buzz, Buzz CLI and Mesh LLM. These
changes affect build and test handling and do not add or change end-user
features.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 5.5 <[email protected]>

@i386 i386 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: content-good — ready for owner approval (owner gate applies).

Head 9787bfa001. Test-only: refreshes the LlamaContextParams ABI mirror to the b12199 pin's layout (size 168→176, moe_cache_cpu_share@120, abort_callback@128) — the struct fields came with #2953's upgrade and this catches the mirror up. Coherent +8 growth with the two new fields exactly where expected; CI green at head across 67 lanes including the platforms these layout tests run on.

Note: #2962 carries the same realignment as commit ea99a7c0a — coordinate so only one lands with it.

@i386
i386 merged commit a816e25 into Mesh-LLM:main Nov 12, 2026
104 of 110 checks passed
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