fix: call fullsend postrun for pre-commit tools and fix summaries#41
fix: call fullsend postrun for pre-commit tools and fix summaries#41waynesun09 wants to merge 1 commit into
Conversation
Companion scripts (resolve-precommit-tools.py, install-precommit-tools.sh, process-fix-result.py) are located via SCRIPT_DIR-relative sibling lookups. That works when scripts are resolved from a local scaffold checkout, but silently fails here: this repo's post-code.sh/post-fix.sh/ pre-code.sh/pre-fix.sh are fetched by fullsend as single files from a URL base, and the harness fetch pipeline has no sibling-file mechanism for scripts (only for skills) — so those companion scripts were never present next to the fetched pre/post scripts in this repo. Effect: pre-commit tool auto-install silently skipped (surfaces downstream as a confusing "Executable X not found" pre-commit failure), and fix-agent PR summary comments never posted. Requires fullsend-ai/fullsend#3393 to be merged and released first — this PR calls `fullsend postrun precommit-install` / `fullsend postrun fix-summary`, which do not exist in any fullsend release yet. Fixes fullsend-ai/fullsend#3069 Fixes fullsend-ai/fullsend#3070 Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 5:54 PM UTC · Completed 6:03 PM UTC |
Review — commentPR: #41 — Clean simplification — replaces dead sibling-script lookups ( One medium finding worth addressing before this leaves draft: Findings1.
|
| Severity | medium |
| Category | error-handling |
| Files | scripts/post-code.sh, scripts/post-fix.sh, scripts/pre-code.sh, scripts/pre-fix.sh |
The old code wrapped the tool-resolution step in an explicit guard:
if python3 "${RESOLVE_SCRIPT}" ... > "${MANIFEST}"; then
...
else
echo "::warning::Pre-commit tool resolution failed — continuing without auto-install"
fiA failure emitted a GitHub Actions warning and the script continued to the authoritative pre-commit check, push, and PR-creation steps.
The new code runs the replacement bare:
fullsend postrun precommit-install "${PRECOMMIT_INSTALL_ARGS[@]}"Under set -e, any non-zero exit from this command terminates the entire script. In the post-scripts this blocks branch push and PR creation; in the pre-scripts it prevents the agent from running at all. Pre-commit tool installation is a best-effort optimization — a transient failure (network timeout, binary version mismatch, unexpected input) should not be fatal.
Other fullsend CLI calls in this codebase follow the exit-code-capture pattern (e.g., fullsend post-review ... || POST_REVIEW_EXIT=$? in post-review.sh:314). The fullsend postrun fix-summary call in this same PR correctly preserves the pattern.
Remediation: Guard the call in all four scripts, e.g.:
fullsend postrun precommit-install "${PRECOMMIT_INSTALL_ARGS[@]}" \
|| echo "::warning::fullsend postrun precommit-install failed — continuing without auto-install"Alternatively, if fullsend postrun precommit-install is designed to always exit 0 (handling errors internally), add a comment documenting that contract so future maintainers know the bare call is intentional.
2. Token passed as CLI argument (--token) — visible in process table
| Severity | low |
| Category | secrets-handling |
| File | scripts/post-fix.sh |
The new fix-summary invocation passes the token on the command line:
fullsend postrun fix-summary --result "${RESULT_FILE}" --repo "${REPO_FULL_NAME}" \
--pr "${PR_NUMBER}" --token "${GH_TOKEN}"This exposes the token in /proc/<pid>/cmdline (readable by same-UID processes). The old python3 call inherited GH_TOKEN from the environment, keeping it out of the process argument list.
Mitigating factors: This is an established pattern in the codebase — post-review.sh, post-triage.sh, and post-prioritize.sh all pass tokens via --token. The token is already masked via ::add-mask:: (line 83). The practical risk on an ephemeral single-user CI runner is low. No action required unless the team decides to remediate all call sites together.
Dimensions reviewed
| Dimension | Result |
|---|---|
| Correctness | 1 medium (error-handling regression) |
| Security | 1 low (token on CLI — established pattern) |
| Intent & coherence | ✅ Scope matches authorized work; architectural direction is sound |
| Style & conventions | ✅ Consistent with existing patterns |
| Documentation | ✅ No stale references found |
| Cross-repo contracts | ✅ Internal scripts, not public API — temporal dependency on fullsend#3393 is acknowledged via draft status |
📋 Review by fullsend — PR #41 · head 7d82582
This PR calls two new subcommands,
fullsend postrun precommit-installandfullsend postrun fix-summary, which do not exist in any released version offullsendyet. They are introduced by fullsend-ai/fullsend#3393. Merging this PR before that one merges (and before afullsendrelease containing it is cut) will make every code/fix agent run in this org fail at the pre-commit/PR-summary step, sincefullsend postrunwill be an unknown subcommand.Opened as a draft for this reason — please only mark ready for review / merge once fullsend-ai/fullsend#3393 has merged and shipped in a release, and the
agents:SHA pin consuming repos use has been updated accordingly (or this repo's own dispatch is otherwise confirmed to run against afullsendversion that haspostrun).Summary
post-code.sh,post-fix.sh,pre-code.sh, andpre-fix.shlocate companion scripts (resolve-precommit-tools.py,install-precommit-tools.sh,process-fix-result.py) via aSCRIPT_DIR-relative sibling lookup. Those companion scripts were never migrated into this repo during extraction, so the lookup has always silently failed here.Executable X not foundfailure at the authoritative pre-commit gate), and fix-agent PR summary comments never post.fullsend postrun precommit-install/fullsend postrun fix-summary, which ship inside thefullsendbinary itself — no sibling-file dependency, sincefullsendis already present and running as the process orchestrating these scripts.Related Issue
Fixes fullsend-ai/fullsend#3069
Fixes fullsend-ai/fullsend#3070
Changes
scripts/post-code.sh,scripts/post-fix.sh,scripts/pre-code.sh,scripts/pre-fix.sh: replaceresolve-precommit-tools.py+install-precommit-tools.shinvocations withfullsend postrun precommit-installscripts/post-fix.sh: replaceprocess-fix-result.pyinvocation withfullsend postrun fix-summary, preserving the original exit-code distinction (bad input = fatal, post failure = warning-and-continue)Testing
bash -nsyntax check on all four modified scriptsshellcheck— no new findingsscripts/post-code-test.shandscripts/post-fix-test.shsuites pass unchanged