fix(#3446): remove invalid top-level return guard from inlined CSMA code#3448
Conversation
The CSMA library load guard (`return 0` at top level) was left in when the library was inlined into post-prioritize.sh and its test file. Since these scripts are executed directly (not sourced), `return` at top level is invalid bash and crashes the script with exit code 2 when GITHUB_API_CSMA_SH_LOADED is set in the environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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. |
1 similar comment
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. |
Site previewPreview: https://e83941bf-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Retro · ✅ Success · Started 10:18 AM UTC · Completed 10:30 AM UTC |
|
PR #3448 fixed a latent shell bug (top-level Proposals filed
|
Summary
[[ -n "${GITHUB_API_CSMA_SH_LOADED:-}" ]] && return 0/GITHUB_API_CSMA_SH_LOADED=1) frompost-prioritize.shandpost-prioritize-test.shreturn: can only 'return' from a function or sourced script, exit code 2) whenGITHUB_API_CSMA_SH_LOADEDis set in the environmentCloses #3446
Test plan
GITHUB_API_CSMA_SH_LOADED=1 bash post-prioritize.shno longer crashes with areturnerror (exits with missing env var error instead, as expected)bash internal/scaffold/fullsend-repo/scripts/post-prioritize-test.sh🤖 Generated with Claude Code