fix(ci): shellcheck-arm64-pilot runs-on label matches Mac mini's actual registration #1679
Reference in New Issue
Block a user
Delete Branch "fix-shellcheck-arm64-pilot-runner-label"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lint-shellcheck-arm64-pilot.yml was perpetually CANCELLED because Gitea couldn't assign any runner to
runs-on: [self-hosted, arm64]. Mac mini's registered labels areself-hosted, macos-self-hosted-arm64, arm64-darwin(no plainarm64).Fix: change selector to
[self-hosted, arm64-darwin]. Cleaner than adding a label to runner registration (per feedback_pc2_runner_labels_must_stay_narrow — selectors should match what's registered, not widen runner labels speculatively).Not in branch_protections required_contexts; reversible; clears cancelled noise from status feeds and makes the lane actually run.
Generated with Claude Code
Run 79275 / task 145654 on Mac mini runner empirically failed at: workflow/3.sh: line 6: mapfile: command not found Process completed with exit code 127 macOS ships Bash 3.2 (Apple license — won't update to GPLv3+ Bash 4+). `mapfile` is a Bash 4+ builtin; not available on Mac mini's /bin/bash. Earlier steps confirmed the Mac mini runner picks up the job correctly (uname -m = arm64, kernel Darwin 23.5.0, "arm64 confirmed") so the runner-label fix from this PR's first commit was correct — the workflow just needs a portable enumeration pattern. Replaced `mapfile -t TARGETS < <(find ...)` with: TARGETS=() while IFS= read -r f; do TARGETS+=("$f"); done < <(find ...) — works on Bash 3.2 (macOS) AND Bash 4+ (Linux runners we might add later). The `< <(...)` process substitution is Bash 3.2+ so the overall shape stays portable. Comment-documents the empirical reason so a future contributor doesn't reintroduce the Bash 4+ idiom without realising the Mac runner exists on this lane. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>APPROVED. Clean two-part fix:
runs-onlabel fix: changes [self-hosted, arm64] to [self-hosted, arm64-darwin] — matches the actual Mac mini runner registration. Root cause well-documented (task_id=0 / runner_id=NULL → Gitea cancelled, shown as Cancelled not Failed). Correct.mapfilebash compat fix: replaces bash-4-only mapfile with portable while-read loop. macOS ships Bash 3.2; run 79275 actually failed on this. Correct.Small, well-scoped, good root-cause comments. No backcompat concerns.
LGTM — cross-author review.
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
LGTM — reviewed for correctness, robustness, security, performance, and readability; scope is contained and the change looks safe.
PM 2nd-approve per direct CTO request. shellcheck-arm64-pilot runs-on label fix to match Mac mini runner.