Skip to content

fix(authbridge): rename plugins_sparc.go to avoid Go GOARCH filename collision - #736

Open
vz-ibm wants to merge 1 commit into
rossoctl:mainfrom
vz-ibm:fix/sparc-plugin-goarch-collision
Open

fix(authbridge): rename plugins_sparc.go to avoid Go GOARCH filename collision#736
vz-ibm wants to merge 1 commit into
rossoctl:mainfrom
vz-ibm:fix/sparc-plugin-goarch-collision

Conversation

@vz-ibm

@vz-ibm vz-ibm commented Aug 4, 2026

Copy link
Copy Markdown

Problem

The sparc plugin is never compiled into any authbridge-proxy build, on
every published image tag we tried (v0.6.0-alpha.12, v0.7.0-alpha.2) and
even a fresh from-source build of main with default (empty) GO_BUILD_TAGS.
The sidecar's registered-plugin list is always missing sparc:

level=WARN msg="reloader: reload failed" error="build: outbound: unknown plugin \"sparc\" (registered: [a2a-parser ibac inference-parser jwt-validation litellm-budget-track mcp-parser opa static-inject token-broker token-exchange])"

Root cause

authbridge/cmd/authbridge-proxy/plugins_sparc.go has an explicit
//go:build !exclude_plugin_sparc constraint, which correctly evaluates
true by default (same pattern as every other plugins_*.go file in that
directory). But Go's build tool also applies an implicit constraint based
on filename: any file matching *_GOARCH.go is restricted to that
architecture — and sparc is itself a legacy Go GOARCH value (for the
historical SPARC CPU, alongside sparc64; see go/build/syslist.go's
knownArch). So plugins_sparc.go is silently interpreted as "only build
when GOARCH=sparc" and excluded from every normal amd64/arm64 build —
independent of, and regardless of, the explicit //go:build line.

This is a permanent bug affecting every build of the "full" authbridge
image (the authbridge-lite variant already excludes sparc on purpose via
its own GO_BUILD_TAGS, so it's unaffected/expected).

Verification

Built a throwaway copy of authbridge/ with only this rename applied
(content otherwise unchanged) and confirmed the plugin's own string literal
("sparc: reflector unavailable, failing open") now appears in the compiled
binary via strings. Rebuilt the real local image with the same rename and
confirmed deploy-agent.sh --plugin-preset sparc-only (rossoctl/workload-harness)
now resolves the plugin correctly end-to-end:

Plugins (resolved): a2a-parser mcp-parser inference-parser sparc
Agent is ready and accessible!

and the AuthBridge sidecar logs reloader: pipelines swapped /
drained old pipelines confirming the SPARC-enabled config loaded live.

Fix

Pure rename, no logic change: plugins_sparc.goplugins_sparcplugin.go.

Note

sparc is present on both main and release-0.6 — this fix likely needs
backporting to release-0.6 as well if that branch still cuts patch
releases.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • authbridge/cmd/authbridge-proxy/plugins_sparcplugin.go
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ff133d37-91f7-41de-bed3-f2785474fc43

📥 Commits

Reviewing files that changed from the base of the PR and between c5798c6 and 21484c3.

📒 Files selected for processing (1)
  • authbridge/cmd/authbridge-proxy/plugins_sparcplugin.go

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@OsherElhadad

Copy link
Copy Markdown

Thank you @vz-ibm for fixing it! LGTM
@huang195 / @pdettori can you pls review?

@OsherElhadad OsherElhadad 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.

LGTM

Go's build system treats any *_GOARCH.go filename as an implicit
architecture constraint, and "sparc" is itself a legacy GOARCH value
(for the SPARC CPU). This silently excluded the sparc plugin's wiring
file from every normal amd64/arm64 build of authbridge-proxy,
regardless of its explicit //go:build !exclude_plugin_sparc line --
affecting every published authbridge image tag, not just a stale
cache. Verified by rebuilding after the rename: the sparc plugin's
own string literals now appear in the compiled binary, and
deploy-agent.sh --plugin-preset sparc-only resolves the sparc plugin
successfully. Content unchanged, filename only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Vitaly Zabershinsky <VITALYZ@il.ibm.com>
@vz-ibm
vz-ibm force-pushed the fix/sparc-plugin-goarch-collision branch from 876b3b6 to 21484c3 Compare August 4, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New/ToDo

Development

Successfully merging this pull request may close these issues.

3 participants