Expand description
2026-09-26: The Metrale Engine home (ArtifactStore): the per-plugin
artifact and per-benchmark run directories, plus write-if-changed assets and
provisioning stamps.
Layout this module creates under the root:
<root>/
artifacts/<plugin-id>/ provisioned material (venvs, datasets, scripts)
runs/<benchmark-id>/ run records (history.rs) and baselines (baseline.rs)Owner: bench (artifacts). Invariants:
write_asset_bytesnever rewrites a file whose bytes already match; an existing file it cannot read counts as different.
Structs§
- Artifact
Store - 2026-09-26: Handle to the artifact area: the resolved root directory.
- Metrale
Home - 2026-09-26: A resolved Metrale Engine home and its provenance.
- Stamp
- 2026-09-26: A provisioning stamp: a marker file whose contents identify the
inputs that produced an artifact.
is_currentis true only when the file’s trimmed contents equal the expected value, so changed inputs make it stale.
Enums§
- Home
Fault - 2026-09-26: Why a Metrale Engine home cannot be used.
- Home
Source - 2026-09-26: Where the Metrale Engine home came from. It matters because the
signing identity lives under the home (
<root>/identity/ed25519.pk8,gate::signing), so two homes sign as two signers.
Functions§
- write_
asset - 2026-09-26: Write a compiled-in asset into
dir, but only when the bytes differ, so a provisioned script always matches the binary that ships it and an unchanged file keeps its mtime. - write_
asset_ bytes - 2026-09-26:
write_assetfor assets that are not text: the same compare-then-write contract, over bytes. The comparison reads bytes becauseread_to_stringfails on non-UTF-8 files and would make every binary asset look changed.