Skip to content

spark-runtime: port validation and runtime hardening - #450

Open
maplepaladin73 wants to merge 8 commits into
Atlas-Inf:mainfrom
maplepaladin73:devin/1796350000-runtime-hardening
Open

maplepaladin73 wants to merge 8 commits into
Atlas-Inf:mainfrom
maplepaladin73:devin/1796350000-runtime-hardening

Conversation

@maplepaladin73

Copy link
Copy Markdown
Contributor

Summary

Port validation and runtime hardening fixes upstream: stable sampling at tiny temperatures, errors for invalid model schedules/layer patterns, overflow-safe safetensors and GGUF directory handling, bounded GGUF metadata nesting, and bounded multimodal patch frame indices.

Closes #

Test plan

  • cargo fmt --all -- --check
  • ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --tests
  • bash scripts/check-license-headers.sh
  • Tested against a real model / hardware if the change affects runtime behaviour
  • Added or updated tests where applicable

Notes for reviewers

These changes favor fail-fast validation over silent overflow, unstable sampling, or out-of-bounds behavior. They are independent of the larger spark-server API correctness batch.

CLA

maplepaladin73 and others added 8 commits December 3, 2026 23:22
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* spark-runtime: reject overflowing safetensors header estimates

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* spark-runtime: address safetensors estimate review findings

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* spark-runtime: saturate OOM preflight reserve additions

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* spark-runtime: add GGUF overflow regression tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* spark-runtime: guard GGUF tensor directory arithmetic

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant