• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 27435189522
67%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2026 06:37PM UTC
Jobs 1
Files 758
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 06:30PM UTC coverage: 66.655% (+0.02%) from 66.637%
27435189522

push

github

web-flow
Add RunConfig seam for injected middleware configs (#5495)

* Add RunConfig seam for injected middleware configs

The operator's external-auth handlers (e.g. the enterprise OBO handler)
build a complete types.MiddlewareConfig and need a way to hand it to the
RunConfig the proxyrunner reads. Upstream had no such path: the builder
exposed no append-style middleware option, and PopulateMiddlewareConfigs
rebuilds MiddlewareConfigs from typed fields, overwriting anything a
handler set. The runtime factory for these types is already registered,
so the only missing piece is an operator-to-RunConfig carrier.

Add a generic, OBO-agnostic seam in pkg/runner so a handler reached via
*[]RunConfigBuilderOption can inject pre-built configs that survive
population:

- RunConfig.AdditionalMiddlewareConfigs: JSON/YAML-serializable carrier
  for handler-supplied middleware configs.
- WithAdditionalMiddlewareConfigs: builder option with append semantics
  (multiple calls/args additive, nil entries skipped).
- PopulateMiddlewareConfigs splices the carrier into the backend-egress
  group — after auth and header-forward, before recovery — so an
  injected egress middleware has the final say on the outbound request.

Upstream carries the configs verbatim and never inspects their
parameters; the type identity is supplied by the caller. No OBO or
enterprise symbol is introduced. Regenerated the server swagger spec for
the new field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Document seam constraints and pin idempotency

Addresses stacklok/toolhive#5495 review comments:
- LOW pkg/runner/config_builder.go (3397799561): note the injected configs
  are consumed only by PopulateMiddlewareConfigs (operator path); the CLI
  flag path ignores AdditionalMiddlewareConfigs
- LOW pkg/runner/middleware.go (3397799567): document that the carrier is
  intentionally not cleared — idempotent overwrite plus serialized fallback
- LOW pkg/runner/middleware_test.go ... (continued)

9 of 9 new or added lines in 2 files covered. (100.0%)

68347 of 102539 relevant lines covered (66.65%)

63.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27435189522.1 12 Jun 2026 06:37PM UTC 758
66.65
GitHub Action Run
Source Files on build 27435189522
  • Tree
  • List 758
  • Changed 8
  • Source Changed 4
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27435189522
  • 7d1ebf51 on github
  • Prev Build on main (#27434058592)
  • Next Build on main (#27447622462)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc