row 198 r3: rollback always drops --board (sage-2834 ruling a)

webui-service.sh install has no --board branch and refuses the flag, so a
rollback that kept a recorded --board failed at install-console. The rollback
now drops it unconditionally, with its own plan line naming the retired board.
An activate still keeps --board where the target parses it.

M13 now asserts the rollback drop line and that the Console install line
carries no --board. The webui README gets the pre-198 rollback note.
BUILD.md records the ruling and the M13 expectation.

UNVERIFIED: no node or tests run (Sage's gate).
This commit is contained in:
jason.woltje committed 2026-10-23 13:58:36 -05:00
1 parent aad3000fe2
commit 77c12b5545
4 files changed
+44 -33

No files matched your search

+12 -8
View File
@@ -809,15 +809,19 @@ console_for_target() {
local cli="$COPIES/$TO/packages/webui/src/cli.mjs"
local -a without_tester=()
sso_base
# Row 198 (design item 8): --board stays only where the target's Console parses it, and a drop is
# named in the plan and the steps. The check reads the target's own cli.mjs, as --tester-port does.
DROP_BOARD=""
# Row 198 (design item 8, Sage sage-2834 ruling a): --board stays only for an activate whose target's
# Console parses it. A rollback always drops it: 7331 is retired and webui-service.sh install refuses
# the flag, so a kept flag would fail the rollback at install-console. Each drop is named in the plan
# and the steps. The check reads the target's own cli.mjs, as --tester-port does.
DROP_BOARD="" DROP_BOARD_WHY=""
local -a kept=()
for ((i = 0; i < ${#BASE_CONSOLE[@]}; i++)); do
if [ "${BASE_CONSOLE[i]}" != --board ]; then kept+=("${BASE_CONSOLE[i]}"); continue; fi
i=$((i + 1))
if parses_flag "$cli" --board; then kept+=(--board "${BASE_CONSOLE[i]:-}")
else DROP_BOARD="--board ${BASE_CONSOLE[i]:-}"; fi
if [ "$OP" != rollback ] && parses_flag "$cli" --board; then kept+=(--board "${BASE_CONSOLE[i]:-}"); continue; fi
DROP_BOARD="--board ${BASE_CONSOLE[i]:-}"
if [ "$OP" = rollback ]; then DROP_BOARD_WHY="the 7331 board is retired, so the rolled-back Console runs without the board"
else DROP_BOARD_WHY="the target Console does not parse it, so the board runs in the Console"; fi
done
BASE_CONSOLE=("${kept[@]}")
if grep -q 'MOSAIC_TESTER_SOCKET_V1' "$cli"; then socket_supported=1
@@ -1462,7 +1466,7 @@ plan() {
[ "$RUN_PENDING" = 0 ] || echo "pm: the bus starts without --pm and the PM stays pending; next: Jason's plugins set of harness, then pm-on"
echo "bus: scripts/bus-service.sh install $flags--copy $TO --copies $COPIES$([ "$RUN_PM" = 0 ] || echo ' --pm') --claude $P_CLAUDE"
[ -z "$DROP_TESTER" ] || echo "drop $DROP_TESTER; the target Console does not support it"
[ -z "$DROP_BOARD" ] || echo "drop $DROP_BOARD; the target Console does not parse it, so the board runs in the Console"
[ -z "$DROP_BOARD" ] || echo "drop $DROP_BOARD; $DROP_BOARD_WHY"
echo "$PROOF_PLAN"
echo "$SEND_PLAN"
[ -z "$SSO_PLAN" ] || echo "$SSO_PLAN"
@@ -1483,7 +1487,7 @@ run_steps() {
else log_line result started; fi
capture || refuse capture-failed "could not write the rollback set $RS; nothing was stopped"
[ -z "$DROP_TESTER" ] || say "drop $DROP_TESTER; the target Console does not support it"
[ -z "$DROP_BOARD" ] || say "drop $DROP_BOARD; the target Console does not parse it, so the board runs in the Console"
[ -z "$DROP_BOARD" ] || say "drop $DROP_BOARD; $DROP_BOARD_WHY"
[ -z "$PROOF_STEP" ] || say "$PROOF_STEP"
[ -z "$SEND_STEP" ] || say "$SEND_STEP"
[ -z "$SSO_STEP" ] || say "$SSO_STEP"
@@ -2337,7 +2341,7 @@ STORE="$DATA/bus/bus.sqlite"
BUS_UNIT="${BUS_TEMPLATE%.service}$BUSINESS.service"
FROM="" TO="" ACT="" RS="" POST="" BACKUP="" TAKEN="" RESTORED="" STEPS="" COUNT="" UNCLEAN="" FAIL=""
STORE_SCHEMA="" START_EPOCH="" START_MS=0 GATE="" GATE_WHY="" S_CHANGED=""
P_COPY="" P_PM=0 P_PENDING=0 P_SCHEMA="" P_CLAUDE="" P_CONSOLE=() RUN_PM=0 RUN_PENDING=0 RUN_CONSOLE=() DROP_TESTER="" DROP_BOARD="" PROOF_PLAN="" PROOF_STEP="" SEND_PLAN="" SEND_STEP="" PLAN_REFUSE=()
P_COPY="" P_PM=0 P_PENDING=0 P_SCHEMA="" P_CLAUDE="" P_CONSOLE=() RUN_PM=0 RUN_PENDING=0 RUN_CONSOLE=() DROP_TESTER="" DROP_BOARD="" DROP_BOARD_WHY="" PROOF_PLAN="" PROOF_STEP="" SEND_PLAN="" SEND_STEP="" PLAN_REFUSE=()
BASE_CONSOLE=() SERVE_FLAGS=() SSO_PLAN="" SSO_STEP="" SSO_DROP="" SSO_NO_TARGET=""
R="" R_RC=0 R_EARLY=() R_BK="" R_HOST_PID="" R_CONSOLE_PID="" R_STARTED="" LIVE_CFG="" LIVE_BIZ=""
O_ACT="" FLOOR=0