From 1cc50f2e7301577872a0d40240a2536463192430 Mon Sep 17 00:00:00 2001 From: Arjun Sharma Date: Mon, 5 Oct 2026 22:56:24 +0000 Subject: [PATCH] task template: register the asv machine at trial start so asv run works without --machine asv run looks up the container hostname in ~/.asv-machine.json and stops when it is missing, which blocked the baseline step of the agent prompt. setup.sh saves an entry for the hostname whose results go to the dockertest folder, the name the verifier already uses. --- src/datasmith/harbor_adapter/template/tests/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/datasmith/harbor_adapter/template/tests/setup.sh b/src/datasmith/harbor_adapter/template/tests/setup.sh index 9c3eb2c4..4f1f81c5 100644 --- a/src/datasmith/harbor_adapter/template/tests/setup.sh +++ b/src/datasmith/harbor_adapter/template/tests/setup.sh @@ -83,6 +83,11 @@ command -v snapshot-tool >/dev/null 2>&1 \ || micromamba run -n "$ENV_NAME" bash -c 'command -v snapshot-tool >/dev/null 2>&1' \ || { echo "[$(ts)] [setup] FATAL: snapshot-tool missing in '$ENV_NAME' — the correctness gate would be inert; rebuild the task image." >&2; exit 1; } +SETUP_PHASE="asv_machine" +# `asv run` without --machine looks up the hostname in ~/.asv-machine.json and stops if it is missing; results go to dockertest. +python -c 'import socket; from asv.machine import Machine, MachineCollection; MachineCollection.save(socket.gethostname(), {**Machine.get_defaults(), "machine": "dockertest"})' \ + || echo "[$(ts)] [setup] WARN: asv machine registration failed; agents must pass --machine." >&2 + SETUP_PHASE="extra_setup_commands" {{ extra_setup_commands }}