fix(pods): never downgrade AGENTBBS_POD_IMAGE on a transient build failure

The deploy's rootless-podman context intermittently fails (pre-pull/build/even
image-exists), which made setup.sh upsert AGENTBBS_POD_IMAGE back to the base
ubuntu and silently strip Claude Code/Codex from pods. Only upsert when we
actually have localhost/agentbbs-pod:latest; otherwise leave the configured
value untouched (the agentbbs daemon uses the local image from its own session).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-23 09:23:48 +00:00
parent f5d3740a4c
commit 6fc964b8d5

View file

@ -451,8 +451,13 @@ upsert_env() { # KEY VALUE — skips when VALUE is empty
}
# CoinPay: API key (read by the coinpay CLI) + merchant/business id.
# Point existing installs at the freshly built member pod image (fresh installs
# get it from the env-file template below).
upsert_env AGENTBBS_POD_IMAGE "$POD_IMAGE"
# get it from the env-file template below). Only when we actually have the custom
# image — a transient podman failure in the deploy's rootless context must never
# downgrade a working install back to the base ubuntu (the daemon builds/uses the
# image from its own session regardless).
if [ "$POD_IMAGE" = "localhost/agentbbs-pod:latest" ]; then
upsert_env AGENTBBS_POD_IMAGE "$POD_IMAGE"
fi
upsert_env COINPAY_API_KEY "${COINPAY_API_KEY:-}"
upsert_env AGENTBBS_COINPAY_MERCHANT_ID "${COINPAY_MERCHANT_ID:-${AGENTBBS_COINPAY_MERCHANT_ID:-}}"
upsert_env COINPAY_BUSINESS_ID "${COINPAY_MERCHANT_ID:-${AGENTBBS_COINPAY_MERCHANT_ID:-}}"