fix(#235): add fallback path resolution for companion scripts in post-scripts#273
fix(#235): add fallback path resolution for companion scripts in post-scripts#273fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
…-scripts
When post-fix.sh or post-prioritize.sh runs from a
content-addressed cache path (sha256/<hash>/content), companion
files (process-fix-result.py, lib/github-api-csma.sh) are not
co-located with the script. The SCRIPT_DIR computed from
BASH_SOURCE[0] points to the cache directory where companions
do not exist.
Add a fallback: after computing SCRIPT_DIR, check if the
companion file exists at that path. If not, fall back to
${FULLSEND_DIR:-.}/scripts where companions are co-located in
the standard workspace layout.
Scripts fixed:
- post-fix.sh: process-fix-result.py resolution
- post-prioritize.sh: lib/github-api-csma.sh resolution
Closes #235
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. |
|
🤖 Finished Review · ❌ Failure · Started 12:59 PM UTC · Completed 12:59 PM UTC |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:57 PM UTC · Completed 4:09 PM UTC |
Review — commentPR: fix(#235): add fallback path resolution for companion scripts in post-scripts SummaryThe fix correctly adds fallback path resolution for companion scripts in
FindingsMedium[docs-currency] Both Remediation: Add Low[correctness] The fallback guard checks Remediation: Change [correctness] The [security] GHA workflow command injection hardening on echo output The Verification notes
Previous runReview of PR #273Verdict: Approve SummaryClean, minimal bug fix that adds fallback path resolution to two post-scripts ( The fallback logic is straightforward: check if the companion file exists at the Findings1.
|
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 5:38 PM UTC · Completed 5:49 PM UTC |
- Replace ${FULLSEND_DIR:-.} with ${FULLSEND_DIR:?...} so the fallback
fails with a clear error when FULLSEND_DIR is unset, rather than
silently resolving to the current working directory.
- Add echo when fallback companion path activates, aiding debugging.
Addresses review feedback on #273
🔧 Fix agent — iteration 1 (human-triggered)Addressed both low-severity review findings: (1) replaced fail-open ${FULLSEND_DIR:-.} with fail-closed ${FULLSEND_DIR:?...} in both scripts, (2) added fallback path log line in both scripts. Fixed (3):
Tests: passed Updated by fullsend fix agent |
|
🤖 Finished Review · ❌ Failure · Started 5:51 PM UTC · Completed 5:59 PM UTC |
When post-fix.sh or post-prioritize.sh runs from a content-addressed cache path (sha256//content), companion files (process-fix-result.py, lib/github-api-csma.sh) are not co-located with the script. The SCRIPT_DIR computed from BASH_SOURCE[0] points to the cache directory where companions do not exist.
Add a fallback: after computing SCRIPT_DIR, check if the companion file exists at that path. If not, fall back to ${FULLSEND_DIR:-.}/scripts where companions are co-located in the standard workspace layout.
Scripts fixed:
Closes #235
Post-script verification
agent/235-companion-fallback-resolution)c776c248ac9a91f10998ca7107e974a6c9d76514..HEAD)