mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
The lane ran litellm but never republished its port, so a host-side probe hit the compose proxy on the same number and read 502. The lane could therefore never report ready, and the oracle suite skipped itself to a green exit instead of asking a judge. A handler reads the port from the role the way translate.py already does, the runner forwards it, and TOOLS_LANE_KEYS takes it up: compose_file_args layers the override in without checking its variables, so an .env written before the key existed would abort every compose command rather than merely drop the lane. The gateway's master key is pinned in the lane inventory for the reason the System One key already is: the provisioner would otherwise generate it into a vault the checks cannot read back, and the oracle judge is not a deployed consumer with a virtual key of its own. serving() stops treating reachability as readiness. A lane brought up before AI_LOCAL_MODELS named a different model keeps serving the old one, and a gateway holding a key these checks cannot use looks healthy from outside while refusing every call they make. It now asks /models with the bearer token and requires the configured alias, and requires the gateway to offer every language the catalogs name, because that advertisement is what the translation run waits on. Without this the lane waved itself through and no change to its roles ever shipped. Two lane-scoped overrides come with it. The ollama role caps itself at four CPUs, which left the host at 361 percent while twenty cores idled, so the lane gives it the host count the way the engine entry above it already does. And the lane pins the router to its declared order: the decider may send a pair the engine serves to the chat model, which a batch over 183 catalogs cannot pay for. Deployments keep the decider. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
67 lines
2.3 KiB
Python
67 lines
2.3 KiB
Python
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
from utils.distros import distro_names
|
|
|
|
VALID_DISTROS: tuple[str, ...] = distro_names()
|
|
|
|
TOOLS_LANE_KEYS: tuple[str, ...] = (
|
|
"INFINITO_TOOLS_LIBRETRANSLATE_PORT",
|
|
"INFINITO_TOOLS_LITELLM_PORT",
|
|
"INFINITO_TOOLS_MODELS_HOST_PATH",
|
|
"INFINITO_TOOLS_S1_PORT",
|
|
"INFINITO_TOOLS_TRANSLATE_PORT",
|
|
)
|
|
|
|
|
|
def compose_file_args() -> list[str]:
|
|
"""Compose `-f` flags shared by up and down flows.
|
|
|
|
Each override is gated on the resource it needs being present, not on the
|
|
instance slot: an override whose `:?` guard is unsatisfied would abort the
|
|
stack outright, so a checkout that was never handed a shared git dir or
|
|
cache network simply does not layer that file in.
|
|
"""
|
|
from .profile import Profile
|
|
|
|
profile = Profile()
|
|
out = ["-f", "compose.yml"]
|
|
if profile.shared_git_dir():
|
|
out += ["-f", "compose/worktree.override.yml"]
|
|
if profile.cache_stack_enabled():
|
|
out += ["-f", "compose/cache.override.yml"]
|
|
if profile.shared_cache_network():
|
|
out += ["-f", "compose/cache.shared.override.yml"]
|
|
if profile.gpu_reservable():
|
|
out += ["-f", "compose/gpu.override.yml"]
|
|
if (os.environ.get("INFINITO_PUBLISH_PORTS") or "").strip().lower() == "false":
|
|
out += ["-f", "compose/noports.override.yml"]
|
|
if all((os.environ.get(key) or "").strip() for key in TOOLS_LANE_KEYS):
|
|
out += ["-f", "compose/tools.override.yml"]
|
|
|
|
if profile.image_mirror_enabled():
|
|
from utils.cache.files import PROJECT_ROOT
|
|
|
|
from .runner_mirror import write_override
|
|
|
|
out += ["-f", write_override(PROJECT_ROOT, out[1::2])]
|
|
return out
|
|
|
|
|
|
def resolve_distro() -> str:
|
|
"""Return INFINITO_DISTRO; raise SystemExit if missing or invalid."""
|
|
distro = os.environ["INFINITO_DISTRO"].strip()
|
|
if not distro:
|
|
raise SystemExit(
|
|
"INFINITO_DISTRO is not set. Run 'make dotenv' (or source scripts/meta/env/load.sh) "
|
|
f"or export INFINITO_DISTRO=<{'|'.join(VALID_DISTROS)}> "
|
|
"before invoking cli.administration.deploy.development."
|
|
)
|
|
if distro not in VALID_DISTROS:
|
|
raise SystemExit(
|
|
f"INFINITO_DISTRO={distro!r} is not a valid distro. "
|
|
f"Valid: {', '.join(VALID_DISTROS)}."
|
|
)
|
|
return distro
|