Skip to content

Add native MTP generation metadata to layer packages - #888

Merged
i386 merged 6 commits into
mainfrom
jd/jianyang-model-package-mtp
Jun 22, 2026
Merged

Add native MTP generation metadata to layer packages#888
i386 merged 6 commits into
mainfrom
jd/jianyang-model-package-mtp

Conversation

@i386

@i386 i386 commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add optional generation.speculative_decoding metadata to layer package manifests
  • emit and preflight-validate a native-mtp-n1 strategy when GGUF tensors include native MTP/NextN blocks
  • expose generation metadata through package inspection/runtime package info
  • add operator config control for native MTP strategy selection
  • address review feedback for preflight window-policy reporting, native-MTP flag propagation, restore-prefill-decode gating, and package-driven auto strategy resolution

Config behavior

Layer packages can now advertise a default speculative decoding strategy, and operators can override it in config.toml with speculative.strategy at the defaults or per-model scope.

[defaults.speculative]
strategy = "auto"

Supported values:

  • auto: enable native MTP only when the layer package metadata advertises a default native-mtp strategy with prediction_depth = 1; direct GGUF/no-metadata loads do not enable native MTP automatically
  • native-mtp-n1: explicitly select native one-token MTP; package-backed loads must advertise matching native-mtp-n1 generation metadata
  • disabled: disable package/default native MTP for that model load

The resolved flag is carried through Skippy model load options, stage load protobuf/config, embedded OpenAI execution, and binary transport. Direct skippy-server usage still keeps the existing SKIPPY_NATIVE_MTP_ENABLED environment fallback.

Updated MTP layer packages

Updated the published layer package manifests with native MTP strategy metadata:

GLM 4.7 Flash:

GLM 5.2 Q2_K MTP Q8:

Review fixes

  • preflight reports now include validated window_policy details for speculative strategies
  • deployment builders propagate native_mtp_enabled from deployment context instead of hard-coding true
  • restore-prefill-decode uses the same effective native-MTP gate as the main binary stage path
  • resolver auto strategy now reads package generation.speculative_decoding metadata instead of hard-coding native MTP on
  • resolver tests now assert propagation through to_model_load_options() as well as stage/OpenAI args
  • defaults UI schema snapshot includes defaults.speculative.strategy

Validation

  • cargo test -p mesh-llm-config --lib
  • cargo test -p mesh-llm-host-runtime --lib
  • cargo test -p skippy-server --lib
  • cargo test -p skippy-model-package --bin skippy-model-package
  • cargo test -p skippy-runtime --lib
  • cargo check -p skippy-prompt
  • cargo clippy -p mesh-llm-config --all-targets -- -D warnings
  • cargo clippy -p skippy-server --all-targets -- -D warnings
  • cargo clippy -p mesh-llm-host-runtime --all-targets -- -D warnings
  • cargo clippy -p skippy-prompt --all-targets -- -D warnings
  • cargo clippy -p skippy-protocol --all-targets -- -D warnings
  • cargo clippy -p skippy-model-package --all-targets -- -D warnings
  • cargo clippy -p skippy-runtime --all-targets -- -D warnings
  • cargo fmt --all --check

Latest review-fix validation after rebasing on origin/jd/jianyang-model-package-mtp:

  • cargo test -p mesh-llm-host-runtime --lib speculative_strategy
  • cargo test -p mesh-llm-host-runtime --lib split_generation_load_settings_consumes_resolved_skippy_config
  • cargo test -p skippy-runtime --lib package
  • cargo clippy -p mesh-llm-host-runtime --all-targets -- -D warnings
  • cargo clippy -p skippy-runtime --all-targets -- -D warnings
  • cargo fmt --all --check

HF manifest validation:

  • force-downloaded meshllm/GLM-5.2-Q2_K-MTP-Q8-layers/model-package.json after upload and verified generation.speculative_decoding.default = "native-mtp-n1" with the same strategy block as GLM 4.7 Flash

