Skip to content

skippy: land Laguna Q4 and experimental Inkling split serving - #1118

Merged
michaelneale merged 29 commits into
mainfrom
feat/skippy-laguna-inkling
Aug 3, 2026
Merged

skippy: land Laguna Q4 and experimental Inkling split serving#1118
michaelneale merged 29 commits into
mainfrom
feat/skippy-laguna-inkling

Conversation

@michaelneale

@michaelneale michaelneale commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Why

Poolside Laguna and TML Inkling were developed on separate model branches while the hybrid/recurrent verification recovery they share remained in #1100. This PR gives those changes one linear patch queue on current main and removes the overlapping recovery implementations.

It consolidates #1017, #1095, and #1100. The support claims are intentionally asymmetric: the pinned Poolside Q4 package is promoted with current three-stage CUDA and 128K evidence; the pinned Inkling Q2 package is documented as an experimental text candidate with explicit remaining gaps.

What changes

  • add Laguna staged graph filtering, 3,072-wide activation handling, reviewed Q4_K_M capability data, and package-default suffix N-gram depth 2
  • add Inkling architecture/Q2 packaging, multimodal and MTP metadata plumbing, recurrent state, and its staged activation/KV policy
  • preserve package source revisions and allocate staged memory from each owned layer range
  • recover rejected hybrid/recurrent verification windows with bounded recurrent checkpoints, accepted-prefix replay, and exact verify-checkpoint retirement
  • reclaim sessions when a binary-stage connection exits before Stop
  • retire partially restored exact-replay trials before attempting the next checkpoint
  • carry the split-startup, restore, capacity, timeout, direct-path, and native MTP hardening developed on the source branches
  • recognize Inkling's native PEG tool-call semantics and accept its observed arguments spelling
  • keep the llama.cpp work linear as patches 0048..0064

There is no Mesh wire-format break. Stage generation 4 is advertised and required explicitly, so older nodes fail closed before exchanging incompatible stage-control frames.

Poolside Laguna Q4: supported package

Artifact:

meshllm/laguna-s-2.1-Q4_K_M-layers@0c467ad441ee94cb5a76f626294d963c4048507d

The branch-local Linux release host was exercised on three temporary Australian Vast nodes using ordinary Mesh planning and direct Iroh/QUIC paths (normally about 8–9 ms during the run):

  • stage 0: two RTX 4090, layers 0..25
  • stage 1: RTX 5090, layers 25..39
  • stage 2: RTX 4090, layers 39..48
  • context allocation 131072; one lane; Q4_0 K/V; F16 activation wire
  • batch 512, micro-batch 128, fixed 128-token prefill chunks
  • no speculative-strategy or pipeline-depth override; telemetry selected the package-default suffix N-gram depth 2

Observed results:

  • 44,460-token cold request: exact requested output, HTTP 200, 28.96 s prompt time (1,535.44 tok/s), 65 completion tokens at 27.55 tok/s
  • depth 2 proposed 64 speculative tokens and accepted 32; rejected-window recovery reported one recovery epoch and one stale-window discard
  • immediate 44,460-token replay: exact output, HTTP 200 in 5.45 s, 44,416 cached prompt tokens
  • an unrelated request immediately after replay also returned HTTP 200, showing the lane remained usable
  • 128,080-token prompt: two exact-output HTTP 200 completions with zero cached prompt tokens; prompt time was 133.96/133.69 s (956.12/958.05 tok/s), generation 12.45/12.59 tok/s
  • structured OpenAI tool turn returned a valid tool_calls entry; the tool-result follow-up returned a normal final answer
  • 12/12 subsequent stability requests returned HTTP 200, with 1.14–1.61 s wall time (1.39 s median)
  • all three final logs contained no session already exists, all-lanes-busy, unsupported-trim, fatal, decode, reset, proactive-eviction, orphan, or error-level event

This satisfies the repository context-capacity contract for the pinned Q4_K_M package and promotes that package—not every Laguna quant—to the support matrix.

Poolside limits

  • The 128K repeats reported zero cached tokens. Real 128K execution is proven; long-context cache promotion/reuse is not.
  • The 128K prompt is a deterministic repeated-code workload, not a claim about application quality across every 128K workload.
  • 256K serving, multi-lane service, Q8 activation wire, other weight/KV quants, and Metal at 128K were not exercised in this run.
  • A prior M5 Metal run established two- and three-stage single-step parity for this pinned artifact. The current heavy inference proof is CUDA-only.

Inkling Q2: experimental text candidate

Artifact:

meshllm/inkling-UD-Q2_K_XL-layers@9b4b91a7ddd978dd7a01679bc977f6e53777f2c7

A fresh all-CUDA run used one 4 x 96 GB node and one 48 GB node on a direct Iroh/QUIC path whose unloaded RTT was about 5 ms. Ordinary automatic placement produced 0..65 / 65..66, four lanes, F32 activation wire, Q4_0 K/V, and a 131,072-token allocation.

What is proven on the current branch:

  • a short exact-answer split request completed at 14.98 generated tokens/s
  • suffix N-gram depth 2 opened real recurrent verify windows; rejected-window recovery and accepted-prefix replay completed without a fatal trim/decode failure
  • two sequential OpenAI tool-loop attempts each completed two native structured tool calls, two pressure turns, and final recall
  • exact prompt replay restored 3,531/3,531 prompt tokens
  • the stability harness's native log scan found no fatal KV/decode/slot/eviction pattern
  • a 480,000-character repository prompt kept native prefill active for 3,429 seconds with no fatal native-log pattern, but both SSH-launched Mesh processes ended together before an SSE data event was delivered; the empty HTTP 200 stream had no content or usage, so this is explicitly not a completed long-context pass

This topology is evidence that the package runs; it is not a deployment recommendation. The 65-layer head took roughly 14 minutes to become ready, reserved about 589 GiB of CUDA host compute workspace, and briefly starved membership processing during startup. Load also inflated coordination RTT far beyond the approximately 5 ms physical path.

Remaining gaps are concrete:

  • both overlapping tool-loop phases missed the full harness bar: one returned HTTP 502 while opening the direct prediction-return sink; the other completed its tool behavior but reported zero changed-tail cached tokens
  • the separate same-prefix changed-tail cache phase likewise reported 0 cached tokens, while exact replay passed
  • F16 and Q8 activation wires fail the current correctness policy; F32 is required
  • live native MTP, multimodal generation, and clean Metal teardown are not claimed
  • more balanced low-latency placement is needed before this is a practical Inkling topology

The operator path and these limits are documented in docs/SKIPPY_SPLITS.md; Inkling remains outside the promoted support matrix in docs/skippy/FAMILY_STATUS.md.

Nick review follow-up

  • extracted endpoint/hardware/owner startup from mesh/node.rs (now 1,840 lines) and artifact validation/reporting from skippy-model-package/preflight.rs (now 1,892 lines)
  • native SafeTensors conversion now honors --split-max-size by increasing the byte-balanced GGUF split count when required, including MTP-only tensor selection
  • upload-only HF Jobs validate every exact shard declared by the copied conversion manifest, so interrupted multi-shard conversions fail closed
  • split-readiness diagnostics report the same configurable RTT threshold used by peer admission
  • orphaned-session cleanup failures propagate through the binary connection result while preserving any original connection failure

Validation

  • clean application of the 64-patch llama.cpp queue at the pinned upstream revision
  • Linux branch-local just release-host-build
  • cargo fmt --all --check
  • cargo test -p skippy-server --lib
  • warning-denying Clippy for the touched Rust surfaces
  • focused upstream test-chat Inkling parser regression
  • current Poolside and Inkling live split evidence above

Fresh GitHub CI for the final head must finish green before merge. Nick's prior change request is addressed in the branch but still requires re-review.

Tracks #1090 and #1025. Consolidates #1017, #1095, and #1100.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds Inkling and Laguna staged-model support, immutable package revisions and projector metadata, stage-state v11 and protocol generation 4 behavior, split-runtime coordination and capacity handling, validation CLIs and job scripts, plus related tests and documentation.

Changes

Model packaging and Inkling support

Layer / File(s) Summary
Inkling conversion and GGUF metadata
crates/skippy-quantize/..., crates/model-artifact/..., third_party/llama.cpp/patches/0050-*, third_party/llama.cpp/patches/0054-*
Adds Inkling metadata, tokenizer, tensor mapping, multimodal projector, MTP sidecar, per-layer KV-head, and GGUF serialization support.
Package inventory and publishing
crates/model-package/..., crates/mesh-llm-commands/..., crates/mesh-llm-cli/..., docs/...
Resolves immutable source revisions, discovers projector sidecars, propagates source metadata, supports experimental publishing, and updates package documentation.
Validation tooling
crates/skippy-correctness/..., crates/skippy-quantize/src/mtp_attach.rs, crates/skippy-quantize/src/projector_validate.rs, scripts/hf-skippy-*-job.py
Adds stage FA parity, projector validation, MTP attach validation, direct prediction return handling, and Hugging Face job orchestration.

Runtime and mesh behavior

Layer / File(s) Summary
Split membership and topology
crates/mesh-llm-host-runtime/src/runtime/..., crates/skippy-coordinator/src/topology.rs
Adds membership settling, canonical coordinator election, required stage-0 planning, retry classification, and dynamic stage-source preparation timeouts.
Capacity and connection handling
crates/mesh-llm-host-runtime/src/mesh/...
Adds advertised/local runtime capacity calculations, configurable RTT and relay behavior, draining of replaced connections, and request-specific stage-control timeouts.
Family and media policy resolution
crates/mesh-llm-host-runtime/src/inference/..., crates/mesh-llm-host-runtime/src/models/..., crates/skippy-topology/...
Adds Inkling KV defaults, package metadata cache budgeting, audio projector evidence, and Inkling/Laguna family capability records.

Protocol and speculative execution

Layer / File(s) Summary
Stage protocol generation 4 and stage-state v11
crates/skippy-protocol/..., crates/skippy-ffi/..., crates/skippy-runtime/..., crates/skippy-server/..., third_party/llama.cpp/patches/0059-*, third_party/llama.cpp/patches/0060-*
Adds verify-checkpoint retirement, Inkling embedding sidebands, stricter ABI compatibility, pipeline-depth propagation and validation, and protocol generation updates.
Native MTP and staged llama.cpp execution
third_party/llama.cpp/patches/0048-* through 0063-*
Adds Laguna and Inkling staged graphs, stage-filtered memory and device balancing, multi-depth MTP replay, external multimodal embeddings, recurrent-memory sizing, metadata integration, and hardening changes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Suggested labels: experimental

Suggested reviewers: danielwinterw, i386, ndizazzo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.60% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the PR's primary changes: Laguna Q4 support and experimental Inkling split serving.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/skippy-laguna-inkling

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 18

🧹 Nitpick comments (17)
Justfile (1)

268-277: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate build-prep steps across standalone build/release recipes.

skippy-quantize-standalone-build and skippy-quantize-standalone-release-build repeat the same prepare-llama.sh pinned + build-llama.sh setup verbatim; only the final cargo build invocation differs. A future change to the pinned-prep or backend/link-mode env vars in one recipe risks drifting from the other.

♻️ Proposed refactor using a shared just dependency
+_skippy-quantize-standalone-prep backend="cpu":
+    scripts/prepare-llama.sh pinned
+    LLAMA_STAGE_BACKEND="{{ backend }}" LLAMA_STAGE_LINK_MODE=static scripts/build-llama.sh
+
-skippy-quantize-standalone-build backend="cpu":
-    scripts/prepare-llama.sh pinned
-    LLAMA_STAGE_BACKEND="{{ backend }}" LLAMA_STAGE_LINK_MODE=static scripts/build-llama.sh
+skippy-quantize-standalone-build backend="cpu": (_skippy-quantize-standalone-prep backend)
     LLAMA_STAGE_BACKEND="{{ backend }}" LLAMA_STAGE_LINK_MODE=static just with-lld cargo build -p skippy-quantize --no-default-features

 [unix]
-skippy-quantize-standalone-release-build backend="cpu":
-    scripts/prepare-llama.sh pinned
-    LLAMA_STAGE_BACKEND="{{ backend }}" LLAMA_STAGE_LINK_MODE=static scripts/build-llama.sh
+skippy-quantize-standalone-release-build backend="cpu": (_skippy-quantize-standalone-prep backend)
     LLAMA_STAGE_BACKEND="{{ backend }}" LLAMA_STAGE_LINK_MODE=static just with-lld cargo build --release --locked -p skippy-quantize --no-default-features
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Justfile` around lines 268 - 277, Extract the shared
`scripts/prepare-llama.sh pinned` and `build-llama.sh` setup from
`skippy-quantize-standalone-build` and
`skippy-quantize-standalone-release-build` into a shared just dependency or
helper recipe, then make both recipes depend on it while retaining their
distinct debug and release `cargo build` commands and existing backend/link-mode
variables.
crates/model-package/src/bin/queue-unsloth-layer-packages.rs (2)

792-799: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Same total computed twice with different overflow semantics.

candidate_source_total_bytes saturates while job_spec_with_token re-derives the identical value with checked_add + error context. Job planning/bucket sizing and the container's SOURCE_TOTAL_BYTES can therefore disagree at the u64 boundary. Have job_spec_with_token call the shared helper (or make the helper the checked one and use it in both places).

♻️ Proposed consolidation
-fn candidate_source_total_bytes(candidate: &Candidate) -> u64 {
-    candidate
-        .projectors
-        .iter()
-        .fold(candidate.quant.total_bytes, |total, projector| {
-            total.saturating_add(projector.total_bytes)
-        })
-}
+fn candidate_source_total_bytes(candidate: &Candidate) -> Result<u64> {
+    candidate
+        .projectors
+        .iter()
+        .try_fold(candidate.quant.total_bytes, |total, projector| {
+            total.checked_add(projector.total_bytes)
+        })
+        .context("source GGUF and projector sizes overflowed u64")
+}
-    let projector_bytes = candidate
-        .projectors
-        .iter()
-        .try_fold(0u64, |total, projector| {
-            total.checked_add(projector.total_bytes)
-        })
-        .context("source GGUF and projector sizes overflowed u64")?;
-    let source_total_bytes = candidate
-        .quant
-        .total_bytes
-        .checked_add(projector_bytes)
-        .context("source GGUF and projector sizes overflowed u64")?;
+    let source_total_bytes = candidate_source_total_bytes(candidate)?;

Also applies to: 1100-1111

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/model-package/src/bin/queue-unsloth-layer-packages.rs` around lines
792 - 799, Update job_spec_with_token to reuse candidate_source_total_bytes
instead of independently summing quant and projector bytes with checked_add.
Ensure job planning, bucket sizing, and SOURCE_TOTAL_BYTES all derive the total
through the same helper and preserve consistent overflow semantics.

870-879: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Hardcoded "inkling" substring as the multimodal allowlist.

info.id.to_ascii_lowercase().contains("inkling") will admit any repo whose id happens to contain that substring and needs a code change for the next supported multimodal family. A small named allowlist constant (or family-key match via model_family_key) would scale better and make the intent explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/model-package/src/bin/queue-unsloth-layer-packages.rs` around lines
870 - 879, The multimodal compatibility check in the queue compatibility logic
uses an overly broad hardcoded “inkling” substring. Replace it with a named
allowlist or model-family key match using the existing model-family mechanism,
and update the condition to admit only explicitly supported multimodal families
while preserving text-generation compatibility.
crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs (1)

1615-1620: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Env-gated test silently passes in CI.

real_inkling_metadata_plans_family_kv_not_size_tiered returns Ok when INKLING_METADATA_GGUF is unset, so it reports green without exercising anything. Prefer #[ignore = "requires INKLING_METADATA_GGUF"] so the skip is visible in test output.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs` around lines
1615 - 1620, Update the real_inkling_metadata_plans_family_kv_not_size_tiered
test to use an ignored-test attribute with the reason that INKLING_METADATA_GGUF
is required, and remove the environment-variable early-return skip so missing
configuration is visible in test output.
crates/skippy-correctness/src/cli.rs (1)

329-349: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

No doc comments means stage-fa-parity --help renders bare flags.

Adding /// docs on max_abs, layer_start/layer_end, and the two output paths would make the tolerance semantics and file outputs discoverable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-correctness/src/cli.rs` around lines 329 - 349, Add doc
comments to StageFaParityArgs fields max_abs, layer_start, layer_end,
enabled_output, and disabled_output so stage-fa-parity --help describes
tolerance semantics, layer range behavior, and the files written by each output
path. Keep the existing argument names and defaults unchanged.
crates/mesh-llm-host-runtime/src/runtime/local_split.rs (1)

152-170: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Two independent hard-coded 30s timeouts now govern one start attempt.

elect_split_start_coordinator uses Duration::from_secs(30) for membership settling and start_runtime_split_model passes another Duration::from_secs(30) into prepare_split_runtime_start, so a single split start can now block for up to ~60s before returning Standby/Started. Consider hoisting both into a named constant (and documenting the combined budget) so the startup retry loop cadence stays predictable.

Also applies to: 378-395

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split.rs` around lines 152 -
170, Define a shared named startup timeout constant near the split-start
orchestration and reuse it for both elect_split_start_coordinator and
prepare_split_runtime_start within start_runtime_split_model. Document that the
two sequential phases share a combined startup budget, preserving the existing
timeout duration and predictable retry cadence.
crates/skippy-coordinator/src/topology.rs (1)

126-130: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stage-0 constraint failures surface as a generic NoValidTopology.

If the required stage-0 node isn't in usable_nodes (or can't hold stage 0 at any shape), the caller only sees NoValidTopology { minimum_context }, which points at context sizing rather than the real cause. Consider a distinct error variant (or at least carrying the required node id) so split_topology_failure_reason can report it.

Also applies to: 437-448

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-coordinator/src/topology.rs` around lines 126 - 130, Update
plan_topology_with_required_stage0 and the related failure handling around
split_topology_failure_reason so an unavailable or stage-0-incompatible
required_stage0_node_id produces a distinct, identifiable TopologyPlanError
(including the node id) instead of generic NoValidTopology. Ensure the caller
reports this constraint failure while preserving existing behavior for ordinary
topology failures.
crates/skippy-correctness/src/runner/stage_fa_parity.rs (1)

64-101: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hardcoded model_id diverges from the user-supplied --model path.

model_id is fixed to Inkling while package_ref is whatever args.model points to. If this harness is ever pointed at a non-Inkling package, family-specific behavior keyed off model_id (e.g. KV cache defaults) could silently apply the wrong policy instead of erroring.

