open-standards/mesh/mesh-rs/Cargo.toml
Transaction Science 08b5db2c23
All checks were successful
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m58s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 19s
standards workspaces build + test / macOS energy backends (pull_request) Has been skipped
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 56s
standards workspaces build + test / joulehook-rs (joulehook/joulehook-rs, joulehook-rs, linux) (pull_request) Successful in 1m15s
mesh: the real engines address their weights, so a grant's ModelIn can admit them and a receipt binds what answered
The GGUF-crate engines (Gemma and Falcon-H1) reported no `weights_digest`
and no `precision`. A receipt from a real model therefore bound it by
recipe name alone, and #294's routing gave a grant's `ModelIn` caveat
nothing to match. A grant that named the model it permitted refused every
real backend. The engine itself recorded the intended fix: address the
weights once, at load, over every byte, and report nothing rather than a
partial digest.

- `mesh_engine::weights_digest(dir, files)` is the shared rule (SPEC §3.6).
  It is BLAKE3 over the canonical list of the files the forward pass reads.
  Each file is named by its path relative to the model directory and
  addressed by the streamed BLAKE3 of all its bytes, in path order. File
  names are part of the address, and listing order is not.
- `GgufEngine` addresses `config.json` plus `model.safetensors`, or the
  index plus every shard it names. A shard the index names but the
  directory lacks is an error. It reports `fp32`: the loader widens every
  tensor to f32.
- `FalconEngine` addresses `config.json` plus `model.safetensors`. The
  tokenizer is not addressed, because it maps text to the ids a caller
  sends and does not reach the forward pass. It reports `bf16`, the only
  dtype it binds.
- Both report the digest before serving (`ServingEngine::weights_digest`)
  and the same digest after, which is what mesh-core's model check
  requires.
- SPEC §3.6 states the rule.

Checked on the build host:
- mesh-rs: 79 tests pass. mesh-engine-gguf's synthetic-directory test
  runs under the gguf feature, as CI's mesh-rs leg builds it.
- On real weights, a sharded 12B Gemma directory (config, index and three
  shards) addresses exactly the files on disk. It took 8.5 minutes from
  the host's external disk; at load the loader has just read the same
  bytes, so they normally come from the page cache.
- Every Cargo.lock is current, including joulehook-rs, which locks
  mesh-engine. Clippy is clean.
- Mutations each fail tests: names left out of the manifest, hashing only
  a file's head, and skipping the index's shards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:11:12 -04:00

50 lines
1.7 KiB
TOML

[workspace]
resolver = "2"
members = [
"crates/mesh-schema",
"crates/mesh-meter",
"crates/mesh-receipt",
"crates/mesh-engine",
"crates/mesh-engine-gguf",
"crates/mesh-router",
"crates/mesh-core",
"crates/mesh-openai",
"crates/mesh-conformance",
]
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/transaction-science/open-standards"
rust-version = "1.97"
[workspace.dependencies]
# Mesh crates
mesh-schema = { path = "crates/mesh-schema" }
mesh-meter = { path = "crates/mesh-meter" }
mesh-receipt = { path = "crates/mesh-receipt" }
mesh-engine = { path = "crates/mesh-engine" }
mesh-router = { path = "crates/mesh-router" }
mesh-core = { path = "crates/mesh-core" }
# Family standards Mesh rides on (cross-workspace path deps).
jcp-schema = { path = "../../jcp/jcp-rs/crates/jcp-schema" }
jcp-grant = { path = "../../jcp/jcp-rs/crates/jcp-grant" }
jcp-runtime = { path = "../../jcp/jcp-rs/crates/jcp-runtime" }
# Optional: the family's honest energy meter (RAPL / NVML / Apple), behind `hw-meter`.
jouleclaw-energy = { path = "../../jouleclaw/jouleclaw-rs/crates/jouleclaw-energy" }
jouleclaw-backend-apple = { path = "../../jouleclaw/jouleclaw-rs/crates/jouleclaw-backend-apple" }
# Optional: the family's pure-Rust GGUF/Metal inference substrate, behind `gguf`.
jouleclaw-loader-gguf = { path = "../../jouleclaw/jouleclaw-rs/crates/jouleclaw-loader-gguf" }
# Shared third-party pins (match the family).
ed25519-dalek = { version = "2", features = ["rand_core"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
blake3 = "1"
hex = "0.4"
[workspace.lints.clippy]
all = "warn"