Summary by CodeRabbit

Release Notes

  • New Features

    • Added an optional generation block to layer-package manifests to declare speculative-decoding defaults, including native-MTP settings, and expose them during package preflight.
    • Introduced native_mtp_enabled as a propagated execution flag across stage loading and embedded execution.
  • Validation & Configuration

    • Added speculative.strategy (auto, disabled, native-mtp-n1) with validation.
    • Strengthened native-MTP generation validation (e.g., layer index and window-policy constraints).
  • Documentation

    • Updated manifest spec and usage/config docs for the new generation defaults and speculative.strategy.

@github-actions
github-actions Bot requested a review from ndizazzo June 21, 2026 06:55
@coderabbitai

coderabbitai Bot commented Jun 21, 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

Adds an optional generation section to the model package manifest schema across three crates, enabling declaration of package-owned native speculative decoding configuration. The package builder detects .nextn. native MTP tensors and writes speculative decoding defaults; the preflight crate parses, validates, and reports the configuration; the runtime crate exposes it through the public LayerPackageInfo API. Configuration schema is updated to accept and validate a strategy enum field (auto, disabled, native-mtp-n1). The strategy resolution layer computes a corresponding native_mtp_enabled boolean that is propagated through stage loading, protocol serialization, and into binary stage execution where it controls selection between native-MTP and sampled decode/verify paths. Also refactors model package prepare logic to centralize model ID resolution with explicit validation.

Changes

Native MTP Speculative Decoding Generation Configuration and Execution