♻️ Suggested: parameterize model_id
-    let selection = select_layer_package_parts(&PackageStageRequest {
-        model_id: "unsloth/inkling-GGUF:UD-Q2_K_XL".to_string(),
+    let selection = select_layer_package_parts(&PackageStageRequest {
+        model_id: args.model_id.clone(),
         topology_id: "stage-fa-parity".to_string(),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-correctness/src/runner/stage_fa_parity.rs` around lines 64 -
101, Update decode_boundary to derive PackageStageRequest.model_id from the
user-supplied args.model instead of hardcoding the Inkling identifier, ensuring
model-specific package selection and policies match the selected model.
crates/mesh-llm-host-runtime/src/runtime/local_package.rs (2)

64-111: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Silent fallback hides a bad family default.

If family_policy_for_compact_meta(...).default_kv_cache_type ever returns a string GgufKvCacheQuant::from_llama_args cannot parse, planning silently reverts to the size-tiered policy and budgets a different KV size than the doc comment promises. A tracing::warn! on that path makes the mismatch diagnosable instead of showing up as an OOM at stage load.

♻️ Proposed logging on the fallback path
     models::gguf::GgufKvCacheQuant::from_llama_args(effective_k, effective_v).unwrap_or_else(|| {
+        tracing::warn!(
+            model_ref,
+            effective_k,
+            effective_v,
+            "unrecognized effective K/V cache types; falling back to size-tiered KV policy"
+        );
         split_kv_cache_quant(&size_policy, cache_type_k_override, cache_type_v_override)
     })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_package.rs` around lines 64 -
111, Add a tracing::warn! call in split_effective_kv_cache_quant when
GgufKvCacheQuant::from_llama_args returns None and split_kv_cache_quant is used
as the fallback. Include the resolved family default and enough model context to
diagnose the invalid value, while preserving the existing fallback behavior.

445-486: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Peer exclusion prelude is duplicated with collect_split_participants.

Lines 456-472 are byte-identical to lines 502-518; only the participant construction differs. Extracting the preflight/stage-path exclusion check into a small helper (returning Result<(), SplitParticipantExclusion> per peer) keeps the two collectors from drifting as exclusion reasons are added.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_package.rs` around lines 445 -
486, Extract the duplicated peer exclusion logic from
collect_split_participant_membership and collect_split_participants into a
shared helper that returns Result<(), SplitParticipantExclusion> for each peer.
Update both collectors to call the helper, recording the returned exclusion on
Err and constructing the appropriate participant only on Ok, while preserving
their existing participant-specific construction behavior.
crates/mesh-llm-host-runtime/src/mesh/direct_path.rs (1)

223-245: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Option parameter is dead at the only call site.

The if let Some(existing) = existing.filter(...) guard means record_draining_replaced_connection is never called with None, so the early return is unreachable. Also the name suggests state mutation while the body only logs.

♻️ Optional simplification
-            record_draining_replaced_connection(remote, Some(&existing), &conn);
+            log_replaced_connection_drain(remote, &existing, &conn);
             Self::spawn_replaced_connection_drain(remote, existing);
         }
     }
 }
 
-fn record_draining_replaced_connection(
-    remote: EndpointId,
-    existing: Option<&Connection>,
-    replacement: &Connection,
-) {
-    let Some(existing) = existing else {
-        return;
-    };
+fn log_replaced_connection_drain(
+    remote: EndpointId,
+    existing: &Connection,
+    replacement: &Connection,
+) {
     tracing::debug!(
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/mesh/direct_path.rs` around lines 223 - 245,
Update record_draining_replaced_connection to accept a direct &Connection
instead of Option<&Connection>, remove the unreachable None early return, and
rename the function to reflect that it only logs the replacement. Adjust its
sole call site in the existing replacement branch to pass existing directly
while preserving the current debug fields and message.
third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch (2)

4194-4201: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

These banded cases add substantial cost to the default test-backend-ops run.

Six cases at n_q=512 with n_kv from 8192 up to 32768 (128-dim, 8 heads) are appended to make_test_cases_eval(), which every test-backend-ops invocation executes against the CPU reference. That is roughly 4 · 8 · 512 · 32768 · 128 FLOPs for the largest case alone, per backend. Gating the ≥16K cases behind the perf/large mode (as the comment about the "16.4-16.9K garbage threshold" suggests they are regression probes) would keep default CI runtime bounded while retaining coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch` around
lines 4194 - 4201, Reduce the default cost of make_test_cases_eval() by gating
the banded test_flash_attn_ext_banded cases with n_kv at or above 16K behind the
existing performance/large-test mode. Keep the smaller 8192 case in the default
suite and preserve all regression probes when that mode is enabled.

440-451: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Bare except Exception masks real tokenizer-config errors.

If tokenizer_config.json exists but is malformed, or added_tokens_decoder has a non-integer key, the conversion silently falls back to the positional "trailing 60 ids" convention and produces a GGUF with wrong CONTROL token types — a failure that only surfaces as bad generation much later. Narrowing to FileNotFoundError/KeyError (and logging the fallback) keeps the intended default while surfacing genuine corruption.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch` around
lines 440 - 451, The tokenizer configuration loading around tc and special_ids
must not mask malformed data or invalid token IDs. Restrict fallback handling to
the expected missing-file or absent-key cases, log when the positional
trailing-60 fallback is used, and allow JSON/parsing or integer-conversion
errors to propagate instead of silently producing incorrect CONTROL token types.
crates/skippy-correctness/src/runner/prediction_return.rs (1)

159-178: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Partial peek silently leaves the hello bytes in the stream.

peek under SO_RCVTIMEO can return Ok(n) with 0 < n < 4. The Ok(_) => {} arm then skips recv_ready, leaving the READY magic in the receive buffer, and read_stage_message at line 132 parses it as the open message. Practically unreachable on loopback with a 4-byte write, but a short retry loop (or treating Ok(n) with n>0 && n<4 as "keep peeking") removes the ambiguity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-correctness/src/runner/prediction_return.rs` around lines 159 -
178, Update the direct prediction return readiness handling around stream.peek
and recv_ready so partial successful peeks do not fall through as an empty
result. Retry peeking until all four READY_MAGIC bytes are available, or
otherwise consume and validate the complete hello before read_stage_message can
process the stream; preserve the existing timeout/error handling.
third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch (1)

472-492: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Final output_norm now runs on the untrimmed sequence on every decode.

Moving build_norm(cur, model.output_norm, ...) above the inp_out_ids gather makes the norm cost n_tokens rows instead of n_out rows. During prefill with a single requested output row and a 6144-wide embedding, that is the full ubatch normalized just to be discarded.

The reordering is only required to feed t_h_nextn; when cparams.embeddings_nextn is false the old ordering is still correct and cheaper.

♻️ Suggested: keep the trim-first ordering when nextn embeddings are not requested
     ggml_tensor * inp_out_ids = build_inp_out_ids();
-    cur = build_norm(cur, model.output_norm, NULL, LLM_NORM_RMS, -1);
-    cb(cur, "result_norm_all", -1);
     if (cparams.embeddings_nextn) {
+        cur = build_norm(cur, model.output_norm, NULL, LLM_NORM_RMS, -1);
+        cb(cur, "result_norm_all", -1);
         ggml_tensor * h_nextn = cur;
         if (cparams.embeddings_nextn_masked && inp_out_ids) {
             h_nextn = ggml_get_rows(ctx0, h_nextn, inp_out_ids);
         }
         cb(h_nextn, "h_nextn", -1);
         res->t_h_nextn = h_nextn;
+        if (inp_out_ids) {
+            cur = ggml_get_rows(ctx0, cur, inp_out_ids);
+        }
+    } else {
+        if (inp_out_ids) {
+            cur = ggml_get_rows(ctx0, cur, inp_out_ids);
+        }
+        cur = build_norm(cur, model.output_norm, NULL, LLM_NORM_RMS, -1);
     }
-    if (inp_out_ids) {
-        cur = ggml_get_rows(ctx0, cur, inp_out_ids);
-    }
     cb(cur, "result_norm", -1);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch`
around lines 472 - 492, Update llama_model_inkling::graph::graph so output_norm
remains after the inp_out_ids gather when cparams.embeddings_nextn is false,
preserving the trimmed-sequence cost; only normalize the untrimmed cur before
gathering when embeddings_nextn is enabled so t_h_nextn receives the full
normalized sequence.
crates/skippy-quantize/src/gguf_writer.rs (1)

443-452: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Only k_sconv shortconv path is exercised by tests.

mapped_tensor_dims asserts a strict [channels, 1, kernel] shape for any mapped name containing .shortconv_, which also covers shortconv_v, shortconv_attn, and shortconv_mlp (per the new tensor_map.rs mappings for attn.v_sconv.weight, attn_sconv.weight, mlp_sconv.weight). Only the k_sconv case is covered by writes_inkling_mtp_streaming_transforms in gguf_writer_tests.rs. If any of those other shortconv tensors have a different native shape in real Inkling checkpoints, the shared ensure! here would reject them at conversion time without any test catching it first.

Consider adding test cases (or at least an assertion) for the other shortconv suffix variants.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-quantize/src/gguf_writer.rs` around lines 443 - 452, Extend
coverage for mapped_tensor_dims beyond the currently tested k_sconv case by
adding assertions or test cases for shortconv_v, shortconv_attn, and
shortconv_mlp mappings. Verify each variant’s expected native shape and
converted dimensions, and ensure the existing strict validation remains limited
to shapes those mappings actually require.
crates/skippy-server/src/frontend/embedded_generation.rs (1)

1-2020: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

File is very large and keeps absorbing new branching logic.

This file is already very large (~2,000 lines) and this PR adds more branching (effective-speculative bypass, verify-checkpoint retirement in two places) directly into generate_embedded_stage_zero_tokens. Consider extracting the verify-window pipelining/retirement bookkeeping into a dedicated helper module in a future pass.

As per coding guidelines, "Do not add Rust source files over 2,000 lines; split approaching oversized files by responsibility."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/frontend/embedded_generation.rs` around lines 1 -
2020, The generate_embedded_stage_zero_tokens method has grown beyond the
2,000-line source-file guideline by accumulating verify-window pipelining and
retirement branches. Extract that bookkeeping, including effective-speculative
bypass and verify-checkpoint retirement logic, into a dedicated helper module or
responsibility-focused module, then keep generate_embedded_stage_zero_tokens
focused on orchestration while preserving existing behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/mesh-llm-host-runtime/src/inference/skippy/resolver/resolution.rs`:
- Around line 248-250: Reorder the cache-type resolution logic so explicit
global_model_fit.cache_type_k/v values are checked before
family_policy.default_kv_cache_type. Preserve the family default as the fallback
before generic macro or policy defaults, ensuring global overrides remain
effective for both K and V cache resolution.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split.rs`:
- Around line 189-194: Update the retry classification used by the split startup
loop to treat the canonical-coordinator stage-0 topology errors from the stage-0
validation checks as retryable. Include both the “split topology stage 0 … does
not match canonical coordinator …” and “split topology lock stage 0 must be
canonical coordinator …” failures, while preserving existing handling for
convergence, transport, and source-timeout cases.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/loading.rs`:
- Around line 23-27: Update wait_for_split_stage_source and the
STAGE_SOURCE_PREPARE timeout bounds so the timeout cannot be capped below the
calculated 16 MiB/s transfer budget. Make MAX_STAGE_SOURCE_PREPARE_TIMEOUT
configurable or allow calculated budgets above six hours, preserving the
existing minimum timeout and successful preparation for very large stages.

In `@crates/mesh-llm-host-runtime/src/runtime/split_participant_settle.rs`:
- Around line 12-18: Update the settle deadline logic used by is_ready and
finish_at_timeout so caller timeouts shorter than the required observation
barrier remain reachable, preferably by clamping the effective deadline to at
least the configured SPLIT_FIRST_QUORUM_OBSERVATION window. Preserve normal
timeout behavior for longer caller timeouts and avoid emitting the "settle timed
out" warning for a stable mesh solely because the requested timeout was below
the barrier duration.

In `@crates/skippy-model-package/src/preflight.rs`:
- Around line 1021-1030: Update the preflight validation for
window.pipeline_depth in the surrounding speculative strategy checks to reject
values above the shared supported maximum as well as zero. Reuse the existing
maximum-capacity constant or symbol used by the server/native
checkpoint-retention limit, preserve the current error reporting pattern, and
add a boundary test covering the maximum accepted value and the first
unsupported value.

In `@crates/skippy-protocol/src/lib.rs`:
- Around line 15-21: Retain the V3 generation feature constant and
generation-specific support in crates/skippy-protocol/src/lib.rs:15-21 while
adding V4. In crates/mesh-llm-host-runtime/src/protocol/convert.rs:17-21, update
the announcement conversion to advertise both supported generations; in
convert.rs:50-57, negotiate the highest mutually supported generation rather
than requiring V4, preserving V3 framing for V3-only peers. Add announcement
coverage in
crates/mesh-llm-host-runtime/src/protocol/tests/announcements.rs:82-85 for
V3-only interoperability and V4 preference when both peers support it.

In `@crates/skippy-quantize/src/mtp_attach.rs`:
- Around line 50-55: Update the ABI feature probing in the MTP attach validation
flow to handle panics from skippy_ffi::abi_features() when the loaded runtime
lacks the symbol. Catch the probe failure and convert it into the existing
unsupported-runtime validation error, preserving the current ensure! check for
runtimes that successfully report features.

In `@crates/skippy-quantize/src/tensor_map.rs`:
- Around line 113-134: Update normalize_inkling_mtp_source_name to compute the
layer index with layer_start.checked_add(depth), and propagate an error with the
context “Inkling MTP layer id overflow” when it overflows. Keep the existing
tensor-name normalization and formatting unchanged.

In `@crates/skippy-server/README.md`:
- Around line 83-87: Update the remaining “generation-3 prediction returns”
reference in the README compatibility section to “generation-4 prediction
returns,” preserving the surrounding generation-4 protocol documentation.

In `@crates/skippy-server/src/binary_transport/binary_messaging/connection.rs`:
- Around line 99-146: Split the control-message handling from
handle_binary_connection_messages into a semantically named module, including
the Stop, verify-retirement, session-control, generation-control, and
prefix-cache-control branches. Move the associated logic and relevant tests to
the new module, keeping it under 1,000 lines, and update
handle_binary_connection_messages to delegate while preserving session_tracker
behavior.

In `@crates/skippy-server/src/binary_transport/stage_execution.rs`:
- Around line 119-130: Update complete_downstream_ready to set a short write
timeout on the TcpStream before calling send_client_ready_hello_if_enabled, then
clear the write timeout after the handshake. Preserve the existing read-timeout
setup and result propagation, ensuring timeout cleanup occurs after both the
hello write and recv_ready.

In `@scripts/hf-skippy-mtp-certify-job.py`:
- Around line 79-89: Harden the projector download flow around the URL handling
and urllib.request.urlopen call: allow only trusted HTTPS hosts, validate every
redirect destination, reject private, loopback, link-local, reserved, and
otherwise non-public resolved addresses, and enforce bounded connection/read
timeouts and a maximum response/download size. Preserve the existing atomic
temporary-file replacement and require_gguf_magic validation after a successful
download.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch`:
- Around line 3017-3060: Eliminate the O(n_kv) validation scan in
llama_kv_cache::get_n_kv_pos_contiguous by maintaining cached contiguity state
with a high-water mark on the cache, invalidating or updating it during sequence
removal and defragmentation. Use that state for an O(1) or incrementally bounded
check after the existing cheap ubatch validations, while preserving rejection
when any hole or non-contiguous cell is present.

In
`@third_party/llama.cpp/patches/0055-Carry-multimodal-Inkling-embeddings-into-MTP.patch`:
- Around line 22-40: Bump the appropriate SKIPPY_ABI_VERSION_* constant in
skippy/common.h for the new SKIPPY_ACTIVATION_FLAG_INKLING_MTP_EMBD and
SKIPPY_FEATURE_INKLING_MTP_MM staged-runtime ABI surface, then update the
matching ABI version constant in crates/skippy-ffi/src/lib.rs so both
representations remain synchronized.
- Around line 47-58: Update llama_decode so the return value remains solely the
result of ctx->decode(batch); do not propagate skippy_external_decode_observe
failures to callers after a successful target decode. Handle the observer
failure through the existing Skippy/MTP session state, marking it so
skippy_mtp_propose_next skips drafting until the session is re-primed, while
preserving the observer’s stderr logging.

In
`@third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch`:
- Around line 24-42: Bump the staged-runtime ABI version in the common ABI
definition and update the mirrored constant in the Skippy FFI bindings. Modify
the relevant ABI version symbols in common.h and crates/skippy-ffi/src/lib.rs,
keeping both values identical so states using the new hparams.n_layer_all
recurrent layout cannot be mixed with the previous layout.

In
`@third_party/llama.cpp/patches/0059-Preserve-hybrid-verify-window-state-across-trim.patch`:
- Around line 164-203: Add a bounds validation at the start of
skippy_verify_prefix_activation_payload before either the ALTUP slice or memcpy
operations, ensuring all computed source and prefix ranges fit within
checkpoint.input_payload.size(). Return the established empty/failed result when
validation fails so skippy_fail_verify_restore can handle it; leave valid
payload reconstruction unchanged.
- Around line 133-141: The accepted verification flow must retire its checkpoint
after successful verification to prevent steady-state accumulation. Update the
patched skippy_verify_* success path to call
skippy_retire_verify_checkpoint_exact() for the accepted checkpoint, preserving
checkpoints during normal verified generation and leaving
trim/reset/import/reset-position cleanup behavior unchanged.

---

Nitpick comments:
In `@crates/mesh-llm-host-runtime/src/mesh/direct_path.rs`:
- Around line 223-245: Update record_draining_replaced_connection to accept a
direct &Connection instead of Option<&Connection>, remove the unreachable None
early return, and rename the function to reflect that it only logs the
replacement. Adjust its sole call site in the existing replacement branch to
pass existing directly while preserving the current debug fields and message.

In `@crates/mesh-llm-host-runtime/src/runtime/local_package.rs`:
- Around line 64-111: Add a tracing::warn! call in
split_effective_kv_cache_quant when GgufKvCacheQuant::from_llama_args returns
None and split_kv_cache_quant is used as the fallback. Include the resolved
family default and enough model context to diagnose the invalid value, while
preserving the existing fallback behavior.
- Around line 445-486: Extract the duplicated peer exclusion logic from
collect_split_participant_membership and collect_split_participants into a
shared helper that returns Result<(), SplitParticipantExclusion> for each peer.
Update both collectors to call the helper, recording the returned exclusion on
Err and constructing the appropriate participant only on Ok, while preserving
their existing participant-specific construction behavior.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split.rs`:
- Around line 152-170: Define a shared named startup timeout constant near the
split-start orchestration and reuse it for both elect_split_start_coordinator
and prepare_split_runtime_start within start_runtime_split_model. Document that
the two sequential phases share a combined startup budget, preserving the
existing timeout duration and predictable retry cadence.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs`:
- Around line 1615-1620: Update the
real_inkling_metadata_plans_family_kv_not_size_tiered test to use an
ignored-test attribute with the reason that INKLING_METADATA_GGUF is required,
and remove the environment-variable early-return skip so missing configuration
is visible in test output.

In `@crates/model-package/src/bin/queue-unsloth-layer-packages.rs`:
- Around line 792-799: Update job_spec_with_token to reuse
candidate_source_total_bytes instead of independently summing quant and
projector bytes with checked_add. Ensure job planning, bucket sizing, and
SOURCE_TOTAL_BYTES all derive the total through the same helper and preserve
consistent overflow semantics.
- Around line 870-879: The multimodal compatibility check in the queue
compatibility logic uses an overly broad hardcoded “inkling” substring. Replace
it with a named allowlist or model-family key match using the existing
model-family mechanism, and update the condition to admit only explicitly
supported multimodal families while preserving text-generation compatibility.

In `@crates/skippy-coordinator/src/topology.rs`:
- Around line 126-130: Update plan_topology_with_required_stage0 and the related
failure handling around split_topology_failure_reason so an unavailable or
stage-0-incompatible required_stage0_node_id produces a distinct, identifiable
TopologyPlanError (including the node id) instead of generic NoValidTopology.
Ensure the caller reports this constraint failure while preserving existing
behavior for ordinary topology failures.

In `@crates/skippy-correctness/src/cli.rs`:
- Around line 329-349: Add doc comments to StageFaParityArgs fields max_abs,
layer_start, layer_end, enabled_output, and disabled_output so stage-fa-parity
--help describes tolerance semantics, layer range behavior, and the files
written by each output path. Keep the existing argument names and defaults
unchanged.

In `@crates/skippy-correctness/src/runner/prediction_return.rs`:
- Around line 159-178: Update the direct prediction return readiness handling
around stream.peek and recv_ready so partial successful peeks do not fall
through as an empty result. Retry peeking until all four READY_MAGIC bytes are
available, or otherwise consume and validate the complete hello before
read_stage_message can process the stream; preserve the existing timeout/error
handling.

In `@crates/skippy-correctness/src/runner/stage_fa_parity.rs`:
- Around line 64-101: Update decode_boundary to derive
PackageStageRequest.model_id from the user-supplied args.model instead of
hardcoding the Inkling identifier, ensuring model-specific package selection and
policies match the selected model.

In `@crates/skippy-quantize/src/gguf_writer.rs`:
- Around line 443-452: Extend coverage for mapped_tensor_dims beyond the
currently tested k_sconv case by adding assertions or test cases for
shortconv_v, shortconv_attn, and shortconv_mlp mappings. Verify each variant’s
expected native shape and converted dimensions, and ensure the existing strict
validation remains limited to shapes those mappings actually require.

In `@crates/skippy-server/src/frontend/embedded_generation.rs`:
- Around line 1-2020: The generate_embedded_stage_zero_tokens method has grown
beyond the 2,000-line source-file guideline by accumulating verify-window
pipelining and retirement branches. Extract that bookkeeping, including
effective-speculative bypass and verify-checkpoint retirement logic, into a
dedicated helper module or responsibility-focused module, then keep
generate_embedded_stage_zero_tokens focused on orchestration while preserving
existing behavior.

In `@Justfile`:
- Around line 268-277: Extract the shared `scripts/prepare-llama.sh pinned` and
`build-llama.sh` setup from `skippy-quantize-standalone-build` and
`skippy-quantize-standalone-release-build` into a shared just dependency or
helper recipe, then make both recipes depend on it while retaining their
distinct debug and release `cargo build` commands and existing backend/link-mode
variables.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch`:
- Around line 4194-4201: Reduce the default cost of make_test_cases_eval() by
gating the banded test_flash_attn_ext_banded cases with n_kv at or above 16K
behind the existing performance/large-test mode. Keep the smaller 8192 case in
the default suite and preserve all regression probes when that mode is enabled.
- Around line 440-451: The tokenizer configuration loading around tc and
special_ids must not mask malformed data or invalid token IDs. Restrict fallback
handling to the expected missing-file or absent-key cases, log when the
positional trailing-60 fallback is used, and allow JSON/parsing or
integer-conversion errors to propagate instead of silently producing incorrect
CONTROL token types.

In
`@third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch`:
- Around line 472-492: Update llama_model_inkling::graph::graph so output_norm
remains after the inp_out_ids gather when cparams.embeddings_nextn is false,
preserving the trimmed-sequence cost; only normalize the untrimmed cur before
gathering when embeddings_nextn is enabled so t_h_nextn receives the full
normalized sequence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 000c7644-433c-4a7e-aad0-34f8fe1794f4

📥 Commits

Reviewing files that changed from the base of the PR and between 9f0bc21 and 9722a91.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (151)
  • .github/workflows/queue-unsloth-layer-packages.yml
  • Justfile
  • crates/llama-quant-ffi/src/lib.rs
  • crates/mesh-llm-cli/src/models.rs
  • crates/mesh-llm-cli/src/parser.rs
  • crates/mesh-llm-commands/src/model_package.rs
  • crates/mesh-llm-config/src/model_validation.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/family_policy.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/mod.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/native_mtp_tests.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/resolution.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/mod.rs
  • crates/mesh-llm-host-runtime/src/mesh/capacity.rs
  • crates/mesh-llm-host-runtime/src/mesh/connections.rs
  • crates/mesh-llm-host-runtime/src/mesh/direct_path.rs
  • crates/mesh-llm-host-runtime/src/mesh/mod.rs
  • crates/mesh-llm-host-runtime/src/mesh/node.rs
  • crates/mesh-llm-host-runtime/src/mesh/peer_state.rs
  • crates/mesh-llm-host-runtime/src/mesh/stage_artifacts.rs
  • crates/mesh-llm-host-runtime/src/mesh/stage_transport.rs
  • crates/mesh-llm-host-runtime/src/mesh/tests/connections.rs
  • crates/mesh-llm-host-runtime/src/mesh/tests/direct_path.rs
  • crates/mesh-llm-host-runtime/src/models/capabilities.rs
  • crates/mesh-llm-host-runtime/src/models/mod.rs
  • crates/mesh-llm-host-runtime/src/protocol/convert.rs
  • crates/mesh-llm-host-runtime/src/protocol/tests/announcements.rs
  • crates/mesh-llm-host-runtime/src/runtime/local.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_package.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split/loading.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs
  • crates/mesh-llm-host-runtime/src/runtime/mod.rs
  • crates/mesh-llm-host-runtime/src/runtime/model_lifecycle/load.rs
  • crates/mesh-llm-host-runtime/src/runtime/model_lifecycle/reconciliation.rs
  • crates/mesh-llm-host-runtime/src/runtime/split_participant_settle.rs
  • crates/mesh-llm-host-runtime/src/runtime/split_planning.rs
  • crates/mesh-llm-host-runtime/src/runtime/startup_handles.rs
  • crates/mesh-llm-host-runtime/src/runtime/startup_retry.rs
  • crates/mesh-llm-host-runtime/src/sdk.rs
  • crates/mesh-llm-types/src/mesh/mod.rs
  • crates/mesh-llm/src/commands/mod.rs
  • crates/mesh-llm/src/commands/models/mod.rs
  • crates/model-artifact/src/gguf.rs
  • crates/model-artifact/src/gguf/kv_cache.rs
  • crates/model-package/src/bin/queue-unsloth-layer-packages.rs
  • crates/model-package/src/jobs.rs
  • crates/model-package/src/prepare.rs
  • crates/model-package/src/script.rs
  • crates/model-package/src/scripts/split-model-job.sh
  • crates/skippy-coordinator/src/topology.rs
  • crates/skippy-correctness/src/cli.rs
  • crates/skippy-correctness/src/main.rs
  • crates/skippy-correctness/src/runner/mod.rs
  • crates/skippy-correctness/src/runner/prediction_return.rs
  • crates/skippy-correctness/src/runner/split_chain.rs
  • crates/skippy-correctness/src/runner/stage_fa_parity.rs
  • crates/skippy-ffi/src/lib.rs
  • crates/skippy-model-package/src/package.rs
  • crates/skippy-model-package/src/preflight.rs
  • crates/skippy-protocol/src/binary/activation.rs
  • crates/skippy-protocol/src/binary/mod.rs
  • crates/skippy-protocol/src/binary/types.rs
  • crates/skippy-protocol/src/lib.rs
  • crates/skippy-quantize/Cargo.toml
  • crates/skippy-quantize/src/backend.rs
  • crates/skippy-quantize/src/gguf_metadata.rs
  • crates/skippy-quantize/src/gguf_template.rs
  • crates/skippy-quantize/src/gguf_writer.rs
  • crates/skippy-quantize/src/gguf_writer/glm_dsa.rs
  • crates/skippy-quantize/src/gguf_writer_tests.rs
  • crates/skippy-quantize/src/hf_checkpoint.rs
  • crates/skippy-quantize/src/inkling_metadata.rs
  • crates/skippy-quantize/src/main.rs
  • crates/skippy-quantize/src/mtp_attach.rs
  • crates/skippy-quantize/src/projector_validate.rs
  • crates/skippy-quantize/src/tensor_map.rs
  • crates/skippy-quantize/src/tokenizer_metadata.rs
  • crates/skippy-quantize/src/types.rs
  • crates/skippy-runtime/src/activation.rs
  • crates/skippy-runtime/src/media.rs
  • crates/skippy-runtime/src/package.rs
  • crates/skippy-runtime/src/runtime_events.rs
  • crates/skippy-runtime/src/session.rs
  • crates/skippy-runtime/src/types.rs
  • crates/skippy-server/README.md
  • crates/skippy-server/src/binary_transport/binary_messaging.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/async_forwarder.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/connection.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/reply.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/session_tracker.rs
  • crates/skippy-server/src/binary_transport/options.rs
  • crates/skippy-server/src/binary_transport/preconnect.rs
  • crates/skippy-server/src/binary_transport/stage_execution.rs
  • crates/skippy-server/src/cli.rs
  • crates/skippy-server/src/frontend/decode_scheduler.rs
  • crates/skippy-server/src/frontend/embedded_execution.rs
  • crates/skippy-server/src/frontend/embedded_generation.rs
  • crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs
  • crates/skippy-server/src/frontend/generation.rs
  • crates/skippy-server/src/frontend/generation/persistent_lanes.rs
  • crates/skippy-server/src/frontend/generation/server.rs
  • crates/skippy-server/src/frontend/generation/timeouts.rs
  • crates/skippy-server/src/frontend/generation_flow.rs
  • crates/skippy-server/src/frontend/linear_proposal.rs
  • crates/skippy-server/src/frontend/native_mtp/verify_window.rs
  • crates/skippy-server/src/frontend/request.rs
  • crates/skippy-server/src/frontend/speculative.rs
  • crates/skippy-server/src/frontend/tests/prefill.rs
  • crates/skippy-server/src/frontend/tests/request.rs
  • crates/skippy-server/src/frontend/tests/wire_messages.rs
  • crates/skippy-server/src/frontend/wire_messages.rs
  • crates/skippy-server/src/runtime_state.rs
  • crates/skippy-topology/capabilities/reviewed-family-capabilities.json
  • crates/skippy-topology/src/family_capability.rs
  • crates/skippy-topology/src/lib.rs
  • crates/skippy-topology/src/tests.rs
  • docs/LAYER_PACKAGE_REPOS.md
  • docs/design/TESTING.md
  • docs/design/message_protocol.md
  • docs/skippy/DATA_FLOW.md
  • docs/skippy/FAMILY_CERTIFY.md
  • docs/skippy/FAMILY_STATUS.md
  • docs/skippy/LLAMA_PARITY.md
  • docs/skippy/NEW_MODEL_ONBOARDING.md
  • docs/skippy/PIPELINED_VERIFY_WINDOW.md
  • docs/skippy/SUFFIX_NGRAM_PROPOSER.md
  • docs/skippy/WAN_SPLIT_PERF.md
  • docs/skippy/llama-parity-candidates.json
  • docs/specs/layer-package-repos.md
  • scripts/hf-skippy-convert-job.py
  • scripts/hf-skippy-mtp-certify-job.py
  • scripts/tests/test_windows_native_runtime_deps.py
  • third_party/llama.cpp/patches/0048-Support-Laguna-staged-execution.patch
  • third_party/llama.cpp/patches/0049-Filter-staged-runtime-memory-to-layer-range.patch
  • third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch
  • third_party/llama.cpp/patches/0051-Add-staged-execution-support-for-Inkling.patch
  • third_party/llama.cpp/patches/0052-Advance-native-MTP-depth-per-draft-step.patch
  • third_party/llama.cpp/patches/0053-Replay-multi-depth-MTP-caches-correctly.patch
  • third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch
  • third_party/llama.cpp/patches/0055-Carry-multimodal-Inkling-embeddings-into-MTP.patch
  • third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch
  • third_party/llama.cpp/patches/0057-Complete-Inkling-and-GLM-metadata-integration.patch
  • third_party/llama.cpp/patches/0058-skippy-balance-filtered-stages-across-devices.patch
  • third_party/llama.cpp/patches/0059-Preserve-hybrid-verify-window-state-across-trim.patch
  • third_party/llama.cpp/patches/0060-skippy-retire-accepted-verify-checkpoints-exactly.patch
  • third_party/llama.cpp/patches/0061-Reject-trims-after-failed-verify-recovery.patch
  • tools/relay-fly-legacy/README.md
  • website/src/docs/pages/CLI.md

Comment thread crates/mesh-llm-host-runtime/src/runtime/local_split.rs
Comment thread crates/mesh-llm-host-runtime/src/runtime/local_split/loading.rs
Comment thread crates/skippy-model-package/src/preflight.rs Outdated
@michaelneale
michaelneale force-pushed the feat/skippy-laguna-inkling branch from 9722a91 to f4b1dd0 Compare July 30, 2026 14:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
crates/skippy-server/src/frontend/native_mtp/verify_window.rs (1)

184-229: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Retirement check uses commit_count instead of the actual committed_positions, risking premature checkpoint retirement.

verify_checkpoint_no_longer_needed's first parameter is committed_positions (positions actually committed), but the call here passes native_mtp_verify_decision.commit_count — the full intended commit length before the loop's early-stop/max_tokens truncation. The loop above already computes the correct committed_positions (used correctly in fully_accepted_window at Line 210), so when generation stops early (EOG or max_tokens) mid-window, commit_count >= consumed_positions can be true while the actual committed_positions < consumed_positions, causing retire_verify_window to fire and discard a recovery checkpoint that still covers unconsumed positions.

🐛 Proposed fix
         let checkpoint_no_longer_needed = verify_checkpoint_no_longer_needed(
-            native_mtp_verify_decision.commit_count,
+            committed_positions,
             consumed_positions,
         );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/frontend/native_mtp/verify_window.rs` around lines
184 - 229, Pass the loop’s actual committed_positions value to
verify_checkpoint_no_longer_needed instead of
native_mtp_verify_decision.commit_count. Keep the existing retirement flow
unchanged so checkpoints are retired only when all consumed positions were
actually committed, including early-stop and max_tokens truncation cases.
crates/skippy-server/src/runtime_state.rs (1)

887-902: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Same backward-restore bug left unfixed in the KV/full-state import paths.

This diff fixes import_recurrent_state_for_token_count because a prefix restore can move a lane's tracked position backwards, and retaining the previous high-water mark makes the next decode submit at the wrong position (per the new comment on record_restored_session_token_count). import_state_for_token_count and import_full_state_for_token_count are the same "restore session to an exact token_count" operation, but still use the old .and_modify(|current| *current = (*current).max(token_count)).or_insert(token_count) pattern here — so the identical bug (stale high-water mark → wrong decode position → llama_decode failure) can still reproduce through these two paths.

🐛 Proposed fix — reuse the new helper for both methods
     pub fn import_state_for_token_count(
         &mut self,
         session_id: &str,
         bytes: &[u8],
         token_count: u64,
     ) -> Result<()> {
         let layer_start = i32::try_from(self.model_layer_start())?;
         let layer_end = i32::try_from(self.model_layer_end())?;
         let session = self.session(session_id)?;
         session.import_state_for_token_count(layer_start, layer_end, bytes, token_count)?;
-        self.session_token_counts
-            .entry(session_id.to_string())
-            .and_modify(|current| *current = (*current).max(token_count))
-            .or_insert(token_count);
+        record_restored_session_token_count(&mut self.session_token_counts, session_id, token_count);
         Ok(())
     }
     pub fn import_full_state_for_token_count(
         &mut self,
         session_id: &str,
         bytes: &[u8],
         token_count: u64,
     ) -> Result<()> {
         let layer_start = i32::try_from(self.model_layer_start())?;
         let layer_end = i32::try_from(self.model_layer_end())?;
         let session = self.session(session_id)?;
         session.import_full_state_for_token_count(layer_start, layer_end, bytes, token_count)?;
-        self.session_token_counts
-            .entry(session_id.to_string())
-            .and_modify(|current| *current = (*current).max(token_count))
-            .or_insert(token_count);
+        record_restored_session_token_count(&mut self.session_token_counts, session_id, token_count);
         Ok(())
     }

Also applies to: 918-933

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/runtime_state.rs` around lines 887 - 902, Update
import_state_for_token_count and import_full_state_for_token_count to use the
new record_restored_session_token_count helper after restoring state, replacing
the max-based session_token_counts updates. Ensure exact token_count restores
can move the tracked position backward while preserving the existing import
behavior and error propagation.
crates/mesh-llm-host-runtime/src/mesh/node.rs (1)

132-165: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Split the touched oversized Rust modules before merge. All three files exceed the 1,000-line limit and contain separable responsibilities.

  • crates/mesh-llm-host-runtime/src/mesh/node.rs#L132-L165: move startup and hardware-snapshot construction into a semantically named mesh startup module.
  • crates/mesh-llm-host-runtime/src/mesh/peer_state.rs#L854-L862: move connection acquisition and subprotocol-stream access into a responsibility-specific mesh module.
  • crates/skippy-server/src/frontend/generation_flow.rs#L743-L743: extract split multimodal generation/forwarding into the existing frontend/generation/ module tree.

As per coding guidelines, “When modifying a Rust source file over 1,000 lines, extract any separable responsibility into a semantically named module.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/mesh/node.rs` around lines 132 - 165, Split
the oversized modules by extracting each separable responsibility: in
crates/mesh-llm-host-runtime/src/mesh/node.rs lines 132-165, move startup and
hardware-snapshot construction into a semantically named mesh startup module; in
crates/mesh-llm-host-runtime/src/mesh/peer_state.rs lines 854-862, move
connection acquisition and subprotocol-stream access into a
responsibility-specific mesh module; and in
crates/skippy-server/src/frontend/generation_flow.rs line 743, extract split
multimodal generation and forwarding into the existing frontend/generation/
module tree.

Source: Coding guidelines

crates/skippy-quantize/src/backend.rs (1)

172-174: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stale symbol name in error message.

The reason string still says "skippy_abi_features", but the probe now calls abi_features. This is confusing for anyone debugging via the reported reason.

📝 Proposed fix
     if feature_mask.is_none() {
-        return "loaded Skippy runtime does not expose skippy_abi_features".to_string();
+        return "loaded Skippy runtime does not expose abi_features".to_string();
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-quantize/src/backend.rs` around lines 172 - 174, Update the
error string in the feature-mask probe to reference the current abi_features
symbol instead of the stale skippy_abi_features name, while preserving the
existing return behavior.
.github/workflows/queue-unsloth-layer-packages.yml (1)

63-69: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on actions/checkout.

Static analysis flags this checkout step for persisting the git credential unnecessarily. This job never pushes/tags, so the credential isn't needed after checkout.

🔒 Proposed fix
       - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+        with:
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/queue-unsloth-layer-packages.yml around lines 63 - 69,
Update the actions/checkout step in the workflow to set persist-credentials to
false. Leave the existing checkout version and subsequent rust-toolchain step
unchanged.

Source: Linters/SAST tools

♻️ Duplicate comments (1)
third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch (1)

14-42: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Bump the staged-runtime ABI for the recurrent state layout change (duplicate of prior review).

state_write_data/state_read_data now key on hparams.n_layer_all instead of hparams.n_layer(), changing the per-layer record count for MTP-capable models. This diff is unchanged from the version flagged in a previous review round; without an ABI version bump, cross-node state produced by pre/post-patch builds can be silently corrupted or spuriously rejected.

As per coding guidelines: "When changing the staged-runtime ABI, bump the appropriate SKIPPY_ABI_VERSION_PATCH, MINOR, or MAJOR value in skippy/common.h and update the Rust mirror in crates/skippy-ffi/src/lib.rs in the same change."

#!/bin/bash
rg -n 'SKIPPY_ABI_VERSION_(MAJOR|MINOR|PATCH)' skippy/common.h crates/skippy-ffi/src/lib.rs 2>/dev/null
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch`
around lines 14 - 42, Bump the appropriate SKIPPY_ABI_VERSION_* value in
skippy/common.h for the recurrent state layout change introduced by
llama_memory_recurrent::state_write_data and state_read_data, then apply the
identical version update to the Rust mirror in crates/skippy-ffi/src/lib.rs.
Preserve all existing ABI components and change only the required version level.

Source: Coding guidelines

🧹 Nitpick comments (13)
tools/relay-fly-legacy/README.md (1)

8-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add explicit region mappings to the source of truth.

The documented relay URLs/IDs/trailing dots match effective_relay_urls, but connections.rs encodes them only as an ordered URL list, not as explicit USW1-2 => US West / APS1-1 => Asia-Pacific South, etc. Add structured relay metadata or comments alongside the defaults so future changes don’t drift or silently reorder regions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/relay-fly-legacy/README.md` around lines 8 - 16, Add explicit relay
ID-to-region mappings alongside the default relay definitions in
effective_relay_urls within connections.rs, preserving the existing URLs and
ordering while documenting USW1-2, APS1-1, EUC1-1, and USE1-1 with their
corresponding regions. Use structured metadata or clear adjacent comments as
appropriate to keep the source of truth aligned with the README.
crates/model-package/src/prepare.rs (1)

182-203: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting revision resolution into a helper.

The new commit-pinning logic (fetch info(), extract sha/pipeline_tag, then list_inventory at that revision) is a self-contained unit bolted into the already-large resolve function. Extracting it (e.g. resolve_source_revision(client, repo, requested_revision) -> Result<(String, String)>) would make this new behavior independently testable and keep resolve more readable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/model-package/src/prepare.rs` around lines 182 - 203, The
revision-resolution logic in resolve is too large and should be isolated.
Extract the requested-revision lookup, source SHA and pipeline-tag extraction,
and revision-pinned list_inventory call into a helper such as
resolve_source_revision, returning the resolved revision data needed by resolve;
then replace the inline block with that helper call while preserving existing
error contexts and defaults.
crates/mesh-llm-host-runtime/src/runtime/local_package.rs (1)

445-478: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider extracting the shared peer-exclusion loop.

Lines 456-472 are byte-identical to lines 502-518 in collect_split_participants; only the participant construction differs. A small helper returning Result<PeerInfo, SplitParticipantExclusionReason> (or an iterator of classified peers) would keep the two exclusion policies from drifting apart.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_package.rs` around lines 445 -
478, Extract the duplicated peer classification logic from
collect_split_participant_membership and collect_split_participants into a
shared helper that applies split_peer_preflight_exclusion_reason and
split_peer_stage_path_exclusion_reason, returning either peer information or its
exclusion reason. Update both callers to use this helper while preserving their
differing participant construction and existing exclusion collection behavior.
crates/skippy-correctness/src/runner/stage_fa_parity.rs (1)

91-100: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded Inkling model_id in a generic parity runner.

select_layer_package_parts receives a fixed "unsloth/inkling-GGUF:UD-Q2_K_XL" while the actual package comes from args.model, so running this against any other family silently mislabels the stage request. Plumb the model id through StageFaParityArgs (defaulting to the current value if convenient).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-correctness/src/runner/stage_fa_parity.rs` around lines 91 -
100, Plumb a configurable model ID through StageFaParityArgs and use it when
constructing the PackageStageRequest in the parity runner instead of the
hardcoded Inkling value. Preserve the current Inkling identifier as the default
if appropriate, while ensuring args.model remains the package reference.
crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs (2)

81-97: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Simplify: the package_planning_called flag is unreachable bookkeeping.

The Coordinator(_) arm only sets a bool that is asserted afterwards; panic!/unreachable! in that arm expresses the same intent more directly.

♻️ Suggested simplification
-    let mut package_planning_called = false;
-
     let gate = canonical_coordinator_gate(local.node_id, vec![local, coordinator])
         .expect("canonical coordinator gate");
     match gate {
         CanonicalCoordinatorGate::Standby {
             coordinator: selected,
         } => assert_eq!(selected, coordinator.node_id),
-        CanonicalCoordinatorGate::Coordinator(_) => package_planning_called = true,
+        CanonicalCoordinatorGate::Coordinator(_) => {
+            panic!("local node must not be elected coordinator")
+        }
     }
-
-    assert!(!package_planning_called);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs` around lines
81 - 97, In the test
noncanonical_gate_returns_standby_without_invoking_package_planning, remove the
package_planning_called flag and replace the
CanonicalCoordinatorGate::Coordinator(_) match arm with unreachable!() or an
equivalent panic. Keep the standby coordinator assertion unchanged.

1644-1670: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

This assertion couples the family default to the size tier.

assert_eq!(planned, size_tiered) passes only because the hardcoded 318 GiB source_model_bytes happens to land on a q4_0 tier; a future KvCachePolicy tier change would fail this test for reasons unrelated to family resolution. Asserting planned == GgufKvCacheQuant::from_llama_args("q4_0", "q4_0")… (as the hermetic test at line 1593 does) states the intent directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs` around lines
1644 - 1670, Replace the size-tier comparison in the test with a direct
assertion that the planned quantization matches the expected Q4_0 family result
produced by GgufKvCacheQuant::from_llama_args("q4_0", "q4_0"), as done by the
hermetic test. Keep the policy.default_kv_cache_type assertion and diagnostic
output, but remove the planned == size_tiered assertion so the test no longer
depends on the model-size tier.
crates/model-package/src/bin/queue-unsloth-layer-packages.rs (1)

792-799: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Two divergent overflow policies for the same total.

candidate_source_total_bytes saturates while job_spec_with_token recomputes the same sum with checked_add and errors. Planning (line 256) and the job env (line 1116) can therefore disagree on a pathological input. Reuse one helper and pick one policy.

♻️ Suggested consolidation
-    let projector_bytes = candidate
-        .projectors
-        .iter()
-        .try_fold(0u64, |total, projector| {
-            total.checked_add(projector.total_bytes)
-        })
-        .context("source GGUF and projector sizes overflowed u64")?;
-    let source_total_bytes = candidate
-        .quant
-        .total_bytes
-        .checked_add(projector_bytes)
-        .context("source GGUF and projector sizes overflowed u64")?;
+    let source_total_bytes = candidate_source_total_bytes(candidate);

Also applies to: 1100-1111

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/model-package/src/bin/queue-unsloth-layer-packages.rs` around lines
792 - 799, Unify total-byte calculation between candidate_source_total_bytes and
job_spec_with_token by reusing the same helper and overflow policy. Update the
job-spec construction path around job_spec_with_token to call
candidate_source_total_bytes (or the shared calculation helper) instead of
recomputing with checked_add, ensuring planning and job environment values
always agree.
crates/mesh-llm-host-runtime/src/runtime/local_split.rs (1)

195-216: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Second tracing::info! is redundant.

Lines 208-216 restate model_ref, topology_id, run_id, local_node, context_length, and parallel_lanes already emitted at lines 195-207, which also logs the elected coordinator. Dropping it (or reducing to debug!) keeps startup logs readable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split.rs` around lines 195 -
216, Remove the second redundant tracing::info! call in the split topology
planning flow, preserving the preceding log with the elected coordinator and
planning details. Do not alter the first log or surrounding topology behavior.
third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch (1)

472-492: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

output_norm now runs over every token instead of only the output rows.

Moving build_norm(..., output_norm, ...) above the inp_out_ids trim is required to derive h_nextn, but it also normalizes the full ubatch on every prefill even when embeddings_nextn is off. Consider keeping the trimmed path when !cparams.embeddings_nextn.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch`
around lines 472 - 492, Update llama_model_inkling::graph::graph so output_norm
is applied after inp_out_ids trimming when cparams.embeddings_nextn is disabled,
while retaining the full-sequence normalization needed to populate h_nextn when
it is enabled. Preserve the existing result_norm and result_norm_all callbacks
for their respective paths.
crates/skippy-quantize/src/gguf_writer.rs (1)

454-511: 🚀 Performance & Scalability | 🔵 Trivial | ⚖️ Poor tradeoff

Fused w13 is streamed twice (once per output tensor).

Both ffn_gate and ffn_up sources carry source_byte_len = tensor.byte_len() and the same source_name, so stream_tensor_data reads the entire fused tensor once per projection. That is correct but doubles source I/O for the largest MTP tensors. If conversion throughput matters here, consider a single pass writing both halves into their respective GGUF offsets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-quantize/src/gguf_writer.rs` around lines 454 - 511, The fused
w13 tensor is currently streamed twice because both sources in
inkling_w13_tensor_sources reference the full source tensor. Update the
conversion/streaming path to read each fused tensor once, split alternating rows
during that pass, and write the gate and up halves to their respective GGUF
offsets while preserving the existing names, shapes, dtypes, and parity mapping.
third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch (1)

4983-4985: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

TODO: Inkling is excluded from test-llama-archs fixtures.

Arch-specific hparams (d_rel, rel_extent, shortconv_kernel, logit_scale_denom) have no fixture, so the new architecture has no load-path coverage in that suite. Want me to open an issue to track adding the fixture params?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch` around
lines 4983 - 4985, Remove the unconditional LLM_ARCH_INKLING exclusion from the
test-llama-archs fixture-selection logic and add fixture values for its
architecture-specific hparams—d_rel, rel_extent, shortconv_kernel, and
logit_scale_denom—so Inkling is included in load-path coverage.
crates/skippy-server/src/binary_transport/binary_messaging/control_messages.rs (1)

33-54: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Five new #[allow(clippy::too_many_arguments)] handlers instead of a shared context struct.

The handlers all thread the same cluster of values (config, topology, runtime, kv, telemetry, upstream, downstream, wire_dtype, downstream_wire_condition, downstream_connect_timeout_secs, forwarder, prediction-return maps). Extracting a ControlMessageContext<'_> (borrowed collaborators) plus a small mutable-state struct would drop the lint suppressions and shrink the call sites in connection.rs.

As per coding guidelines, "Do not leave compiler or lint warnings in touched Rust code; fix warnings rather than using #[allow(...)] unless there is a clear reason and explicit developer approval."

Also applies to: 183-195, 233-250, 304-326

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@crates/skippy-server/src/binary_transport/binary_messaging/control_messages.rs`
around lines 33 - 54, Replace the #[allow(clippy::too_many_arguments)] handler
signatures, including handle_stop and the other three affected control-message
handlers, with a shared borrowed ControlMessageContext<'_> plus a small
mutable-state struct for per-request state. Move the common collaborators
(config, topology, runtime, kv, telemetry, streams, wire settings, timeout,
forwarder, and prediction-return resources) into the context, update handlers
and connection.rs call sites to use it, and remove the lint suppressions.

Source: Coding guidelines

crates/skippy-correctness/src/runner/split_chain.rs (1)

533-535: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reused startup_timeout_secs as the prediction-return wait budget.

prediction_return.receive(Duration::from_secs(args.startup_timeout_secs)) repurposes a server-startup readiness timeout as the bound for waiting on the actual decode/prediction round-trip. For large models this could time out prematurely (or be generously long) relative to what was tuned for process startup. Since recv_reply previously had no explicit timeout here, this is a net improvement (bounds an otherwise-unbounded wait), but a dedicated timeout knob would better reflect intent.

Also applies to: 556-558

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-correctness/src/runner/split_chain.rs` around lines 533 - 535,
Replace the use of args.startup_timeout_secs in the prediction_return.receive
calls within the split-chain prediction flow with a dedicated prediction/decode
round-trip timeout setting. Add or reuse the appropriate configuration knob for
this wait budget, and apply it consistently at both reported receive sites while
preserving the existing error context.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/mesh-llm-host-runtime/src/protocol/convert.rs`:
- Around line 17-21: Update skippy_stage_subprotocols() and
supports_skippy_stage_generation() in
crates/mesh-llm-host-runtime/src/protocol/convert.rs at lines 17-21 and 50-54 to
advertise and recognize both V3 and V4 generation features. Preserve
stage_protocol_generation_supported for either supported generation, and select
V3-compatible encoding when negotiating with a V3 peer while retaining V4
behavior for V4 peers.

In `@crates/mesh-llm-host-runtime/src/runtime/startup_retry.rs`:
- Around line 7-13: Update split_participants_are_still_converging to classify
canonical-coordinator stage-0 mismatch errors as converging, matching both
“split topology stage 0” messages that indicate a mismatch with the canonical
coordinator and “split topology lock stage 0” messages requiring the canonical
coordinator, while preserving the existing classifiers.

In `@crates/skippy-quantize/src/tensor_map.rs`:
- Around line 242-264: Update the tensor mapping around the “mlp.w13_dn.weight”
arm to handle trunk Inkling fused w13 tensors consistently with native
conversion: route them through the supported conversion path when
TensorSelection::ExcludeMtp or All can select them, otherwise explicitly gate
them out before HfLayerTensor::map reaches the existing bail. Preserve the
current behavior for unsupported fused tensors.

In `@crates/skippy-quantize/src/tokenizer_metadata.rs`:
- Line 11: Update the TOKEN_TYPE_UNUSED constant to 5 so padded [PAD{i}]
vocabulary entries are emitted with the GGUF reserved/unused tokenizer type
instead of UNKNOWN.

In
`@crates/skippy-server/src/binary_transport/binary_messaging/session_tracker.rs`:
- Around line 47-49: Update the runtime.lock() failure branch in the
orphan-session reclamation flow to log the poisoned-lock error with eprintln!
before returning, matching the existing per-session Err handling and preserving
the current early-return behavior.

In `@crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs`:
- Around line 123-125: The should_open_upstream_prediction_return function must
support standalone N-gram pipelined verify-window modes, not only native MTP, so
direct-return receivers are always opened before completion waits on them.
Update crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs lines
123-125 to gate setup on all applicable pipelined verify-window modes;
alternatively, update crates/skippy-server/src/frontend/embedded_generation.rs
lines 934-945 to disable standalone N-gram pipelining unless its direct-return
receiver and stream are configured.

In `@scripts/hf-skippy-convert-job.py`:
- Around line 131-135: Ensure artifact_dir is created before the manifest and
status copy operations in the conversion flow, using recursive directory
creation with existing directories allowed. Update the function containing
write_beta_card so shutil.copy2 always receives a valid destination directory.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch`:
- Around line 2932-2944: Update the padding condition in the fold_kq_b_into_mask
block to call ggml_pad only when kq_mask->ne[1] is greater than bias->ne[1],
preventing a negative padding extent; preserve the existing bias construction
and casting flow for equal or valid mask-larger dimensions.
- Around line 700-708: Update the RPC protocol definition alongside the
GGML_OP_COUNT assertion: increase RPC_PROTO_PATCH_VERSION from 4 to the next
version because the inserted GGML_OP_FLASH_ATTN_EXT_BANDED renumbers serialized
operations. Keep the GGML_OP_COUNT static_assert at 108.

In
`@third_party/llama.cpp/patches/0053-Replay-multi-depth-MTP-caches-correctly.patch`:
- Around line 117-159: Invalidate the MTP sidecar prefix whenever the depth loop
in skippy_mtp_sync_target_tokens performs seq_rm for chain_heads but exits with
rc != 0. Clear or mark false the session’s mtp_prefix_valid state before
returning the runtime error, while preserving the existing successful
synchronization behavior.

In
`@third_party/llama.cpp/patches/0055-Carry-multimodal-Inkling-embeddings-into-MTP.patch`:
- Around line 103-124: Update llm_graph_input_embd_h::set_input to handle
ubatches smaller than the full skippy_graph_get_mtp_embeddings() sidecar batch:
use the ubatch offset to select the corresponding slice of
mtp_embeddings.values, or validate that ubatch->n_tokens is no greater than
mtp_embeddings.token_count before copying. Remove the equality assertion while
preserving bounds validation and correct embedding alignment for split ubatches.
- Around line 534-564: Update the session destruction path to clear
g_skippy_external_decode_session when it points to the session being freed,
preventing external-decode observation from accessing a destroyed
skippy_session. Preserve the existing cleanup in
skippy_session_end_external_decode and only clear the thread-local for the
matching session.

In
`@third_party/llama.cpp/patches/0060-skippy-retire-accepted-verify-checkpoints-exactly.patch`:
- Around line 40-43: Update the Rust ABI mirror in crates/skippy-ffi/src/lib.rs
by changing ABI_VERSION_PATCH from 35 to 34, matching the
SKIPPY_ABI_VERSION_PATCH bump in the patch and preserving exact runtime ABI
consistency.

In
`@third_party/llama.cpp/patches/0062-Harden-Inkling-MTP-and-KV-contiguity-state.patch`:
- Around line 191-216: Update the caller of
skippy_verify_prefix_activation_payload() to distinguish an empty returned
vector as verification failure and propagate an error before assigning
input_desc.payload_bytes or calling skippy_decode_activation_frame. Preserve
valid non-empty prefix handling, and ensure oversized or otherwise corrupted
checkpoints cannot continue as zero-length prefixes.

---

Outside diff comments:
In @.github/workflows/queue-unsloth-layer-packages.yml:
- Around line 63-69: Update the actions/checkout step in the workflow to set
persist-credentials to false. Leave the existing checkout version and subsequent
rust-toolchain step unchanged.

In `@crates/mesh-llm-host-runtime/src/mesh/node.rs`:
- Around line 132-165: Split the oversized modules by extracting each separable
responsibility: in crates/mesh-llm-host-runtime/src/mesh/node.rs lines 132-165,
move startup and hardware-snapshot construction into a semantically named mesh
startup module; in crates/mesh-llm-host-runtime/src/mesh/peer_state.rs lines
854-862, move connection acquisition and subprotocol-stream access into a
responsibility-specific mesh module; and in
crates/skippy-server/src/frontend/generation_flow.rs line 743, extract split
multimodal generation and forwarding into the existing frontend/generation/
module tree.

In `@crates/skippy-quantize/src/backend.rs`:
- Around line 172-174: Update the error string in the feature-mask probe to
reference the current abi_features symbol instead of the stale
skippy_abi_features name, while preserving the existing return behavior.

In `@crates/skippy-server/src/frontend/native_mtp/verify_window.rs`:
- Around line 184-229: Pass the loop’s actual committed_positions value to
verify_checkpoint_no_longer_needed instead of
native_mtp_verify_decision.commit_count. Keep the existing retirement flow
unchanged so checkpoints are retired only when all consumed positions were
actually committed, including early-stop and max_tokens truncation cases.

In `@crates/skippy-server/src/runtime_state.rs`:
- Around line 887-902: Update import_state_for_token_count and
import_full_state_for_token_count to use the new
record_restored_session_token_count helper after restoring state, replacing the
max-based session_token_counts updates. Ensure exact token_count restores can
move the tracked position backward while preserving the existing import behavior
and error propagation.

---

Duplicate comments:
In
`@third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch`:
- Around line 14-42: Bump the appropriate SKIPPY_ABI_VERSION_* value in
skippy/common.h for the recurrent state layout change introduced by
llama_memory_recurrent::state_write_data and state_read_data, then apply the
identical version update to the Rust mirror in crates/skippy-ffi/src/lib.rs.
Preserve all existing ABI components and change only the required version level.

---

Nitpick comments:
In `@crates/mesh-llm-host-runtime/src/runtime/local_package.rs`:
- Around line 445-478: Extract the duplicated peer classification logic from
collect_split_participant_membership and collect_split_participants into a
shared helper that applies split_peer_preflight_exclusion_reason and
split_peer_stage_path_exclusion_reason, returning either peer information or its
exclusion reason. Update both callers to use this helper while preserving their
differing participant construction and existing exclusion collection behavior.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split.rs`:
- Around line 195-216: Remove the second redundant tracing::info! call in the
split topology planning flow, preserving the preceding log with the elected
coordinator and planning details. Do not alter the first log or surrounding
topology behavior.

In `@crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs`:
- Around line 81-97: In the test
noncanonical_gate_returns_standby_without_invoking_package_planning, remove the
package_planning_called flag and replace the
CanonicalCoordinatorGate::Coordinator(_) match arm with unreachable!() or an
equivalent panic. Keep the standby coordinator assertion unchanged.
- Around line 1644-1670: Replace the size-tier comparison in the test with a
direct assertion that the planned quantization matches the expected Q4_0 family
result produced by GgufKvCacheQuant::from_llama_args("q4_0", "q4_0"), as done by
the hermetic test. Keep the policy.default_kv_cache_type assertion and
diagnostic output, but remove the planned == size_tiered assertion so the test
no longer depends on the model-size tier.

In `@crates/model-package/src/bin/queue-unsloth-layer-packages.rs`:
- Around line 792-799: Unify total-byte calculation between
candidate_source_total_bytes and job_spec_with_token by reusing the same helper
and overflow policy. Update the job-spec construction path around
job_spec_with_token to call candidate_source_total_bytes (or the shared
calculation helper) instead of recomputing with checked_add, ensuring planning
and job environment values always agree.

In `@crates/model-package/src/prepare.rs`:
- Around line 182-203: The revision-resolution logic in resolve is too large and
should be isolated. Extract the requested-revision lookup, source SHA and
pipeline-tag extraction, and revision-pinned list_inventory call into a helper
such as resolve_source_revision, returning the resolved revision data needed by
resolve; then replace the inline block with that helper call while preserving
existing error contexts and defaults.

In `@crates/skippy-correctness/src/runner/split_chain.rs`:
- Around line 533-535: Replace the use of args.startup_timeout_secs in the
prediction_return.receive calls within the split-chain prediction flow with a
dedicated prediction/decode round-trip timeout setting. Add or reuse the
appropriate configuration knob for this wait budget, and apply it consistently
at both reported receive sites while preserving the existing error context.

In `@crates/skippy-correctness/src/runner/stage_fa_parity.rs`:
- Around line 91-100: Plumb a configurable model ID through StageFaParityArgs
and use it when constructing the PackageStageRequest in the parity runner
instead of the hardcoded Inkling value. Preserve the current Inkling identifier
as the default if appropriate, while ensuring args.model remains the package
reference.

In `@crates/skippy-quantize/src/gguf_writer.rs`:
- Around line 454-511: The fused w13 tensor is currently streamed twice because
both sources in inkling_w13_tensor_sources reference the full source tensor.
Update the conversion/streaming path to read each fused tensor once, split
alternating rows during that pass, and write the gate and up halves to their
respective GGUF offsets while preserving the existing names, shapes, dtypes, and
parity mapping.

In
`@crates/skippy-server/src/binary_transport/binary_messaging/control_messages.rs`:
- Around line 33-54: Replace the #[allow(clippy::too_many_arguments)] handler
signatures, including handle_stop and the other three affected control-message
handlers, with a shared borrowed ControlMessageContext<'_> plus a small
mutable-state struct for per-request state. Move the common collaborators
(config, topology, runtime, kv, telemetry, streams, wire settings, timeout,
forwarder, and prediction-return resources) into the context, update handlers
and connection.rs call sites to use it, and remove the lint suppressions.

In `@third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch`:
- Around line 4983-4985: Remove the unconditional LLM_ARCH_INKLING exclusion
from the test-llama-archs fixture-selection logic and add fixture values for its
architecture-specific hparams—d_rel, rel_extent, shortconv_kernel, and
logit_scale_denom—so Inkling is included in load-path coverage.

In
`@third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch`:
- Around line 472-492: Update llama_model_inkling::graph::graph so output_norm
is applied after inp_out_ids trimming when cparams.embeddings_nextn is disabled,
while retaining the full-sequence normalization needed to populate h_nextn when
it is enabled. Preserve the existing result_norm and result_norm_all callbacks
for their respective paths.

In `@tools/relay-fly-legacy/README.md`:
- Around line 8-16: Add explicit relay ID-to-region mappings alongside the
default relay definitions in effective_relay_urls within connections.rs,
preserving the existing URLs and ordering while documenting USW1-2, APS1-1,
EUC1-1, and USE1-1 with their corresponding regions. Use structured metadata or
clear adjacent comments as appropriate to keep the source of truth aligned with
the README.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bae7c41-82f0-4368-b273-6d7d313ef289

📥 Commits

Reviewing files that changed from the base of the PR and between 9722a91 and f4b1dd0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (158)
  • .github/workflows/queue-unsloth-layer-packages.yml
  • Justfile
  • crates/llama-quant-ffi/src/lib.rs
  • crates/mesh-llm-cli/src/models.rs
  • crates/mesh-llm-cli/src/parser.rs
  • crates/mesh-llm-commands/src/model_package.rs
  • crates/mesh-llm-config/src/model_validation.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/family_policy.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/mod.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/native_mtp_tests.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/resolution.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/mod.rs
  • crates/mesh-llm-host-runtime/src/mesh/capacity.rs
  • crates/mesh-llm-host-runtime/src/mesh/connections.rs
  • crates/mesh-llm-host-runtime/src/mesh/direct_path.rs
  • crates/mesh-llm-host-runtime/src/mesh/mod.rs
  • crates/mesh-llm-host-runtime/src/mesh/node.rs
  • crates/mesh-llm-host-runtime/src/mesh/peer_state.rs
  • crates/mesh-llm-host-runtime/src/mesh/stage_artifacts.rs
  • crates/mesh-llm-host-runtime/src/mesh/stage_transport.rs
  • crates/mesh-llm-host-runtime/src/mesh/tests/connections.rs
  • crates/mesh-llm-host-runtime/src/mesh/tests/direct_path.rs
  • crates/mesh-llm-host-runtime/src/models/capabilities.rs
  • crates/mesh-llm-host-runtime/src/models/mod.rs
  • crates/mesh-llm-host-runtime/src/protocol/convert.rs
  • crates/mesh-llm-host-runtime/src/protocol/tests/announcements.rs
  • crates/mesh-llm-host-runtime/src/runtime/local.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_package.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split/loading.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs
  • crates/mesh-llm-host-runtime/src/runtime/mod.rs
  • crates/mesh-llm-host-runtime/src/runtime/model_lifecycle/load.rs
  • crates/mesh-llm-host-runtime/src/runtime/model_lifecycle/reconciliation.rs
  • crates/mesh-llm-host-runtime/src/runtime/split_participant_settle.rs
  • crates/mesh-llm-host-runtime/src/runtime/split_planning.rs
  • crates/mesh-llm-host-runtime/src/runtime/startup_handles.rs
  • crates/mesh-llm-host-runtime/src/runtime/startup_retry.rs
  • crates/mesh-llm-host-runtime/src/sdk.rs
  • crates/mesh-llm-types/src/mesh/mod.rs
  • crates/mesh-llm/src/commands/mod.rs
  • crates/mesh-llm/src/commands/models/mod.rs
  • crates/model-artifact/src/gguf.rs
  • crates/model-artifact/src/gguf/kv_cache.rs
  • crates/model-package/src/bin/queue-unsloth-layer-packages.rs
  • crates/model-package/src/jobs.rs
  • crates/model-package/src/prepare.rs
  • crates/model-package/src/script.rs
  • crates/model-package/src/scripts/split-model-job.sh
  • crates/skippy-coordinator/src/topology.rs
  • crates/skippy-correctness/src/cli.rs
  • crates/skippy-correctness/src/main.rs
  • crates/skippy-correctness/src/runner/mod.rs
  • crates/skippy-correctness/src/runner/prediction_return.rs
  • crates/skippy-correctness/src/runner/split_chain.rs
  • crates/skippy-correctness/src/runner/stage_fa_parity.rs
  • crates/skippy-ffi/src/lib.rs
  • crates/skippy-model-package/Cargo.toml
  • crates/skippy-model-package/src/package.rs
  • crates/skippy-model-package/src/preflight.rs
  • crates/skippy-protocol/src/binary/activation.rs
  • crates/skippy-protocol/src/binary/mod.rs
  • crates/skippy-protocol/src/binary/types.rs
  • crates/skippy-protocol/src/lib.rs
  • crates/skippy-quantize/Cargo.toml
  • crates/skippy-quantize/src/backend.rs
  • crates/skippy-quantize/src/gguf_metadata.rs
  • crates/skippy-quantize/src/gguf_template.rs
  • crates/skippy-quantize/src/gguf_writer.rs
  • crates/skippy-quantize/src/gguf_writer/glm_dsa.rs
  • crates/skippy-quantize/src/gguf_writer_tests.rs
  • crates/skippy-quantize/src/hf_checkpoint.rs
  • crates/skippy-quantize/src/inkling_metadata.rs
  • crates/skippy-quantize/src/main.rs
  • crates/skippy-quantize/src/mtp_attach.rs
  • crates/skippy-quantize/src/projector_validate.rs
  • crates/skippy-quantize/src/tensor_map.rs
  • crates/skippy-quantize/src/tokenizer_metadata.rs
  • crates/skippy-quantize/src/types.rs
  • crates/skippy-runtime/src/activation.rs
  • crates/skippy-runtime/src/media.rs
  • crates/skippy-runtime/src/package.rs
  • crates/skippy-runtime/src/runtime_events.rs
  • crates/skippy-runtime/src/session.rs
  • crates/skippy-runtime/src/types.rs
  • crates/skippy-server/README.md
  • crates/skippy-server/src/binary_transport/binary_messaging.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/async_forwarder.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/connection.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/control_messages.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/message_receive.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/reply.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/session_lifecycle.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/session_tracker.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/telemetry.rs
  • crates/skippy-server/src/binary_transport/options.rs
  • crates/skippy-server/src/binary_transport/preconnect.rs
  • crates/skippy-server/src/binary_transport/stage_execution.rs
  • crates/skippy-server/src/cli.rs
  • crates/skippy-server/src/frontend/decode_scheduler.rs
  • crates/skippy-server/src/frontend/embedded_execution.rs
  • crates/skippy-server/src/frontend/embedded_generation.rs
  • crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs
  • crates/skippy-server/src/frontend/generation.rs
  • crates/skippy-server/src/frontend/generation/persistent_lanes.rs
  • crates/skippy-server/src/frontend/generation/server.rs
  • crates/skippy-server/src/frontend/generation/timeouts.rs
  • crates/skippy-server/src/frontend/generation_flow.rs
  • crates/skippy-server/src/frontend/linear_proposal.rs
  • crates/skippy-server/src/frontend/native_mtp/verify_window.rs
  • crates/skippy-server/src/frontend/request.rs
  • crates/skippy-server/src/frontend/speculative.rs
  • crates/skippy-server/src/frontend/tests/prefill.rs
  • crates/skippy-server/src/frontend/tests/request.rs
  • crates/skippy-server/src/frontend/tests/wire_messages.rs
  • crates/skippy-server/src/frontend/wire_messages.rs
  • crates/skippy-server/src/runtime_state.rs
  • crates/skippy-topology/capabilities/reviewed-family-capabilities.json
  • crates/skippy-topology/src/family_capability.rs
  • crates/skippy-topology/src/lib.rs
  • crates/skippy-topology/src/tests.rs
  • docs/LAYER_PACKAGE_REPOS.md
  • docs/design/TESTING.md
  • docs/design/message_protocol.md
  • docs/skippy/DATA_FLOW.md
  • docs/skippy/FAMILY_CERTIFY.md
  • docs/skippy/FAMILY_STATUS.md
  • docs/skippy/LLAMA_PARITY.md
  • docs/skippy/NEW_MODEL_ONBOARDING.md
  • docs/skippy/PIPELINED_VERIFY_WINDOW.md
  • docs/skippy/SUFFIX_NGRAM_PROPOSER.md
  • docs/skippy/WAN_SPLIT_PERF.md
  • docs/skippy/llama-parity-candidates.json
  • docs/specs/layer-package-repos.md
  • scripts/hf-skippy-convert-job.py
  • scripts/hf-skippy-mtp-certify-job.py
  • scripts/tests/test_hf_skippy_mtp_certify_job.py
  • scripts/tests/test_windows_native_runtime_deps.py
  • third_party/llama.cpp/patches/0048-Support-Laguna-staged-execution.patch
  • third_party/llama.cpp/patches/0049-Filter-staged-runtime-memory-to-layer-range.patch
  • third_party/llama.cpp/patches/0050-Add-TML-Inkling-architecture.patch
  • third_party/llama.cpp/patches/0051-Add-staged-execution-support-for-Inkling.patch
  • third_party/llama.cpp/patches/0052-Advance-native-MTP-depth-per-draft-step.patch
  • third_party/llama.cpp/patches/0053-Replay-multi-depth-MTP-caches-correctly.patch
  • third_party/llama.cpp/patches/0054-Add-Inkling-multi-depth-MTP-sidecars.patch
  • third_party/llama.cpp/patches/0055-Carry-multimodal-Inkling-embeddings-into-MTP.patch
  • third_party/llama.cpp/patches/0056-Size-recurrent-memory-for-appended-MTP-layers.patch
  • third_party/llama.cpp/patches/0057-Complete-Inkling-and-GLM-metadata-integration.patch
  • third_party/llama.cpp/patches/0058-skippy-balance-filtered-stages-across-devices.patch
  • third_party/llama.cpp/patches/0059-Preserve-hybrid-verify-window-state-across-trim.patch
  • third_party/llama.cpp/patches/0060-skippy-retire-accepted-verify-checkpoints-exactly.patch
  • third_party/llama.cpp/patches/0061-Reject-trims-after-failed-verify-recovery.patch
  • third_party/llama.cpp/patches/0062-Harden-Inkling-MTP-and-KV-contiguity-state.patch
  • tools/relay-fly-legacy/README.md
  • website/src/docs/pages/CLI.md
🚧 Files skipped from review as they are similar to previous changes (19)
  • docs/skippy/PIPELINED_VERIFY_WINDOW.md
  • docs/skippy/WAN_SPLIT_PERF.md
  • docs/design/TESTING.md
  • crates/skippy-runtime/src/activation.rs
  • crates/skippy-server/README.md
  • crates/mesh-llm-host-runtime/src/protocol/tests/announcements.rs
  • docs/skippy/FAMILY_STATUS.md
  • docs/skippy/DATA_FLOW.md
  • website/src/docs/pages/CLI.md
  • docs/skippy/SUFFIX_NGRAM_PROPOSER.md
  • docs/skippy/FAMILY_CERTIFY.md
  • crates/skippy-server/src/frontend/generation.rs
  • docs/skippy/LLAMA_PARITY.md
  • docs/design/message_protocol.md
  • crates/mesh-llm-host-runtime/src/mesh/tests/direct_path.rs
  • docs/specs/layer-package-repos.md
  • docs/LAYER_PACKAGE_REPOS.md
  • crates/skippy-server/src/binary_transport/preconnect.rs
  • crates/mesh-llm/src/commands/models/mod.rs

Comment thread crates/mesh-llm-host-runtime/src/protocol/convert.rs
Comment thread crates/mesh-llm-host-runtime/src/runtime/startup_retry.rs
Comment thread crates/skippy-quantize/src/tensor_map.rs
Comment thread crates/skippy-quantize/src/tokenizer_metadata.rs Outdated
Comment thread crates/skippy-server/src/binary_transport/binary_messaging/session_tracker.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/skippy-server/src/frontend/embedded_generation.rs (1)

1267-1270: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Retire pipelined checkpoints using the actual commit count.

This check runs before pipelined_target_commit_count(...) applies active-window/lookahead limits. A window can therefore be retired as fully consumed using native_mtp_verify_decision.commit_count even though the later pipeline logic commits fewer positions, allowing downstream state needed by an in-flight window to be discarded prematurely. Move this retirement check after the final commit_count calculation and use that value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/frontend/embedded_generation.rs` around lines 1267 -
1270, Move the verify_checkpoint_no_longer_needed call in the native MTP
pipeline flow until after pipelined_target_commit_count computes the final
commit_count, and pass that final value instead of
native_mtp_verify_decision.commit_count. Preserve the existing
window.input_tokens.len() argument and use the resulting check for checkpoint
retirement only after active-window/lookahead limits are applied.
🧹 Nitpick comments (2)
crates/skippy-server/src/runtime_state.rs (1)

1400-1405: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the public restore APIs in this regression test.

The test only calls record_restored_session_token_count directly, so it does not verify that import_state_for_token_count, import_full_state_for_token_count, and import_recurrent_state_for_token_count update the tracked position. Add coverage through those wrappers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/runtime_state.rs` around lines 1400 - 1405, Update
the regression test prefix_restore_moves_tracked_position_backwards to invoke
the public wrappers import_state_for_token_count,
import_full_state_for_token_count, and import_recurrent_state_for_token_count
instead of calling record_restored_session_token_count directly, while
preserving the tracked-position assertion and covering each wrapper’s
backwards-update behavior.
crates/skippy-quantize/src/gguf_writer_tests.rs (1)

374-377: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert transformed payloads, not only tensor shape.

This test can pass with incorrect W13 deinterleave or BF16 conversion because it checks only names and dimensions. Add byte-level assertions for both generated gate/up tensors, matching the neighboring MTP test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-quantize/src/gguf_writer_tests.rs` around lines 374 - 377,
Extend the test around parse_test_gguf to assert the byte-level payloads of both
blk.3.ffn_gate.weight and blk.3.ffn_up.weight, not just their dimensions. Match
the neighboring MTP test’s payload assertion approach and expected transformed
bytes so W13 deinterleaving and BF16 conversion are validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/skippy-server/src/frontend/embedded_generation.rs`:
- Around line 1267-1270: Move the verify_checkpoint_no_longer_needed call in the
native MTP pipeline flow until after pipelined_target_commit_count computes the
final commit_count, and pass that final value instead of
native_mtp_verify_decision.commit_count. Preserve the existing
window.input_tokens.len() argument and use the resulting check for checkpoint
retirement only after active-window/lookahead limits are applied.

---

Nitpick comments:
In `@crates/skippy-quantize/src/gguf_writer_tests.rs`:
- Around line 374-377: Extend the test around parse_test_gguf to assert the
byte-level payloads of both blk.3.ffn_gate.weight and blk.3.ffn_up.weight, not
just their dimensions. Match the neighboring MTP test’s payload assertion
approach and expected transformed bytes so W13 deinterleaving and BF16
conversion are validated.

In `@crates/skippy-server/src/runtime_state.rs`:
- Around line 1400-1405: Update the regression test
prefix_restore_moves_tracked_position_backwards to invoke the public wrappers
import_state_for_token_count, import_full_state_for_token_count, and
import_recurrent_state_for_token_count instead of calling
record_restored_session_token_count directly, while preserving the
tracked-position assertion and covering each wrapper’s backwards-update
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a7ad5de6-3b9b-44b7-981b-9bd9924e5caa

📥 Commits

Reviewing files that changed from the base of the PR and between f4b1dd0 and 113c35a.

📒 Files selected for processing (18)
  • .github/workflows/queue-unsloth-layer-packages.yml
  • crates/mesh-llm-host-runtime/src/runtime/local_split.rs
  • crates/mesh-llm-host-runtime/src/runtime/local_split/tests.rs
  • crates/mesh-llm-host-runtime/src/runtime/startup_retry.rs
  • crates/skippy-correctness/src/cli.rs
  • crates/skippy-correctness/src/runner/stage_fa_parity.rs
  • crates/skippy-quantize/src/backend.rs
  • crates/skippy-quantize/src/gguf_writer.rs
  • crates/skippy-quantize/src/gguf_writer_tests.rs
  • crates/skippy-quantize/src/tensor_map.rs
  • crates/skippy-quantize/src/tokenizer_metadata.rs
  • crates/skippy-server/src/binary_transport/binary_messaging/session_tracker.rs
  • crates/skippy-server/src/frontend/embedded_generation.rs
  • crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs
  • crates/skippy-server/src/frontend/native_mtp/verify_window.rs
  • crates/skippy-server/src/runtime_state.rs
  • scripts/hf-skippy-convert-job.py
  • third_party/llama.cpp/patches/0063-Harden-Inkling-MTP-sidecar-and-verify-cleanup.patch
💤 Files with no reviewable changes (1)
  • crates/mesh-llm-host-runtime/src/runtime/local_split.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/skippy-server/src/frontend/embedded_generation.rs`:
- Around line 1366-1382: Extract the separable pipelined and serial
verify-window handling from the oversized source into a responsibility-named
module such as verify_windows, including the related implementation and tests.
Update references and module wiring so behavior remains unchanged, keep the
extracted module under 1,000 lines, and reduce the original file below 1,000
lines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f7ae28fa-ef74-4642-8b89-13daefd10c95

📥 Commits

Reviewing files that changed from the base of the PR and between 113c35a and d09bb2b.

📒 Files selected for processing (2)
  • crates/skippy-quantize/src/gguf_writer_tests.rs
  • crates/skippy-server/src/frontend/embedded_generation.rs

Comment thread crates/skippy-server/src/frontend/embedded_generation.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs (1)

490-497: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the extension reset in the restore test.

The implementation clears both ngram and extension, but the test only asserts that ngram is cleared. Populate extension in the fixture and assert effective.extension.is_none() so this part of the contract is protected.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs` around
lines 490 - 497, Update restored_prefix_bypasses_history_ngram_for_that_request
to populate config.extension in the fixture, then assert
effective.extension.is_none() alongside the existing ngram assertion while
confirming the original config remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs`:
- Around line 490-497: Update
restored_prefix_bypasses_history_ngram_for_that_request to populate
config.extension in the fixture, then assert effective.extension.is_none()
alongside the existing ngram assertion while confirming the original config
remains unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e142f4bd-1f78-44ad-80c0-dcc57bb80613

📥 Commits

Reviewing files that changed from the base of the PR and between d09bb2b and 920ccd8.

📒 Files selected for processing (1)
  • crates/skippy-server/src/frontend/embedded_generation/lifecycle.rs

@michaelneale michaelneale changed the title skippy: combine Laguna and Inkling split serving skippy: land Laguna Q4 and experimental Inkling split serving Jul 30, 2026
@ndizazzo

ndizazzo commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai Can we close #1017 #1095 and #110 in favour of this single PR?

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Mesh-LLM/mesh-llm"

echo "== Repository permissions =="
gh api "repos/${repo}" --jq '{full_name, owner: .owner.login, permissions}'

echo
for number in 1017 1095 110; do
  echo "== Issue #${number} =="
  gh issue view "$number" --repo "$repo" --json number,title,state,author,body,url,labels,assignees
done

echo
echo "== Requester permission =="
gh api "repos/${repo}/collaborators/ndizazzo/permission" --jq '{user: "ndizazzo", permission}'

Length of output: 21074


@ndizazzo #1017 (Inkling) and #1095 (Laguna) are the two branches consolidated into #1118, so closing them as superseded is appropriate once #1118 is the retained integration PR.

#110 is already closed and concerns experimental Windows builds, which is unrelated to this consolidation—so it should remain closed as-is, not be marked superseded by #1118.

Please explicitly confirm that you want me to close #1017 and #1095 with a comment linking them to #1118.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Mesh-LLM/mesh-llm"

echo "=== Repository ==="
gh api "repos/${repo}" --jq '{owner: .owner.login, owner_type: .owner.type, default_branch: .default_branch, archived: .archived}'

for number in 1017 1095 110; do
  echo
  echo "=== Issue #${number} ==="
  gh issue view "$number" --repo "$repo" --json number,title,state,author,assignees,labels,body,url,comments \
    --jq '{number, title, state, author: .author.login, assignees: [.assignees[].login], labels: [.labels[].name], body, url, comments: [.comments[] | {author: .author.login, body: .body, createdAt: .createdAt}]}'
done

echo
echo "=== Pull request `#1118` metadata ==="
gh pr view 1118 --repo "$repo" --json number,title,state,author,body,url,closingIssuesReferences \
  --jq '{number, title, state, author: .author.login, url, closingIssuesReferences: [.closingIssuesReferences[] | {number, title, url}], body}'

Length of output: 106726


@ndizazzo Yes for #1017 and #1095: both PRs explicitly identify #1118 as their combined replacement and say they are open only for provenance pending a maintainer decision.

I would not change #110: it is already closed and is an unrelated Windows-build/split-serving issue. I suspect you may mean #1100, which #1118 explicitly lists as consolidated.

Because this is a multi-item closure, please have a repository maintainer explicitly confirm: “Close #1017 and #1095 as superseded by #1118—and clarify whether #1100 should also be closed.

You are interacting with an AI system.

@ndizazzo
ndizazzo force-pushed the feat/skippy-laguna-inkling branch from e871eeb to a3a60e2 Compare July 30, 2026 20:20

@ndizazzo ndizazzo 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.

Let's split mesh/node.rs and skippy-model-package/preflight.rs before merging...

They were already over the repo’s 2,000-line limit on the base branch, and this PR grows them even larger. This seems like a good point to extract the responsibilities into named modules and bring both files back under the limit.

Comment thread scripts/hf-skippy-convert-job.py
Comment thread scripts/hf-skippy-convert-job.py
Comment thread crates/mesh-llm-types/src/mesh/mod.rs
@michaelneale
michaelneale requested a review from ndizazzo July 30, 2026 23:24
@michaelneale

Copy link
Copy Markdown
Collaborator Author

Nick review follow-up is pushed in b2658577:

  • mesh/node.rs is now 1,840 lines after extracting endpoint/hardware/owner startup into mesh/node/startup.rs.
  • skippy-model-package/preflight.rs is now 1,892 lines after extracting artifact validation and stage reporting into preflight/artifacts.rs.
  • All three inline findings are fixed and answered in their threads.

Local validation: just build; 1,883 host-runtime tests; 158 skippy-quantize tests plus CLI tests; 52 skippy-model-package tests; 3 HF artifact-validation tests; warning-denying Clippy for mesh-llm, skippy-quantize, and skippy-model-package; formatting and diff checks.

@michaelneale

Copy link
Copy Markdown
Collaborator Author

@ndizazzo ready for another look

@michaelneale

Copy link
Copy Markdown
Collaborator Author

The remaining actionable Rust lifecycle concern carried from superseded #1100 is fixed in 64ab9f32: orphaned-session cleanup failures now reach the binary connection supervisor, and simultaneous connection/cleanup failures preserve both diagnostics. The cleanup still attempts every tracked session before returning failure.

Validation: 351 skippy-server tests, 45 skippy-protocol tests, 1,883 mesh-llm-host-runtime tests, cargo check -p mesh-llm, formatting, and warning-denying Clippy for skippy-server and mesh-llm.

@michaelneale

Copy link
Copy Markdown
Collaborator Author

@ndizazzo @i386 the review follow-up and fresh Inkling checkpoint are pushed at 6c54cd01; review is re-requested.

Nick's three requested changes are included: conversion split sizing, exact manifest-shard validation, and readiness diagnostics using the configured RTT threshold. The large-file extractions are also retained.

Fresh Inkling evidence is deliberately bounded: real all-CUDA split generation, recurrent depth-2 verification recovery, 2/2 sequential native tool loops, exact replay 3,531/3,531, and a clean native fatal-pattern scan. Both overlap phases still miss the formal bar, changed-tail prefix reuse is still zero, and the 480,000-character streaming probe ended without an SSE data event when both SSH-launched Mesh processes stopped together; it is not claimed as a long-context pass. The PR body and operator docs now say this explicitly.

Final local/cloud gates: clean 64-patch apply, 351/351 skippy-server library tests, cargo check -p mesh-llm, warning-denying Clippy for skippy-server and shipped mesh-llm, and formatting/whitespace checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants