fix(runtime): restore Binky OpenBao discovery

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a06bfe-2a55-7ed3-bacd-879977b099bf
This commit is contained in:
tegwick 2026-09-04 17:46:10 +02:00
parent 236845512a
commit aedfadda0b
5 changed files with 105 additions and 2 deletions

View file

@ -88,6 +88,22 @@ def _resolve_env(env: dict[str, str]) -> dict[str, str]:
return env
def _apply_runtime_defaults(env: dict[str, str], home: Path) -> dict[str, str]:
"""Provide the non-secret host wiring required by legacy mail intake."""
env.setdefault("BAO_ADDR", "https://bao.coulomb.social")
env.setdefault("VAULT_ADDR", env["BAO_ADDR"])
env.setdefault(
"EXECUTOR_APPROLE_DIR",
str(home / ".local/rein-aharness/approle-binky-mail"),
)
local_bin = str(home / ".local/bin")
path_parts = [part for part in env.get("PATH", "").split(os.pathsep) if part]
if local_bin not in path_parts:
env["PATH"] = os.pathsep.join([local_bin, *path_parts])
return env
def main() -> None:
home = Path.home()
env = os.environ.copy()
@ -95,6 +111,7 @@ def main() -> None:
env.setdefault("KUBECONFIG", "/etc/rancher/k3s/k3s.yaml")
file_env = _load_env_file(home / ".config/rein-aharness/claim-loop.env")
env.update(file_env)
env = _apply_runtime_defaults(env, home)
env = _resolve_env(env)
rein = home / "rein-aharness" / ".venv" / "bin" / "rein-aharness"

View file

@ -15,3 +15,6 @@ AGENT_HARNESS_REPO_ROOTS=/home/tegwick:/home/tegwick/work
LLM_CONNECT_URL=k8s://activity-core/llm-connect:8080
STATE_HUB_URL=k8s://activity-core/actcore-statehub-edge-relay:8000
KUBECONFIG=/etc/rancher/k3s/k3s.yaml
BAO_ADDR=https://bao.coulomb.social
VAULT_ADDR=https://bao.coulomb.social
EXECUTOR_APPROLE_DIR=/home/tegwick/.local/rein-aharness/approle-binky-mail

View file

@ -11,8 +11,8 @@ Environment=PYTHONUNBUFFERED=1
Environment=KUBECONFIG=/etc/rancher/k3s/k3s.yaml
# Temporary profile-absent compatibility; remove after the four tenant migrations.
Environment=AGENT_HARNESS_LEGACY_APPROACHES_UNTIL=2026-12-31
# Ensure kubectl is available for k8s:// URL resolution in rein-aharness-claim
Environment=PATH=/usr/local/bin:/usr/bin:/bin:%h/bin
# Ensure kubectl and the host-installed OpenBao client are available.
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin:%h/bin
# Wrapper loads claim-loop.env (JSON-safe) and resolves k8s:// ClusterIPs
# Do not use EnvironmentFile= for claim-loop.env — REPO_MAP JSON breaks systemd parser
ExecStart=%h/bin/rein-aharness-claim claim-loop