Make deterministic model stub runner portable

This commit is contained in:
2026-07-20 00:21:44 -07:00
parent 81c42c41b9
commit c2914af401
2 changed files with 7 additions and 2 deletions

View File

@@ -121,11 +121,14 @@ docker run --detach \
--name "$llm_container_name" \ --name "$llm_container_name" \
--network "$network_name" \ --network "$network_name" \
--network-alias compat-llm \ --network-alias compat-llm \
--volume "$repo_root/scripts:/compat:ro" \
"$python_image" \ "$python_image" \
python /compat/fake_llm.py --port 8080 --port-file /tmp/compat-port \ python -c 'import time; time.sleep(3600)' \
>/dev/null >/dev/null
llm_container_started=1 llm_container_started=1
docker cp "$repo_root/scripts/fake_llm.py" "$llm_container_name:/tmp/fake_llm.py"
docker exec --detach \
"$llm_container_name" \
python /tmp/fake_llm.py --port 8080 --port-file /tmp/compat-port
for _ in $(seq 1 100); do for _ in $(seq 1 100); do
if docker exec "$llm_container_name" wget -qO- http://127.0.0.1:8080/health >/dev/null 2>&1; then if docker exec "$llm_container_name" wget -qO- http://127.0.0.1:8080/health >/dev/null 2>&1; then

View File

@@ -325,6 +325,8 @@ class RepositoryTest < Minitest::Test
assert_includes probe, "ExactLiveContract.assert_authoritative_assistant_count!" assert_includes probe, "ExactLiveContract.assert_authoritative_assistant_count!"
refute_includes probe, "full_text.include?" refute_includes probe, "full_text.include?"
assert_includes runner, "exact_live_contract.rb" assert_includes runner, "exact_live_contract.rb"
assert_includes runner, 'docker cp "$repo_root/scripts/fake_llm.py"'
refute_includes runner, '--volume "$repo_root/scripts:/compat:ro"'
assert_includes runner, "OPENCODE_COMPAT_EVIDENCE_PATH" assert_includes runner, "OPENCODE_COMPAT_EVIDENCE_PATH"
assert_includes runner, "OPENCODE_EXPECTED_VERSION" assert_includes runner, "OPENCODE_EXPECTED_VERSION"
refute_match(/request_count.*-lt\s+1/, runner) refute_match(/request_count.*-lt\s+1/, runner)