From 733b9c064c1a664d3e8c7615e0d0f74546763fb7 Mon Sep 17 00:00:00 2001 From: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Date: Sun, 12 Jul 2026 03:26:48 +0000 Subject: [PATCH] fix(#174): remove invalid top-level return 0 load guard from github-api-csma.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The library-style load guard ([[ -n GITHUB_API_CSMA_SH_LOADED ]] && return 0 / GITHUB_API_CSMA_SH_LOADED=1) was left behind when PR #3182 inlined the CSMA library into post-prioritize scripts. Since these scripts are executed directly (not sourced) under set -euo pipefail, the bare return 0 crashes with "return: can only return from a function or sourced script" (exit 2) whenever the env var is set. Remove the two-line guard (lines 21-22). The file is still sourced by post-prioritize.sh and post-prioritize-test.sh, so the guard is unnecessary — each script sources it exactly once. All 7 post-prioritize tests pass. Go scaffold tests have pre-existing failures on main unrelated to this change. Note: pre-commit could not run shellcheck in the sandbox (network restriction). Manual verification required. Closes #174 --- internal/scaffold/fullsend-repo/scripts/lib/github-api-csma.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/scaffold/fullsend-repo/scripts/lib/github-api-csma.sh b/internal/scaffold/fullsend-repo/scripts/lib/github-api-csma.sh index a281397e28..b0cef071f3 100644 --- a/internal/scaffold/fullsend-repo/scripts/lib/github-api-csma.sh +++ b/internal/scaffold/fullsend-repo/scripts/lib/github-api-csma.sh @@ -18,9 +18,6 @@ # shellcheck shell=bash -[[ -n "${GITHUB_API_CSMA_SH_LOADED:-}" ]] && return 0 -GITHUB_API_CSMA_SH_LOADED=1 - _github_csma_max_attempts() { echo "${GITHUB_CSMA_MAX_ATTEMPTS:-8}" }