Skip to content

fix(installers): stop silent death in GitHub release resolution and authenticate in CI - #44

Merged
CybotTM merged 3 commits into
mainfrom
fix/silent-release-resolution-death
Jul 30, 2026
Merged

fix(installers): stop silent death in GitHub release resolution and authenticate in CI#44
CybotTM merged 3 commits into
mainfrom
fix/silent-release-resolution-death

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 30, 2026

Copy link
Copy Markdown
Member

Problem

Smoke Test has failed on main since 2026-07-24 with ✗ github_release_binary.sh fd install failed: and an empty log (#43).

Root cause, reproduced locally: the GitHub-releases fallback assigns LATEST from an unguarded curl | awk pipeline. Under set -eo pipefail, a failing curl inside the command substitution kills the whole script with zero output (stderr is already /dev/null'd) — it never reaches the 'Unable to resolve latest version' diagnostic. Anonymous requests from shared runner IPs are frequently rate-limited, which is why it fails in CI and passes locally. fd.json has neither version_url nor gitlab_project, so every fd install traverses this line. The sibling pipelines (lines 57, 64) already carry || true; this one didn't.

Fix

  • Guard the pipeline with || true so failures reach the proper error path (message now names rate limiting).
  • Prefer the authenticated api.github.com lookup when GITHUB_TOKEN is set.
  • Pass GITHUB_TOKEN to the smoke-test workflow step.

Test plan

  • Normal path: PREFIX=tmp github_release_binary.sh fd installs a working fd (verified: fd 10.4.2).
  • Forced failure (curl shimmed to exit 22): exit 1 with [fd] Error: Unable to resolve latest version (network failure or GitHub rate limit) instead of an empty log.
  • bash -n + shellcheck clean (pre-existing SC1091 info only).

Fixes #43

…uthenticate in CI

The GitHub-releases fallback assigned LATEST from an unguarded
curl|awk pipeline. Under `set -eo pipefail` a failing curl (anonymous
requests from shared CI runner IPs are frequently rate-limited) killed
the script with zero output — the smoke test then reported
"github_release_binary.sh fd install failed:" with an empty log.

Guard the pipeline with `|| true` so resolution failure reaches the
proper diagnostic (now naming rate limiting as a likely cause), prefer
the authenticated API when GITHUB_TOKEN is set, and pass GITHUB_TOKEN
to the smoke-test workflow step so CI resolution is deterministic.

Fixes #43

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 30, 2026 12:52
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…ke test

- [[ ]] instead of [ ] and curl --proto '=https' on the new release
  resolution lines (shelldre:S7688, shell:S6506).
- Run the smoke-test installer under bash -x: the failure mode being
  chased produces zero output, and the xtrace lands in the install log
  that is only printed on failure.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Comment thread skills/cli-tools/scripts/installers/github_release_binary.sh Fixed
The post-install report ran `command -v "$BINARY_NAME" && (...)` — when
BIN_DIR is not on PATH (isolated PREFIX in the CI smoke test) the
substitution exits non-zero and set -e kills the script silently after a
fully successful install. This, not release resolution, was the actual
cause of the empty-log smoke failures (#43); the bash -x trace pinpointed
the dying assignment. A PATH lookup is also wrong with multiple installs:
it can resolve a different copy than the one just written.

Probe "$BIN_DIR/$BINARY_NAME" directly and print it as the path.
Reproduced red/green locally with fd off PATH: silent exit 1 with a
zero-byte log before, clean success report after.

Fixes #43

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit 647ee2e into main Jul 30, 2026
18 checks passed
@CybotTM
CybotTM deleted the fix/silent-release-resolution-death branch July 30, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smoke Test: github_release_binary.sh fd install fails on main with empty error

3 participants