Files
computer-playbook/scripts/github/validate/selection.sh
T
kevinveenbirkenbachandClaude Opus 5.5 6314938133 feat(ci): replace the tor axis with a network axis of node modes
Every deploy row now takes a node network mode, clearnet, tor or multi,
instead of an onion yes or no. The workflow input `network`
(auto|clearnet|tor|multi) replaces `tor`, and INFINITO_NETWORK replaces
INFINITO_TOR.

utils/github/variant/network.py decides which modes a row can take: clearnet
only without a Tor bond or when the variant pins Tor off, no multi for a
single_mode role, no clearnet for the Tor provider, whose rows are therefore no
longer dropped when the rotation lands on clearnet. Priority rows cover every
mode and network combination, regular rows rotate the network on sweep // 2,
and clearnet rows carry disable=tor. Selection tokens pin the axis with
+clearnet, +tor or +multi, and multi rows wear the new glyph.

A row hands its mode to the deploy as the variable `network`, which
provisioning writes into host_vars as NETWORK_MODE. Without it the node keeps
deriving its mode from the deployed providers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 22:40:20 +02:00

32 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Validate a run's selection inputs against the branch it would deploy from,
# before any runner is spent on it.
#
# Inputs via env:
# INPUT_WHITELIST whitelist value of the run ('' = nothing to check)
# INPUT_PRIORITY priority line of the run ('' = nothing to check)
# INPUT_MODE deploy modes the run draws from
# INPUT_NETWORK network axis of the run
# INPUT_DISTROS distro pool of the run ('' = every declared distro)
# INPUT_FILESYSTEM filesystem pool of the run ('' = every declared kind)
# INPUT_LIFECYCLES lifecycle envelope of the run
#
# Exits non-zero when a token names a row this branch does not have or pins an
# axis the row cannot take; cli.meta.ci.validate reports every offender at once,
# so a stale list is fixed in one pass rather than one CI round per entry.
set -euo pipefail
# shellcheck source=scripts/meta/env/load.sh
source scripts/meta/env/load.sh
"${PYTHON}" -m cli.meta.ci.validate \
--whitelist "${INPUT_WHITELIST:-}" \
--priority "${INPUT_PRIORITY:-}" \
--modes "${INPUT_MODE:-auto}" \
--network "${INPUT_NETWORK:-auto}" \
--distros "${INPUT_DISTROS:-}" \
--filesystem "${INPUT_FILESYSTEM:-}" \
--lifecycles "${INPUT_LIFECYCLES:-}"