fix(#174): remove invalid top-level return 0 load guard from github-api-csma.sh - #298
fix(#174): remove invalid top-level return 0 load guard from github-api-csma.sh#298fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
…pi-csma.sh The library-style load guard ([[ -n GITHUB_API_CSMA_SH_LOADED ]] && return 0 / GITHUB_API_CSMA_SH_LOADED=1) was left behind when PR fullsend-ai#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
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
|
🤖 Review · ❌ Terminated · Started 3:34 AM UTC · Ended 3:42 AM UTC |
Review — PR #298Verdict: Approve ✅ SummaryThis PR removes the library-style load guard ( AnalysisCorrectness: The guard removal is safe and correct. The library is sourced by exactly two consumers ( Security: No security surface area. Pure deletion of two code lines and a blank line. No injection patterns, permission changes, or sensitive data concerns. Intent & coherence: The PR traces to authorized work (issue #174, labeled Style: The post-deletion file structure is consistent with other library files in the same directory. No excess blank lines or formatting issues. Documentation: The removed variable ( Reviewed dimensions
|
The library-style load guard ([[ -n GITHUB_API_CSMA_SH_LOADED ]] && return 0 / GITHUB_API_CSMA_SH_LOADED=1) was left behind when PR fullsend-ai#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
Post-script verification
agent/174-remove-csma-load-guard)a2afa8b179a351845733c680b839a39a82304db6..HEAD)