Skip to content

AlloyTarget.runtimes: declare deployment runtimes; validate-runtime stage hard-fails on incompatibility #10

@joelteply

Description

@joelteply

Comes out of sentinel-ai Finding 6 (defrag produced a model that loads in transformers/vLLM but not llama.cpp because of an unstated `q_proj.shape == [hidden_size, hidden_size]` invariant in the GGUF loader).

Schema addition

```rust
pub struct AlloyTarget {
// ... existing fields
pub runtimes: Vec,
}

pub enum DeploymentRuntime {
Transformers,
VLLM,
LlamaCpp,
MLX,
TensorRTLLM,
CoreML,
Triton,
}
```

New stage type

```
validate-runtime
inputs: model artifact, runtime: DeploymentRuntime
action: load model in runtime, run a tiny smoke prompt, verify sane output
pass: emit alloy link with runtime + load-time + output-hash
fail: hard-fail the chain
```

A forge that declares `runtimes: [transformers, llama_cpp]` MUST pass validate-runtime against both before any final-stage link is signed.

Why this matters

Validation is a contract between producer and consumers. The current alloy spec only validates against the training framework. That's not validation in the sense the user cares about. This is the schema-level fix that makes Layer 7 of the sentinel-ai harness a first-class concept rather than a test convention.

Cross-reference: sentinel-ai Finding 6, VALIDATED-TENSOR-SURGERY §6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions