Skip to content

fix(#258): remove source-guard from CSMA library#281

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/258-remove-csma-load-guard
Open

fix(#258): remove source-guard from CSMA library#281
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/258-remove-csma-load-guard

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown

The load guard ([[ -n GITHUB_API_CSMA_SH_LOADED ]] && return 0) prevents function definitions from loading when the env var is already set. This crashes callers that depend on the sourced functions. The guard is unnecessary — no script sources this library twice in the same shell session.


Closes #258

Post-script verification

  • Branch is not main/master (agent/258-remove-csma-load-guard)
  • Secret scan passed (gitleaks — d8e3df7c018996e396c79b8ecd59e4145a628a6f..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

The load guard ([[ -n GITHUB_API_CSMA_SH_LOADED ]] && return 0)
prevents function definitions from loading when the env var is
already set. This crashes callers that depend on the sourced
functions. The guard is unnecessary — no script sources this
library twice in the same shell session.

Closes #258
@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 10, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:40 PM UTC · Completed 4:46 PM UTC
Commit: d8e3df7 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review — PR #281

Verdict: approve

Clean 3-line deletion that removes a source guard from the CSMA library. Reviewed across correctness, security, intent/coherence, style, and documentation dimensions.

Correctness

The guard [[ -n "${GITHUB_API_CSMA_SH_LOADED:-}" ]] && return 0 / GITHUB_API_CSMA_SH_LOADED=1 is the sole cause of the bug described in #258: if the env var leaks into the environment, return 0 skips all function definitions and callers crash. Removal is safe:

  • Exactly two callers source this library (post-prioritize.sh, post-prioritize-test.sh), each exactly once per shell session.
  • The library only defines functions — sourcing is idempotent even without the guard.
  • No remaining references to GITHUB_API_CSMA_SH_LOADED exist anywhere in the repo.
  • Test file is unmodified — no assertions loosened, no coverage reduced.

Security

No secrets, injection patterns, or permission changes. The guard was not a security control. Its removal actually eliminates a minor footgun where a pre-set env var could prevent the library from loading (a low-impact DoS vector).

Intent & coherence

Change traces directly to issue #258. Scope matches the claimed tier (bug fix). No scope creep. The issue's proposed fix cited line numbers in the caller scripts, but the guard lives in the library file itself — the PR correctly targets the root location.

Style & docs

No other shell library in the repo uses a source guard pattern. Removal aligns with codebase conventions. No documentation references the removed variable.


Reviewed dimensions: correctness · security · intent/coherence · style · docs-currency. Cross-repo contracts skipped (no exported interfaces modified).

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Jul 10, 2026
@guyoron1

Copy link
Copy Markdown
Owner

/fs-fix

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jul 10, 2026

Copy link
Copy Markdown
Author

🤖 Finished Fix · ✅ Success · Started 5:43 PM UTC · Completed 5:48 PM UTC
Commit: d8e3df7 · View workflow run →

@fullsend-ai-coder

Copy link
Copy Markdown
Author

🔧 Fix agent — iteration 1 (human-triggered)

No fixes needed. The review agent approved PR #281 with verdict 'approve' and no requested changes. The human /fs-fix command included no specific instruction.

Disagreed (1):

  1. no changes requested: The review agent approved PR fix(#258): remove source-guard from CSMA library #281 with no requested changes. The human triggered /fs-fix without a specific instruction. There are no findings to address.

Tests: passed

Updated by fullsend fix agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RTK+Ponytail] Remove invalid top-level return 0 guard from inlined CSMA code in post-prioritize scripts

1 participant