Layer / File(s) Summary
Manifest schema types and generation detection
crates/skippy-model-package/src/main.rs, crates/skippy-runtime/src/package.rs, docs/specs/layer-package-repos.md
Defines PackageGeneration, PackageSpeculativeDecoding, PackageSpeculativeStrategy (with type renamed to strategy_type), and PackageWindowPolicy manifest structs in both crates. Adds optional generation field to PackageManifest. Implements package_generation(tensors) to detect .nextn. tensors, compute layer indices, and build speculative decoding config with native-mtp-n1 default strategy and all-ones window policy. Unit tests cover absent and present native MTP tensor cases. Specification adds example manifest block and "Generation Defaults" section describing constraints.
Preflight validation and reporting
crates/skippy-model-package/src/preflight.rs
Adds PreflightGeneration, PreflightSpeculativeDecoding, PreflightSpeculativeStrategy report types with strategy_type field emission. preflight_package maps manifest.generation to report.generation and calls validate_generation, which verifies default strategy existence, non-empty names/types, native-mtp constraints (prediction_depth == 1, in-range layer_indices), and window_policy bounds/ordering. Tests inject valid/invalid generation blocks and assert expected report fields or validation errors.
Configuration schema and validation
crates/mesh-llm-config/src/model.rs, src/model/built_in_schema.rs, src/validate.rs, docs/USAGE.md, docs/skippy/CONFIGURATION.md, crates/mesh-llm-host-runtime/tests/fixtures/config_schema_defaults_ui_reference.json
SpeculativeConfig gains optional strategy field. Built-in schema adds {prefix}.strategy string setting. validate_speculative validates strategy against enum (auto, disabled, native-mtp-n1); new test asserts unknown values produce validation error. Config schema defaults fixture updated. Usage and configuration documentation extended with strategy setting examples and options table.
Speculative strategy resolution
crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.rs, resolver/types.rs, resolver/resolution.rs
resolve_speculative_config derives strategy (defaulting to "auto") from config, validates against allowed values, and computes native_mtp_enabled boolean by checking package generation metadata for native-mtp support. ResolvedSpeculativeConfig and ResolvedEmbeddedOpenAiArgs include the flag. Early errors raised when explicit "native-mtp-n1" requested but generation metadata lacks support. Helper functions detect default and explicit native-mtp support.
Host runtime propagation through stage loading
crates/mesh-llm-host-runtime/src/inference/skippy/mod.rs, resolver/translation.rs, inference/skippy/stage/types.rs, inference/skippy/stage/mod.rs, inference/skippy/deployment.rs, inference/skippy/package.rs, inference/skippy/topology.rs, crates/mesh-llm-host-runtime/src/runtime/local.rs, runtime/split_planning.rs
SkippyModelLoadOptions gains native_mtp_enabled field (defaulting to true). Resolver translation copies speculative.native_mtp_enabled into load options and stage config; embedded OpenAI defaults hardcode native_mtp_enabled: true. Deployment context passes the flag through to load request/config. Package identity carries generation info from inspected layer packages. Topology and materialization flow generation metadata through package structures. Runtime-local request creation forwards the flag.
Stage load protocol and protobuf serialization
crates/skippy-protocol/proto/stage.proto, crates/skippy-protocol/src/lib.rs, crates/mesh-llm-host-runtime/src/mesh/mod.rs, crates/mesh-llm-host-runtime/src/mesh/tests.rs
Protobuf LoadStage message adds optional native_mtp_enabled field (tag 33). StageConfig gains native_mtp_enabled: bool with serde default provider (default_native_mtp_enabled returning true). Stage load request includes the field. Proto serialization/deserialization wires the field with true default when absent.
Binary transport execution refactoring
crates/skippy-server/src/binary_transport.rs, binary_transport/options.rs
BinaryStageOptions gains native_mtp_enabled field derived from SKIPPY_NATIVE_MTP_ENABLED env var (explicit "false-like" strings → false, otherwise → true). BinaryStageExecutionOptions redefined to include native_mtp_enabled alongside sample_final_prefill and output_capacity as a struct. run_binary_stage computes effective flag by AND-ing options with config. Decode/verify paths branch on options.native_mtp_enabled to select native-MTP vs sampled behavior. Removed environment-based helper function.
Frontend OpenAI embedded generation
crates/skippy-server/src/frontend.rs, frontend/embedded_execution.rs, frontend/embedded_generation.rs, frontend/generation_flow.rs, frontend/prefix_cache.rs
EmbeddedOpenAiArgs gains native_mtp_enabled field. OpenAiBackendMode::EmbeddedStageZero variant and EmbeddedStageZeroGeneration struct gain native_mtp_enabled field. Stage-0 generation paths construct BinaryStageExecutionOptions with request.native_mtp_enabled. Prefix cache and embedded execution paths use structured options.
Resolver strategy tests and local runtime integration
crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs, crates/mesh-llm-host-runtime/src/runtime/local.rs, runtime/split_planning.rs
New native_mtp_generation() helper builds PackageGenerationInfo with "native-mtp-n1" strategy. Four new end-to-end tests verify "auto" with/without package generation, "native-mtp-n1" requirement checking, and "disabled" propagation. Local runtime resolution includes package_generation field in resolve request. Existing test setup updated to explicitly set package_generation: None. One integration test updated to verify strategy = "disabled" propagates native_mtp_enabled: false.
Test fixture updates across modules
crates/skippy-server/src/binary_transport/*, frontend/*, kv_integration/*, runtime_state.rs, crates/skippy-prompt/src/prompt_cli/stage_config.rs, crates/mesh-llm-host-runtime/src/inference/skippy/family_policy.rs, inference/skippy/materialization.rs, stage/tests.rs, certification.rs
Test helpers and configurations updated to initialize native_mtp_enabled: true on StageConfig, StageLoadRequest, and related structures across multiple test modules.

Model Package Prepare Model ID Resolution

Layer / File(s) Summary
Model ID resolution and validation
crates/model-package/src/prepare.rs
Introduces resolve_model_id helper function that centralizes model ID handling: parses and validates explicitly provided --model-id by calling ModelRef::parse and returns contextual errors on failure, or derives model ID from selected repo/file and quant name when none is provided. Refactors resolve to call the new helper. Adds unit tests verifying acceptance of fully-qualified explicit model IDs, rejection of IDs missing repo coordinate, and correct derivation when model_id is absent.

Sequence Diagram(s)

sequenceDiagram
  participant ConfigResolver
  participant SpeculativeResolver
  participant StageLoader
  participant BinaryTransport
  participant StageRuntime
  ConfigResolver->>SpeculativeResolver: strategy from config/defaults
  SpeculativeResolver->>SpeculativeResolver: validate(strategy)
  SpeculativeResolver->>SpeculativeResolver: compute native_mtp_enabled from package generation
  SpeculativeResolver->>StageLoader: ResolvedSpeculativeConfig{strategy, native_mtp_enabled}
  StageLoader->>StageLoader: populate StageLoadRequest/StageConfig
  StageLoader->>BinaryTransport: StageLoadRequest{native_mtp_enabled}
  BinaryTransport->>BinaryTransport: deserialize proto LoadStage
  BinaryTransport->>BinaryTransport: compute effective native_mtp_enabled
  BinaryTransport->>BinaryTransport: create BinaryStageExecutionOptions
  alt native_mtp_enabled == true
    BinaryTransport->>StageRuntime: decode_frame_sampled_mtp_n1(capacity)
  else
    BinaryTransport->>StageRuntime: decode_frame_sampled(capacity)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Suggested reviewers

  • michaelneale
  • ndizazzo
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.94% 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
Title check ✅ Passed The title 'Add native MTP generation metadata to layer packages' is clear, concise, and directly describes the main change: introducing generation metadata support for native MTP in layer packages.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jd/jianyang-model-package-mtp

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

@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-model-package/src/preflight.rs`:
- Around line 91-100: The PreflightSpeculativeStrategy struct is missing the
window_policy field that is validated by validate_window_policy, preventing the
validated policy details from being included in the serialized output. Add a
window_policy field to the PreflightSpeculativeStrategy struct with appropriate
serde attributes to ensure it is properly serialized when present, similar to
how other optional fields like prediction_depth are handled. Also apply the same
change to any other related struct mentioned in the comment that handles
preflight strategy output.
🪄 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: fc489ff7-20df-4267-bff2-435e40041caf

📥 Commits

Reviewing files that changed from the base of the PR and between e655866 and 82284ad.

📒 Files selected for processing (4)
  • crates/skippy-model-package/src/main.rs
  • crates/skippy-model-package/src/preflight.rs
  • crates/skippy-runtime/src/package.rs
  • docs/specs/layer-package-repos.md

Comment thread crates/skippy-model-package/src/preflight.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: 2

🧹 Nitpick comments (1)
crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs (1)

778-836: ⚡ Quick win

Add one assertion path for to_model_load_options() propagation.

Current tests validate to_stage_config(...) and to_embedded_openai_args(...), but not the direct model-load options path. A small regression test there would close the remaining propagation gap.

🤖 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/inference/skippy/resolver/tests.rs` around
lines 778 - 836, The test functions
speculative_strategy_defaults_to_native_mtp_enabled and
speculative_strategy_disabled_reaches_stage_and_openai_args validate that
native_mtp_enabled propagates through to_stage_config and
to_embedded_openai_args, but they do not test the to_model_load_options method.
Add assertions in both test functions to call to_model_load_options on the
resolved object and verify that the native_mtp_enabled property is correctly
propagated (should be true in the first test and false in the second test),
matching the existing assertion patterns.
🤖 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/deployment.rs`:
- Line 60: The hard-coded `native_mtp_enabled: true` at line 60 and line 109 in
the stage deployment builders overrides the resolved deployment strategy.
Instead of hard-coding this value, retrieve the `native_mtp_enabled` setting
from the deployment input state and propagate it through to the deployment
builder configuration. This ensures the actual strategy semantics are preserved
rather than being overwritten by the hard-coded value.

In `@crates/skippy-server/src/binary_transport.rs`:
- Around line 2442-2450: The BinaryStageExecutionOptions::new call in the
restore-prefill-decode path at line 2449 uses config.native_mtp_enabled
directly, but it should use the same effective native MTP gate as the main path
at line 204, which combines both options.native_mtp_enabled (runtime override)
and config.native_mtp_enabled (configuration). Replace the direct
config.native_mtp_enabled argument with the combined condition
options.native_mtp_enabled && config.native_mtp_enabled to ensure the
restore-prefill-decode path respects the same runtime/environment overrides as
the normal decode path.

---

Nitpick comments:
In `@crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs`:
- Around line 778-836: The test functions
speculative_strategy_defaults_to_native_mtp_enabled and
speculative_strategy_disabled_reaches_stage_and_openai_args validate that
native_mtp_enabled propagates through to_stage_config and
to_embedded_openai_args, but they do not test the to_model_load_options method.
Add assertions in both test functions to call to_model_load_options on the
resolved object and verify that the native_mtp_enabled property is correctly
propagated (should be true in the first test and false in the second test),
matching the existing assertion patterns.
🪄 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: 70c443ed-8028-42f0-a571-e5833288e617

📥 Commits

Reviewing files that changed from the base of the PR and between 82284ad and ddb1f9f.

📒 Files selected for processing (37)
  • crates/mesh-llm-config/src/model.rs
  • crates/mesh-llm-config/src/model/built_in_schema.rs
  • crates/mesh-llm-config/src/validate.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/materialization.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/mod.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/resolver/translation.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/types.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/mod.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/tests.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/types.rs
  • crates/mesh-llm-host-runtime/src/mesh/mod.rs
  • crates/mesh-llm-host-runtime/src/mesh/tests.rs
  • crates/mesh-llm-host-runtime/src/runtime/local.rs
  • crates/skippy-prompt/src/prompt_cli/stage_config.rs
  • crates/skippy-protocol/proto/stage.proto
  • crates/skippy-protocol/src/lib.rs
  • crates/skippy-server/src/binary_transport.rs
  • crates/skippy-server/src/binary_transport/forwarding.rs
  • crates/skippy-server/src/binary_transport/options.rs
  • crates/skippy-server/src/binary_transport/tests.rs
  • crates/skippy-server/src/frontend.rs
  • crates/skippy-server/src/frontend/embedded_execution.rs
  • crates/skippy-server/src/frontend/embedded_generation.rs
  • crates/skippy-server/src/frontend/generation_flow.rs
  • crates/skippy-server/src/frontend/prefix_cache.rs
  • crates/skippy-server/src/frontend/tests.rs
  • crates/skippy-server/src/kv_integration/activation.rs
  • crates/skippy-server/src/kv_integration/config.rs
  • crates/skippy-server/src/kv_integration/identity.rs
  • crates/skippy-server/src/runtime_state.rs
  • docs/USAGE.md
  • docs/skippy/CONFIGURATION.md
  • docs/specs/layer-package-repos.md
✅ Files skipped from review due to trivial changes (8)
  • crates/mesh-llm-host-runtime/src/inference/skippy/stage/tests.rs
  • crates/skippy-server/src/kv_integration/config.rs
  • crates/skippy-prompt/src/prompt_cli/stage_config.rs
  • docs/skippy/CONFIGURATION.md
  • crates/mesh-llm-host-runtime/src/inference/skippy/family_policy.rs
  • docs/USAGE.md
  • docs/specs/layer-package-repos.md
  • crates/skippy-server/src/runtime_state.rs

Comment thread crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs Outdated
Comment thread crates/skippy-server/src/binary_transport.rs
Comment thread crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.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/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs (1)

824-952: 🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Split the new speculative-strategy test block into a dedicated module.

This file is already over 1k LoC, and this change adds a separable responsibility (native-MTP strategy resolution/propagation tests). Please extract this block (and helper(s) it owns) into a semantically named submodule to keep the oversized file from growing.

As per coding guidelines, "Apply the 1k LoC refactoring rule: when touching a source file that is already over 1,000 lines, ... split that responsibility into a semantically named module as part of the change."

🤖 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/inference/skippy/resolver/tests.rs` around
lines 824 - 952, The file is already over 1,000 lines of code and the new test
block adds multiple related tests for speculative strategy and native-MTP
resolution. Extract the four test functions
speculative_strategy_auto_without_package_generation_disables_native_mtp,
speculative_strategy_auto_uses_package_native_mtp_default,
speculative_strategy_native_mtp_rejects_package_without_native_mtp_metadata, and
speculative_strategy_disabled_reaches_stage_and_openai_args, along with any
helper functions they depend on, into a new semantically named submodule that
reflects the responsibility of testing native-MTP strategy resolution and
propagation.

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.

Outside diff comments:
In `@crates/mesh-llm-host-runtime/src/inference/skippy/resolver/tests.rs`:
- Around line 824-952: The file is already over 1,000 lines of code and the new
test block adds multiple related tests for speculative strategy and native-MTP
resolution. Extract the four test functions
speculative_strategy_auto_without_package_generation_disables_native_mtp,
speculative_strategy_auto_uses_package_native_mtp_default,
speculative_strategy_native_mtp_rejects_package_without_native_mtp_metadata, and
speculative_strategy_disabled_reaches_stage_and_openai_args, along with any
helper functions they depend on, into a new semantically named submodule that
reflects the responsibility of testing native-MTP strategy resolution and
propagation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8dbcf018-28d6-4d7b-9c9c-34ee41e6acca

📥 Commits

Reviewing files that changed from the base of the PR and between 554ede6 and e8b6175.

📒 Files selected for processing (13)
  • crates/mesh-llm-host-runtime/src/inference/skippy/certification.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/materialization.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/mod.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/package.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/resolver/types.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/topology.rs
  • crates/mesh-llm-host-runtime/src/runtime/local.rs
  • crates/mesh-llm-host-runtime/src/runtime/split_planning.rs
  • crates/skippy-runtime/src/package.rs
✅ Files skipped from review due to trivial changes (1)
  • crates/mesh-llm-host-runtime/src/runtime/split_planning.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs
  • crates/mesh-llm-host-runtime/src/inference/skippy/mod.rs
  • crates/skippy-runtime/src/package.rs

@ndizazzo
ndizazzo self-requested a review June 21, 2026 23:06
@i386
i386 merged commit 2b8c41f into main Jun 22, 2026
25 checks passed
@i386
i386 deleted the jd/jianyang-model-package-mtp branch June 22, 2026 00:38
michaelneale added a commit that referenced this pull request Jun 23, 2026
* origin/main:
  update guides for dev loop (#895)
  Add native MTP generation metadata to layer packages (#888)
  upgrade iroh to 1.0 (#894)
  fix(runtime): support relocating shared libs
  Improve LAN direct-path discovery and connection reliability (#853)
  Add GLM chat template fallback in llama (#890)

# Conflicts:
#	crates/mesh-llm-config/src/model/built_in_schema.rs
#	crates/mesh-llm-config/src/validate.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/deployment.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/materialization.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/resolver/speculative.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/resolver/translation.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/stage/mod.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/stage/tests.rs
#	crates/mesh-llm-host-runtime/src/inference/skippy/stage/types.rs
#	crates/mesh-llm-host-runtime/src/mesh/mod.rs
#	crates/mesh-llm-host-runtime/src/mesh/tests.rs
#	crates/mesh-llm-host-runtime/src/runtime/local.rs
#	crates/skippy-protocol/proto/stage.proto
#	crates/skippy-server/src/binary_transport.rs
#	crates/skippy-server/src/frontend.rs
#	crates/skippy-server/src/frontend/embedded_execution.rs
#	crates/skippy-server/src/frontend/embedded_generation.rs
#	crates/skippy-server/src/frontend/generation_flow.rs
#	crates/skippy-server/src/frontend/prefix_cache.rs
#	docs/skippy/CONFIGURATION.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants