Skip to content

chore(libs): pin merged hybrid cache engine main - #560

Merged
Gajesh2007 merged 1 commit into
masterfrom
chore/pin-mlx-main
Jul 20, 2026
Merged

Gajesh2007 merged 1 commit into
masterfrom
chore/pin-mlx-main

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

Summary

The two commits have identical tree a85ad851b78d5d749a042f197607ec2402ac55b9; this is provenance-only and does not change runtime behavior.

Before

flowchart LR
  subgraph Behavior[Behavior]
    A1[Provider build] --> B1[Exact hybrid SSD replay behavior]
  end
  subgraph Code[Code]
    C1[d-inference master] --> D1[Pre-merge engine commit 4ad6c1b]
    D1 --> E1[Tree not reachable from upstream main]
  end
Loading

After

flowchart LR
  subgraph Behavior[Behavior]
    A2[Provider build] --> B2[Identical hybrid SSD replay behavior]
  end
  subgraph Code[Code]
    C2[d-inference branch] --> D2[Merged engine main 3215cad]
    D2 --> E2[PR 78 plus PR 79 provenance]
  end
Loading

Verification

  • pinned commit exists on mlx-swift-lm/main
  • old and new commits have identical Git trees
  • parent diff changes only libs/mlx-swift-lm
  • pre-push hooks passed
  • worktree and nested checkout are clean

Made with Cursor


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Replace the pre-merge feature commit with the tree-identical upstream main commit after mlx-swift-lm PRs #78 and #79 merged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
d-inference Ready Ready Preview Jul 20, 2026 5:26pm
d-inference-console-ui-dev Ready Ready Preview Jul 20, 2026 5:26pm
d-inference-landing Ready Ready Preview Jul 20, 2026 5:26pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

No changed files match any affected_files pattern in the current threat model; the diff touches only libs/mlx-swift-lm, which is an untracked third-party/vendored library boundary.

Trust boundaries touched

None explicitly. However, libs/mlx-swift-lm sits directly inside TB-007 (Provider Inference Engine) — it is the MLX inference library wrapped by EngineV2Bridge / ContinuousBatchingV2 — so changes here are security-relevant even though the path is not listed in any affected_files set.

Threat model coverage gap

Threat Relevance
T-028 GPU-side buffer lifecycle (KV-cache, activations, logits) lives in this library. Changes to allocation, reuse, or teardown in mlx-swift-lm directly affect the "GPU buffers not zeroed between requests" open finding.
T-007 / T-027 Model weight loading and inference execution paths are in this library. Changes that alter how weight tensors are consumed or how outputs are assembled could affect the weight-substitution threat surface.
T-041 (SSD prefix cache) The ContinuousBatchingV2 KV-cache API surface described in T-041 is implemented here. Any change to SequenceKV, ContiguousKVBackend, or the CBv2 batch scheduler affects the on-disk and in-memory cache threat posture.

New attack surface not covered by existing threats

libs/mlx-swift-lm as a vendored or submodule path introduces a library integrity boundary that has no corresponding threat entry. Concretely:

  1. Unsigned / unpinned library updates. If libs/mlx-swift-lm is a Git submodule or copied source tree, a commit to it is not covered by the provider binary hash check (the binary hash covers the compiled darkbloom executable, not the source of a statically-linked library before compilation). A malicious or accidental change here would be compiled in silently. This is distinct from T-013 (which covers post-build binary tampering) — it's a pre-build library substitution vector.
  2. Metal shader / kernel code. MLX compiles Metal shaders at runtime from this library. Shader source is not covered by the SE-signed attestation blob or the coordinator's binary hash registry. A modified shader could exfiltrate data through a covert GPU channel or alter inference outputs without changing the host binary hash.

Recommendation

Add libs/mlx-swift-lm/** to the affected_files lists for T-007, T-027, T-028, and T-041, and consider adding a new threat entry covering library-level tampering (pre-build substitution of mlx-swift-lm source or Metal kernels) that sits between T-013 (binary tampering) and T-027 (weight substitution). At minimum, the threat model should note that the binary hash attested to the coordinator does not independently authenticate the Metal shader bytecode compiled from this library at runtime.


🔐 Threat model: docs/threat-model.yaml · Updates on each push to this PR

@ethenotethan ethenotethan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Code Review — Layr-Labs/d-inference#

Verdict: COMMENT

Security — ✅ No issues found

Performance — ✅ No issues found

Type_diligence — ✅ No issues found

Additive_complexity — ✅ No issues found

✅ All four passes clean. No issues found.

🤖 Automated review by Centaur · DAR-186

@Gajesh2007
Gajesh2007 merged commit 85681bb into master Jul 20, 2026
15 of 16 checks passed

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference — a5ed1e2e Deployed Jul 20, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — a5ed1e2e Deployed Jul 20, 2026 by vercel[bot]
benchmarks — a5ed1e2e Deployed Jul 20, 2026 by Gajesh2007 via E2E Benchmarks #1785
Preview – d-inference-landing — a5ed1e2e Deployed Jul 20, 2026 by vercel[bot]
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