From 79226386665f8fc9c00e9df12f249febcfe8fa16 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 04:02:38 -0500 Subject: [PATCH] ci(proxy-port guard): retire agy/ls rows, cover claude-code/route/antigravity-direct (#2961) The guard demanded the agyProxyPort and antigravityLsProxyPort lets that bce524fc removed when agy-proxy and antigravity-ls-proxy were retired, so it exited 1 on main. It also covered none of the three newest live proxies. - Drop the AGY_PROXY_PORT and ANTIGRAVITY_LS_PROXY_PORT rows; header comment points at the retirement note in home/common/default.nix. - Add claude-code-proxy (18749, jsonc checked), opencode-route-proxy (18750, script-only), antigravity-direct (18751, jsonc checked). - Accept two more fallback spellings the fleet actually uses: parseProxyPort with double quotes (opencode-route-proxy) and the unquoted Number(process.env. || ) form (antigravity-direct; its parsing hazards stay with #2823). - Extend the literal-port check in opencode.jsonc to 18750/18751. No port numbers change; no proxy behavior changes. Verified: guard exits 0 on the fixed tree (8 proxies); ablating the claude-code jsonc fallback, the antigravity-direct script fallback, and the route-proxy script fallback each make it exit 1 naming that proxy. --- .github/scripts/check-proxy-port-fallbacks.sh | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/scripts/check-proxy-port-fallbacks.sh b/.github/scripts/check-proxy-port-fallbacks.sh index bb162210ad..0d7b57fe76 100755 --- a/.github/scripts/check-proxy-port-fallbacks.sh +++ b/.github/scripts/check-proxy-port-fallbacks.sh @@ -8,7 +8,8 @@ # variables: # # - bin/-proxy.mjs: parseProxyPort('', ) (or the older -# process.env. || '' form) +# process.env. || '' form, or antigravity-direct's +# Number(process.env. || ) form) # - .opencode/opencode.jsonc: {env::-} in the provider # baseURL (opencode's {env:VAR} substitution has no fallback of its # own; the :- form is what keeps a non-shell launch — systemd @@ -18,7 +19,17 @@ # the let-block definition, when a baseURL loses its :- fallback, or # when a bare {env:} or a literal proxy port reappears in # opencode.jsonc. Clef has no opencode.jsonc consumer (its models ride -# the Cloudflare gateway), so only its script fallback is checked. +# the Cloudflare gateway), so only its script fallback is checked; the +# route proxy likewise has no baseURL in this repo. +# +# Retired 2026-10-30 (bce524fc): agy-proxy (:18743) and +# antigravity-ls-proxy (:18745) — their lets and units were removed and +# antigravity-direct (:18751, below) is the single Antigravity door. +# Their bin/ scripts remain in the repo as history, uninvoked, and +# their disabled opencode.jsonc providers keep the old fallbacks; see +# the retirement note in home/common/default.nix. They are deliberately +# NOT rows here — restoring one means restoring its let from git +# history and re-adding its row in the same change (#2961). set -euo pipefail repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" @@ -28,12 +39,13 @@ config_file="$repo_root/.opencode/opencode.jsonc" # var | let binding | proxy script | has an opencode.jsonc baseURL proxies=( "CLEF_PROXY_PORT|clefProxyPort|bin/clef-proxy.mjs|no" - "AGY_PROXY_PORT|agyProxyPort|bin/agy-proxy.mjs|yes" "CODEX_PROXY_PORT|codexProxyPort|bin/codex-proxy.mjs|yes" - "ANTIGRAVITY_LS_PROXY_PORT|antigravityLsProxyPort|bin/antigravity-ls-proxy.mjs|yes" "DESIGN_CODE_PROXY_PORT|designCodeProxyPort|bin/design-code-proxy.mjs|yes" "MUSE_PROXY_PORT|museProxyPort|bin/muse-proxy.mjs|yes" "COMMANDCODE_PROXY_PORT|commandcodeProxyPort|bin/commandcode-proxy.mjs|yes" + "CLAUDE_CODE_PROXY_PORT|claudeCodeProxyPort|bin/claude-code-proxy.mjs|yes" + "OPENCODE_ROUTE_PROXY_PORT|opencodeRouteProxyPort|bin/opencode-route-proxy.mjs|no" + "ANTIGRAVITY_DIRECT_PORT|antigravityDirectProxyPort|bin/antigravity-direct.mjs|yes" ) failed=0 @@ -48,7 +60,9 @@ for entry in "${proxies[@]}"; do fi if ! grep -qF "parseProxyPort('${var}', ${let_port})" "$repo_root/$script" && - ! grep -qF "process.env.${var} || '${let_port}'" "$repo_root/$script"; then + ! grep -qF "parseProxyPort(\"${var}\", ${let_port})" "$repo_root/$script" && + ! grep -qF "process.env.${var} || '${let_port}'" "$repo_root/$script" && + ! grep -qF "process.env.${var} || ${let_port}" "$repo_root/$script"; then echo "::error::$script fallback for ${var} does not match the ${let_name} definition (${let_port}) in home/common/default.nix." failed=1 fi @@ -63,7 +77,7 @@ for entry in "${proxies[@]}"; do fi done -if grep -qE '127\.0\.0\.1:1874[0-9]' "$config_file"; then +if grep -qE '127\.0\.0\.1:187(4[0-9]|5[01])' "$config_file"; then echo "::error::.opencode/opencode.jsonc hardcodes a literal proxy port — use {env::-} so the copies cannot drift (#435)." failed=1 fi