diff --git a/install-image.sh b/install-image.sh index 49086297..01738fd0 100755 --- a/install-image.sh +++ b/install-image.sh @@ -241,11 +241,11 @@ install_service(){ # A serving image lane restarts to run them (Hasan, 2026-10-30, v1.40.6): about 70 s, and an image being made # then is lost. Its own sockets' filter came in with a unit, which a lane that kept serving never read. The # video lane, 12 to 15 min to boot, keeps its NOTE. - if [ "$SMOKE" -eq 0 ] && [ -n "${QWEN38_KEEPS_SERVING:-}" ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then - echo "NOTE: the image lane, started by hand, goes on serving with the files it started with: its next start takes the new ones" - elif [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then - echo "the image lane serves older files than the ones installed now (its unit, its runtime or its start scripts): restarting it (about 70 s)" - sudo systemctl restart "$UNIT" \ + if [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then + # not under a run of install.sh that starts and stops no lane (QWEN38_KEEPS_SERVING) + [ -z "${QWEN38_KEEPS_SERVING:-}" ] || echo "NOTE: the image lane, started by hand, goes on serving with the files it started with: its next start takes the new ones" + [ -n "${QWEN38_KEEPS_SERVING:-}" ] || echo "the image lane serves older files than the ones installed now (its unit, its runtime or its start scripts): restarting it (about 70 s)" + [ -n "${QWEN38_KEEPS_SERVING:-}" ] || sudo systemctl restart "$UNIT" \ || echo "NOTE: the image lane did not restart; it runs the older files until: sudo systemctl restart $UNIT" fi # Installed, not switched to: the lane this box serves stays the lane it serves. The image diff --git a/tests/test_install_robust.py b/tests/test_install_robust.py index e38a3485..18eb02fc 100644 --- a/tests/test_install_robust.py +++ b/tests/test_install_robust.py @@ -307,7 +307,7 @@ class SudosTimestampLastsAsLongAsTheRun(Tmp): class AnInstallBesideALaneStartedByHand(Tmp): """The image lane is restarted to run new files (v1.40.6), but not under a run that says it starts and stops none.""" TEXT = (REPO / "install-image.sh").read_text() - BLOCK = TEXT[TEXT.index(' if [ "$SMOKE" -eq 0 ] && [ -n "${QWEN38_KEEPS_SERVING:-}" ]'):] + BLOCK = TEXT[TEXT.index(' if [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then'):] BLOCK = BLOCK[:BLOCK.index("\n fi\n") + 6] def run_block(self, **env): diff --git a/tests/test_oc_jsonc_wins.py b/tests/test_oc_jsonc_wins.py index 86a29528..ad04986a 100644 --- a/tests/test_oc_jsonc_wins.py +++ b/tests/test_oc_jsonc_wins.py @@ -98,7 +98,7 @@ class TheFileThatWinsIsEditedToo(unittest.TestCase): def test_the_fit_reads_it_as_a_file_of_its_own(self): text = (REPO / "oc-fit-limits.py").read_text() - self.assertIn('("user", Path.home() / ".config/opencode/opencode.jsonc")', text) + self.assertIn('*(("user", p) for p in shadow_config())', text) self.assertIn('"OC_ONE_FILE": "1"', text) h = Home(block(1, 1), block(2, 2)) self.assertEqual(h.run("oc-merge-limits.py", h.json, "qwen38", "qwen3.8-27b", 548000, 32000, OC_ONE_FILE="1").returncode, 0) diff --git a/tests/test_one_fetch.py b/tests/test_one_fetch.py index 05a6f1ad..9959186e 100644 --- a/tests/test_one_fetch.py +++ b/tests/test_one_fetch.py @@ -36,7 +36,7 @@ CALLS = { ("install-image.sh", '"$VENV/bin/python" "$HERE/ckpt-fetch.py" "$MODEL" "$MODEL_REV" --refs-main pin'), "switch-model.sh, the image lane": ("switch-model.sh", '"$IMG_PY" "$REPO_DIR/ckpt-fetch.py" "$IMG_MODEL" "$IMG_REV" --offline-first \\\n' - ' --need-gb 34 --free-gb "$(dl_free_gb "${IMG_HF:-$HF_CACHE}")" --refs-main pin'), + ' --need-gb 34 --free-gb "$(dl_free_gb "${IMG_HF:-$HF_CACHE}")" --refs-main "$IMG_REFS"'), "install-video.sh": ("install-video.sh", '"$VENV/bin/python" "$HERE/ckpt-fetch.py" "$MODEL" "$MODEL_REV" --allow "$ALLOW" --refs-main pin'), "switch-model.sh, the video lane":