Repository navigation
Description
Feature Description
Two problems, one mechanism:
- The desktop download is 2.3× larger than it needs to be.
install.shfetches the full
authbridge-proxy, which links 13 plugins; a laptop uses 4. - Plugin linkage has three conventions, so nobody can say what a given artifact contains
without reading build tags across twocmd/trees.
All figures below are measured on darwin/arm64 with the exact release flags
(-trimpath -ldflags "-s -w" CGO_ENABLED=0). The default build reproduced the installed
binary to within 0.15%, so the method is sound.
| Variant | Plugins | On disk | gzip -9 |
|---|---|---|---|
default — what install.sh ships today |
13 | 33.4 MiB | 10.6 MB |
local — 3 parsers + tool-prune |
4 | 14.3 MiB | 5.4 MB |
lite — today's published variant |
4 (different 4) | 15.1 MiB | 5.7 MB |
default + sessionbudget |
14 | 39.3 MiB | — |
default + contextguru |
14 | 49.7 MiB | — |
| everything | 15 | 55.5 MiB | 16.4 MB |
abctl (no plugin tags apply) |
— | 8.1 MiB | 3.1 MB |
linux/amd64: default 34.6, local 14.9, everything 57.7 MiB.
Desktop footprint 41.5 → 22.4 MiB (−46%); download 13.7 → 8.5 MB (−38%).
Note contextguru alone costs +16.3 MiB and sessionbudget +5.9 MiB. Neither ships in any
published variant today. Any definition of "full" that means everything inflates the
Kubernetes image 33.4 → 55.5 MiB, a 66% regression — see H1.
The desktop plugin set is already written down
cmd/authbridge-proxy/local.go writes exactly this into ~/.cortex/config.yaml:
plugins:
- name: inference-parser
- name: mcp-parser
- name: a2a-parser
- name: tool-prunewith the comment "this one already carries both the parsers and tool-prune." The runtime config
is the spec; build tags should be derived from it, not maintained as a parallel allowlist.
Proposed Solution
1. One convention: every plugin is opt-in
include_plugin_<name> becomes the only tag form. exclude_plugin_* is deleted — with
nothing linked by default there is nothing to exclude.
| Site | Today | After |
|---|---|---|
cmd/authbridge-proxy/plugins_*.go |
13 !exclude_plugin_* + 2 include_plugin_* |
15 include_plugin_* |
cmd/authbridge-envoy/plugins_*.go |
3 !exclude_plugin_* + 2 include_plugin_* |
13 include_plugin_* |
cmd/authbridge-envoy/main.go |
8 unconditional blank imports (lines 52-59) | 0 — moved into tagged files |
- Flip 16 files to
include_plugin_<name>; delete everyexclude_plugin_*tag - Move envoy's 8 unconditional imports into tagged
plugins_*.gofiles. Today
-tags exclude_plugin_opasilently does nothing for the envoy binary — a plugin that
cannot be excluded, with no error to say so - Replace
authbridge/scripts/lite-tags(emits exclude tags) with a profile generator
emitting include tags from a single manifest:local,full,envoy,cpex - Update the three call sites:
build.yaml:155,release-binaries.yaml:129,
local-build-and-test.sh:99
Why opt-in and not opt-out: opt-out forces the default to 55.5 MiB. It also removes today's
implicit rule — "opt-in if the plugin is heavy" — which is the only reason contextguru and
sessionbudget differ from the rest. A zero-plugin build is already an anticipated state:
authlib/plugins/deps.go:68 warns "No registered plugins -- Build with --tags".
2. Artifacts
| Binary × 4 targets | Plugins | Size |
|---|---|---|
abctl |
n/a | 8.1 MiB |
authbridge-proxy (default, unsuffixed) |
local 4 | 14.3 MiB |
authbridge-proxy-full |
today's 13 — NOT everything | 33.4 MiB |
- Default (unsuffixed) artifact carries the local set.
install.sh:872already fetches the
unsuffixed name, so the installer needs no change - Publish
-fullfor Kubernetes, built from the generatedfullprofile - Retire
-liteand-sessionbudget: 16 tarballs → 12, proxy builds 12 → 8 - Container images 6 → 5:
authbridgebuilt from thefullprofile,authbridge-lite
retired. No new image — laptops consume binaries, not images
3. Guard tests
- Fail if
exclude_plugin_appears anywhere in the repo - Fail if a plugin package is imported outside a tagged
plugins_*.go - Assert each profile's linked set equals its manifest entry
- Size budget: fail if the
localartifact exceeds a threshold.contextguruproves one
plugin can add 16 MiB -
--plugins(or/config) prints the linked set.plugins.RegisteredPlugins()already
exists; surfacing it makes a variant visible instead of mysterious
Known holes
H1 — "full = everything" is a measured 66% regression. -full must mean today's 13-plugin
set. Excluding contextguru (+16.3 MiB) and sessionbudget (+5.9 MiB) keeps exact parity with
today's authbridge image.
H2 — upgrades break existing installs. Highest severity. writeBuiltinConfig in local.go
deliberately keeps an existing ~/.cortex/config.yaml
("keeping the existing config (edits and any prune list are preserved)"). A config naming a
plugin the local build no longer links makes the proxy refuse to start:
unknown plugin "token-exchange" (registered: [a2a-parser inference-parser mcp-parser tool-prune]).
The fail-closed check that protects us at runtime becomes the failure mode on upgrade.
cmd_config_migrate.go exists, so this config has changed shape before and stale or hand-edited
configs are likely in the wild.
- Detect unlinked plugin names in an existing config on upgrade and migrate or fail with an
actionable message. Must be covered by feature: verified macOS install and launchd service lifecycle #944, feature: verified Linux install and systemd service lifecycle #945 and test: verify the installed Cortex service survives reboot on macOS and Linux #964
H3 — the flip creates silent no-op tags. Go does not error on an unsatisfied build tag. Any
existing -tags exclude_plugin_opa invocation silently becomes a no-op, including the documented
examples at authbridge/README.md:441,451,455. Guard test 1 covers this repo; downstream users
need a release-note callout.
- Release note:
exclude_plugin_*is removed and now does nothing
H4 — a forgotten include silently drops a plugin from production. Today "no tags" means
everything, so a new plugin auto-reaches the authbridge image. Afterwards the full set must be
explicit, which is exactly why it has to be generated from source rather than hand-listed.
H5 — retiring -lite touches six places, one in shipped code.
-
cmd/abctl/cluster/cluster.go:21contains"authbridge-lite": {} -
local-build-and-test.sh:92-104,125builds and kind-loads it -
build.yamlimage matrix entry -
release-binaries.yamlvariant array and its generated release-notes text -
authbridge/scripts/lite-tagsmodule, plus stale.gitignore:79path - ~10 markdown files including
README.md,CLAUDE.md,plugin-catalog.md,
plugin-reference.md,laptop-service.md - Delete lingering
*_main-latest_*assets by hand, perrelease-binaries.yaml:229-233
H6 — "nobody uses lite" is documentation, not telemetry. CLAUDE.md:231 says it is
"not yet referenced by the operator's default config", which is good evidence for the product
path. But the image is public on ghcr and advertised in every release's notes, and the packages
API could not be queried to confirm external pulls. Decide whether this needs a deprecation cycle
rather than a straight delete.
H7 — asymmetric defaults need documenting. Release notes currently assert
"unqualified (default plugin set, matches the authbridge image)". Afterwards the unsuffixed
binary is local and the unsuffixed image is full. Coherent per audience, a trap if silent.
H8 — this is the last plugin-side win. After the change abctl is 8.1 MiB of the 22.4 MiB
footprint and no plugin tag touches it; the proxy's remaining ~10 MiB is base (Go runtime,
authlib, listener, tlsbridge, storage). Further size work targets those, not the plugin set.
H9 — go test ./cmd/... yields zero plugins once nothing is default-on. CI must pass profile
tags to tests. authlib/plugins/injection_coverage_test.go is unaffected — it inspects source via
go/ast, not the linked registry.
H10 — check the set against this release's own scope. #724 "Surfacing outbound pipeline
denials" is a P1 in epic #962, but denials come from opa / ibac / sparc, none of which are
in the local set. Either #724 is cluster-only, or the local profile needs revisiting. Resolve
before the tag set is frozen.
Additional Context
Part of the Cortex v0.9.0 release, epic #962.
Relationship to #721, which frames this as "static linking forces a bloat-vs-variant tradeoff"
and proposes a runtime-extensible plugin model: #721 is deferred past v0.9.0. This issue takes the
variant side of that tradeoff using build tags that already exist, and does not preclude #721.
Supports exit criteria 1 and 5 — a smaller, purpose-built download whose contents can be stated
exactly.
Correction recorded
An earlier revision of this issue suggested pointing install.sh at authbridge-proxy-lite. That
was wrong. scripts/lite-tags keeps only jwtvalidation, tokenexchange, litellm_budgettrack
and staticinject — a sidecar minimum that excludes all three parsers and tool-prune.
Shipping -lite to laptops would give a small binary that cannot show a single token count. The
measurements above confirm the two sets are near-identical in size (14.3 vs 15.1 MiB) and
completely different in content.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]feature: minimize the desktop release artifact — ship a fixed plugin set for desktop use[/-][+]feature: one plugin convention (all opt-in) and a minimal desktop artifact[/+]fix(authbridge): run the plugin guards in CI and reject untagged imag…
refactor(authbridge): single plugin taxonomy, and close two guard bli…
refactor(authbridge): make every plugin opt-in behind one convention
huang195 commentedon Sep 16, 2026
This is done in #970
docs: Exempt the planning doc from the retired-plugin-tag guard
docs: Exempt the planning doc from the retired-plugin-tag guard
fix: Address round-2 review findings on the real-systemd test
fix: Address round-2 review findings on the fake-harness PR