diff --git a/packages/extension/opencode.lock.json b/packages/extension/opencode.lock.json index 578cc969..4b3ffaf2 100644 --- a/packages/extension/opencode.lock.json +++ b/packages/extension/opencode.lock.json @@ -1,17 +1,17 @@ { "version": "1.17.3", "repo": "harmoniqs/opencode", - "tag": "v1.17.3-amicode.9", + "tag": "v1.17.3-amicode.10", "source": "release", - "ref": "bbe47b60bd7ffa0fabf96799fc134c57f69e0617", + "ref": "e0105cd4d0d517354daaf47f5fd3d4776d708bf8", "platforms": { "darwin-arm64": { "asset": "opencode-darwin-arm64.zip", - "sha256": "315cecf7245d4ff7f9458f3d50dd19b73fc1b776642bbcdaf56777c6af318963" + "sha256": "8acd89f04da293a2e9097e7dc38cb2b20ccb638f778122bb0d17737f70a45209" }, "linux-x64": { "asset": "opencode-linux-x64.tar.gz", - "sha256": "733af61317fbf24325f9bb25d55ecb71c2dc1f08e2c18c9b7a853472412e7cf3" + "sha256": "0045b4a1e4235c5186db9540ef2d25dce74d4ffa2f0f0171a1d3d43515633f10" } } } diff --git a/packages/extension/scripts/assert_ui_gate.sh b/packages/extension/scripts/assert_ui_gate.sh index c761a15a..4cbf7a46 100755 --- a/packages/extension/scripts/assert_ui_gate.sh +++ b/packages/extension/scripts/assert_ui_gate.sh @@ -16,9 +16,26 @@ set -euo pipefail BIN="${1:?usage: assert_ui_gate.sh }" test -f "$BIN" || { echo "FAIL: no binary at $BIN"; exit 1; } -# Minified shape: `...general?.newLayoutDesigns,)` where the default lands in -# as `=!0` (on) / `=!1` (off). -VAR=$(grep -aoh 'newLayoutDesigns,[A-Za-z$_]\{1,8\})' "$BIN" | head -1 | sed 's/newLayoutDesigns,//; s/)//') +# Shape A (current, since opencode ead3274d3 "lock down appearance settings; +# force v2 layout"): settings.tsx sets `newLayoutDesigns: createMemo(() => true)` +# — unconditional, no channel dependency. Minifies to `newLayoutDesigns:(()=>!0)`. +# `if`, not `grep && { ... }`: under `set -e` a non-matching grep in an AND-list +# aborts the script with no message, which reads as a silent failure. +if grep -aq 'newLayoutDesigns:[A-Za-z$_]\{1,8\}(()=>!0)' "$BIN"; then + echo "OK: amicode UI gate hardcoded ON (unconditional memo) — $BIN" + exit 0 +fi +if grep -aq 'newLayoutDesigns:[A-Za-z$_]\{1,8\}(()=>!1)' "$BIN"; then + echo "FAIL: amicode UI gate unconditional memo is OFF (=>!1) — $BIN" + exit 1 +fi + +# Shape B (legacy, channel-gated): `...general?.newLayoutDesigns,)` where the +# default lands in as `=!0` (on) / `=!1` (off). Kept so this check +# still works if the setting is ever rewired back to the channel default. +# `|| true`: under `set -o pipefail` a no-match grep would abort here, so the +# "pattern not found" diagnostic below could never fire. +VAR=$( { grep -aoh 'newLayoutDesigns,[A-Za-z$_]\{1,8\})' "$BIN" || true; } | head -1 | sed 's/newLayoutDesigns,//; s/)//') test -n "$VAR" || { echo "FAIL: gate pattern not found in $BIN (minifier drift? update this check)"; exit 1; } if grep -aq "[^A-Za-z0-9_\$]${VAR}=!0" "$BIN"; then