Skip to content

Feat: Publish prebuilt abctl and authbridge-proxy release binaries - #715

Merged
huang195 merged 2 commits into
rossoctl:mainfrom
huang195:feat/release-binaries
Jul 29, 2026
Merged

Feat: Publish prebuilt abctl and authbridge-proxy release binaries#715
huang195 merged 2 commits into
rossoctl:mainfrom
huang195:feat/release-binaries

Conversation

@huang195

@huang195 huang195 commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

New users currently have to go build abctl and authbridge-proxy locally. Both are pure-Go (CGO_ENABLED=0, no cgo in their trees), so this ships prebuilt, downloadable binaries on every v* tag — no local toolchain needed.

Change

.github/workflows/release-binaries.yaml (new) — on a v* tag:

  • cross-compiles abctl + authbridge-proxy for linux + macOS × amd64 + arm64 (8 artifacts), using the same GOWORK=off CGO_ENABLED=0 per-module build the Dockerfiles already use (each cmd/* resolves authlib via its replace => ../../authlib, so no workspace is needed), plus -trimpath and -ldflags "-s -w -X main.version=<tag>";
  • packages each as <bin>_<tag>_<os>_<arch>.tar.gz, generates checksums.txt (sha256), and attaches all to the GitHub Release via the gh CLI;
  • workflow_dispatch does a dry build that uploads workflow artifacts only (no Release), for testing.
  • All actions are pinned to commit SHAs (reusing the repo's existing pins) to satisfy Verify Action Pinning.

Version stampingcmd/abctl and cmd/authbridge-proxy gain var version = "dev" + a --version flag (injected at release via -ldflags -X main.version); authbridge-proxy also logs its version at startup.

Docsauthbridge/README.md gains a "Download prebuilt binaries" section: download, checksum verify, the macOS Gatekeeper xattr note, and the static-vs-portable distinction.

Notes

  • Static / portable: linux binaries are fully static (filestatically linked); macOS binaries are portable but link libSystem (Go can't fully static-link darwin) and are unsigned — users clear the Gatekeeper quarantine once (xattr -dr com.apple.quarantine). Notarization (Apple Developer ID) is out of scope.
  • No go.mod change: the "workspace-only replace" caveat only affects go install; a source-tree cross-build works as-is (proven by the existing Dockerfiles).

Testing Instructions

  • Cross-built all 8 os/arch combos locally; --version prints the injected tag; file confirms linux builds are statically linked; gofmt/go vet clean.
  • End-to-end: push a throwaway v0.0.0-test tag on a fork to confirm the 8 tarballs + checksums.txt attach to that Release and sha256sum -c passes; on macOS the binary runs after clearing quarantine.

Follow-up (not in this PR)

abctl has no PR-time CI today; adding it to ci.yaml's Go matrix would catch a broken abctl before tag time. Kept separate to avoid surfacing pre-existing abctl lint in this PR.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Summary by CodeRabbit

  • New Features

    • Added downloadable prebuilt binaries for abctl and authbridge-proxy across supported Linux and macOS platforms.
    • Added SHA-256 checksums for verifying downloaded archives.
    • Added --version support to abctl and authbridge-proxy.
    • Release builds now identify the included application version.
  • Documentation

    • Added instructions for downloading, verifying, extracting, and running prebuilt binaries.
    • Added platform-specific notes for Linux and macOS.
    • Documented equivalent build-from-source commands.

New users had to `go build` abctl and authbridge-proxy locally. Both are
pure-Go (CGO_ENABLED=0, no cgo), so ship prebuilt binaries on each v* tag.

Add .github/workflows/release-binaries.yaml: on a v* tag, cross-compile
both binaries for linux+darwin × amd64+arm64 (GOWORK=off CGO_ENABLED=0,
each cmd module resolves authlib via its replace => ../../authlib — no
workspace), package tar.gz, generate SHA-256 checksums, and attach them to
the GitHub Release via the gh CLI. workflow_dispatch does a dry build that
uploads workflow artifacts only (no Release). All actions are pinned to
commit SHAs (Verify Action Pinning). Linux builds are fully static; darwin
builds are portable (Go links libSystem) and unsigned.

Add version stamping: `var version = "dev"` + a `--version` flag to
cmd/abctl and cmd/authbridge-proxy, injected via -ldflags -X main.version;
authbridge-proxy also logs its version at startup.

Document downloads in authbridge/README.md: download + checksum verify, the
macOS Gatekeeper (xattr) note, and the static-vs-portable distinction.

Verified: all 8 os/arch combos cross-build; --version prints the injected
tag; linux binaries are `statically linked` (file); gofmt/go vet clean.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@huang195, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fb1ead61-fb1c-492c-8e5d-6287c2c85582

📥 Commits

Reviewing files that changed from the base of the PR and between f655601 and c801606.

📒 Files selected for processing (2)
  • authbridge/cmd/abctl/README.md
  • authbridge/demos/weather-agent/demo-with-abctl.md
📝 Walkthrough

Walkthrough

Adds GitHub Actions automation to build and publish versioned abctl and authbridge-proxy binaries for Linux and macOS, adds version flags and startup logging, and documents downloading, verifying, and building the binaries.

Changes

Binary release and version reporting

Layer / File(s) Summary
CLI version reporting
authbridge/cmd/abctl/main.go, authbridge/cmd/authbridge-proxy/main.go
Adds version variables and CLI flags; authbridge-proxy also logs its resolved version during startup.
Cross-platform release automation
.github/workflows/release-binaries.yaml
Builds binaries for Linux and macOS on amd64 and arm64, creates archives and checksums, and publishes tagged releases or manual-run artifacts.
Prebuilt binary documentation
authbridge/README.md
Documents downloads, checksum verification, platform-specific notes, and source builds.
Estimated code review effort: 3 (Moderate) ~20 minutes

Suggested reviewers: ibrahim2595, alan-cha, cwiklik

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: publishing prebuilt release binaries for abctl and authbridge-proxy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/release-binaries.yaml (1)

30-31: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Avoid persisting the release token in checkout credentials.

This job has contents: write, while publishing already receives GH_TOKEN explicitly. Disable credential persistence so the build steps do not retain an authenticated Git credential.

Proposed hardening
       - name: Checkout
         uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0  # v4
+        with:
+          persist-credentials: false

actions/checkout persists credentials by default and supports opting out with persist-credentials: false. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-binaries.yaml around lines 30 - 31, Update the
Checkout step using actions/checkout to set persist-credentials to false,
ensuring the release token is not retained in Git credentials while leaving the
existing explicit GH_TOKEN publishing flow unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@authbridge/cmd/authbridge-proxy/main.go`:
- Around line 60-63: Run gofmt on the listed abctl Go files—json_colorize.go,
styles.go, e2e_test.go, and templates_test.go—and include the resulting
formatting-only changes; do not alter behavior or unrelated files.

In `@authbridge/README.md`:
- Around line 29-30: Update the macOS binary guidance in the README to retain
only the xattr quarantine-removal command and remove the codesign --sign -
ad-hoc signing alternative.

---

Nitpick comments:
In @.github/workflows/release-binaries.yaml:
- Around line 30-31: Update the Checkout step using actions/checkout to set
persist-credentials to false, ensuring the release token is not retained in Git
credentials while leaving the existing explicit GH_TOKEN publishing flow
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 850fb4a1-599f-493a-bb85-c621d54c3706

📥 Commits

Reviewing files that changed from the base of the PR and between afc2321 and f655601.

📒 Files selected for processing (4)
  • .github/workflows/release-binaries.yaml
  • authbridge/README.md
  • authbridge/cmd/abctl/main.go
  • authbridge/cmd/authbridge-proxy/main.go

Comment on lines +60 to +63
// version is the authbridge-proxy build version, overridden at release time
// via -ldflags "-X main.version=<tag>". Defaults to "dev" for local builds.
var version = "dev"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for module in authbridge/cmd/abctl authbridge/cmd/authbridge-proxy; do
  unformatted="$(find "$module" -type f -name '*.go' -print0 | xargs -0 gofmt -l)"
  test -z "$unformatted" || {
    printf 'Run go fmt ./... in %s:\n%s\n' "$module" "$unformatted" >&2
    exit 1
  }
  (cd "$module" && GOWORK=off go vet ./...)
done

proxy_go_version="$(cd authbridge/cmd/authbridge-proxy && go env GOVERSION)"
case "$proxy_go_version" in go1.25.*) ;; *)
  echo "authbridge-proxy must use Go 1.25; got $proxy_go_version" >&2
  exit 1
esac

Repository: rossoctl/cortex

Length of output: 357


Run go fmt on the unformatted files before merge.

authbridge/cmd/abctl still has Go files that need formatting:

  • authbridge/cmd/abctl/tui/json_colorize.go
  • authbridge/cmd/abctl/tui/styles.go
  • authbridge/cmd/abctl/cluster/e2e_test.go
  • authbridge/cmd/abctl/edit/templates_test.go
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@authbridge/cmd/authbridge-proxy/main.go` around lines 60 - 63, Run gofmt on
the listed abctl Go files—json_colorize.go, styles.go, e2e_test.go, and
templates_test.go—and include the resulting formatting-only changes; do not
alter behavior or unrelated files.

Source: Coding guidelines

Comment thread authbridge/README.md
Comment on lines +29 to +30
- **macOS** binaries are portable but unsigned; after extracting, clear the Gatekeeper
quarantine once: `xattr -dr com.apple.quarantine ./abctl` (or `codesign --sign - ./abctl`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove the ad-hoc signing alternative.

codesign --sign - creates an identityless ad-hoc signature; Apple documents that such signatures cannot pass Gatekeeper. Keep the quarantine-removal command, but do not present ad-hoc signing as an alternative. (developer.apple.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@authbridge/README.md` around lines 29 - 30, Update the macOS binary guidance
in the README to retain only the xattr quarantine-removal command and remove the
codesign --sign - ad-hoc signing alternative.

Update cmd/abctl/README.md and the weather-agent abctl demo to lead with
downloading a prebuilt abctl from the Releases page (linking the new
"Download prebuilt binaries" section in authbridge/README.md), keeping
build-from-source as an alternative. Follows the release-binaries workflow
added in this PR.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>

@esnible esnible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a clean, well-scoped PR adding a v*-tag-triggered workflow that cross-compiles abctl and authbridge-proxy (linux/darwin × amd64/arm64), publishes tarballs + sha256 checksums to the Release, plus --version flags and docs.

Security hygiene is excellent: minimal top-level contents: read with contents: write scoped to the job, untrusted inputs.tag passed via env (never interpolated into the script), all actions SHA-pinned (verified against the pins already used in build.yaml/ci.yaml/scorecard.yaml), set -euo pipefail, and the publish step gated on github.ref_type == 'tag'. Both main.go files already import fmt, so the --version additions compile cleanly (confirmed by green Go CI).

Only finding is cosmetic (see inline nit): the action-pin version comments mislabel their SHAs.

Author: huang195 (MEMBER — maintainer)
Areas reviewed: CI/GitHub Actions, Go, Docs, embedded Shell
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits, all signed-off: yes
CI status: passing (all checks green; Spellcheck skipped)

Assisted-By: Claude Code

uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v5
with:
go-version-file: authbridge/cmd/authbridge-proxy/go.mod

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: The SHAs here are correct and match the pins already used elsewhere in the repo, but the trailing version comments are stale/wrong:

  • actions/checkout@9c091bb2... is v7.0.0 (not # v4)
  • actions/setup-go@924ae3a1... is v6 (not # v5, line 40)
  • actions/upload-artifact@043fb46d... is v7.0.1 (not # v4, line 95)

Compare build.yaml/ci.yaml/scorecard.yaml, which label the same SHAs. The pins themselves are safe; only the comments mislabel the version. Worth correcting so they don't drift from reality.

@huang195
huang195 merged commit 1ceb284 into rossoctl:main Jul 29, 2026
19 checks passed
@huang195
huang195 deleted the feat/release-binaries branch July 29, 2026 18:29
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants