Files
computer-playbook/scripts/github/resolve/priority_batches.sh
T
kevinveenbirkenbachandClaude Opus 5.5 621a492ec3 feat(ci): name the deploy chunks as numbered batches and star the priority ones
The chunk jobs read `🧱 Chunk N` and every priority row carried its own
trailing ⭐, so a priority sweep repeated the star down the whole job
list while the chunk that held those rows looked like any other.

- The four chunk jobs are named `0️⃣ Batch` to `3️⃣ Batch`, with ` ⭐`
  when the batch holds priority rows, and their discover job reads
  `🔍 Batch N ⭐` through the existing `marker` input.
- call-validation counts those batches once per run
  (scripts/github/resolve/priority_batches.sh, which runs
  `cli.meta.ci.matrix --priority-chunks`) and exposes the count as the
  `starred` output. chunks.plan cuts the priority chunks from the
  priority rows alone, so offset and the regular line cannot move them;
  the orchestrator hands validation the same sweep and chunk size it
  hands the chunk jobs.
- The row label drops its own star. report_failures and the job-name
  parsers still accept a starred title from an older run.
- The glossary names the unit `batch` (`#️⃣`) instead of `chunk` (`📦`),
  `ci plan` prints the batch column as the keycap the job name leads
  with, and the name lint accepts a leading keycap emoji.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:46:38 +01:00

38 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Write how many leading batches of the sweep hold priority rows to
# GITHUB_OUTPUT as `count`.
#
# Inputs via env:
# INPUT_PRIORITY priority line of the run
# INPUT_MODE deploy modes the run draws from
# INPUT_NETWORK network axis of the run
# INPUT_VPN WireGuard mesh 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_ARCHITECTURES architecture pool of the run ('' = amd64 and arm64)
# INPUT_LIFECYCLES lifecycle envelope of the run
# INFINITO_CI_SWEEP sweep number driving the axis rotations
# INFINITO_CI_CHUNK_SIZE rows one batch holds ('' or 0 = derived)
set -euo pipefail
# shellcheck source=scripts/meta/env/load.sh
source scripts/meta/env/load.sh
count="$(
"${PYTHON}" -m cli.meta.ci.matrix --priority-chunks \
--sweep "${INFINITO_CI_SWEEP}" \
--priority "${INPUT_PRIORITY}" \
--modes "${INPUT_MODE}" \
--network "${INPUT_NETWORK}" \
--vpn "${INPUT_VPN}" \
--distros "${INPUT_DISTROS}" \
--filesystem "${INPUT_FILESYSTEM}" \
--architectures "${INPUT_ARCHITECTURES}" \
--lifecycles "${INPUT_LIFECYCLES}"
)"
echo "count=${count}" >>"${GITHUB_OUTPUT}"
echo "count=${count}"