Expand description
2026-09-26: The shared warm cargo target dir, a port of the harness’s
warm_cargo_cache.sh. With a cold dir every generated Axum project compiles
its whole dependency tree inside the scorer’s build timeout. This builds a
template project in the debug profile (for the agent’s own cargo test and
cargo run) and the release profile (for the scorer’s cargo build --release), and returns the dir that the agent shell and the scorer both
set as CARGO_TARGET_DIR.
Owner: bench, agentic.
Invariants: prepare returns the dir only after both profile builds
succeeded; any failure is an error, never a fall back to a cold dir.
Constants§
- TEMPLATE_
MAIN - 2026-09-26: The template’s
main.rs, a ping/pong server onMETRALE_HARNESS_PORT; the same text as themain.rsheredoc inwarm_cargo_cache.shafter its first comment line (asserted in the tests). - TEMPLATE_
MANIFEST - 2026-09-26: Parses to the same TOML as the
Cargo.tomlheredoc inwarm_cargo_cache.sh(asserted in the tests).
Functions§
- prepare
- 2026-09-26: Prepares the shared warm target dir and returns it. A failure is an error rather than a fall back to a cold dir, which would show only as slow or timed-out builds.
- template_
dir - 2026-09-26:
METRALE_WARM_TEMPLATE_DIR, else$HOME/.cargo/metrale-warm-template, as inwarm_cargo_cache.sh. - warm_
target_ dir - 2026-09-26:
METRALE_WARM_TARGET_DIR, else$HOME/.cargo/metrale-warm-target: the variable and default path ofwarm_cargo_cache.sh,run_tier.shandscore_run.py’s_warm_target_dir(asserted in the tests). - write_
template - 2026-09-26: Writes the template project. A file whose content already matches is left untouched.