Skip to content

fix(046): persist LauncherWaitTimeout to BBolt + regenerate OAS#454

Merged
Dumbris merged 3 commits into
mainfrom
fix/spec-046-launcher-timeout-persistence
May 12, 2026
Merged

fix(046): persist LauncherWaitTimeout to BBolt + regenerate OAS#454
Dumbris merged 3 commits into
mainfrom
fix/spec-046-launcher-timeout-persistence

Conversation

@Dumbris

@Dumbris Dumbris commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #452 (spec 046 local launcher for HTTP/SSE upstreams). #452 was merged with two CI failures because the org-owned fork blocked maintainer pushes; this PR makes main green again.

  • TestSaveServerSyncFieldCoverage (internal/storage): the reflection guard verifies every ServerConfig field is either persisted to UpstreamRecord or explicitly whitelisted. The new LauncherWaitTimeout field needed handling. Following the ReconnectOnUse precedent from spec 354, persisted it to BBolt rather than marking it config-file-only — this way launcher servers added via the REST upstream_servers API retain the timeout across restarts instead of silently dropping it.
  • Verify OpenAPI Artifacts: regenerated oas/swagger.yaml + oas/docs.go via make swagger so the drift check passes.

Changes

  • internal/storage/models.go — add LauncherWaitTimeout config.Duration to UpstreamRecord (JSON tag launcher_wait_timeout,omitempty).
  • internal/storage/manager.go — wire it through SaveUpstreamServer / GetUpstreamServer / ListUpstreamServers.
  • internal/storage/async_ops_test.go — whitelist LauncherWaitTimeout in expectedFields with a Spec 046 comment.
  • oas/{docs.go,swagger.yaml} — regenerated.

Test plan

  • go test ./internal/storage/ -count=1 — green locally
  • go build ./... — green locally
  • TestSaveServerSyncFieldCoverage now passes (reproduced the original failure first, then fixed)

Credit for spec 046 belongs to @electrolobzik — this PR only patches the persistence/OAS gap.

- Add LauncherWaitTimeout to UpstreamRecord so launcher servers added via
  the REST upstream_servers API retain the timeout across restarts. Wired
  through SaveUpstreamServer / GetUpstreamServer / ListUpstreamServers,
  matching the ReconnectOnUse precedent from spec 354.
- Whitelist LauncherWaitTimeout in TestSaveServerSyncFieldCoverage so the
  ServerConfig field-coverage guard accepts the new field.
- Regenerate oas/swagger.yaml + oas/docs.go so the Verify OpenAPI
  Artifacts CI step stops complaining about drift.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 12, 2026

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 569e8cd
Status: ✅  Deploy successful!
Preview URL: https://3411524e.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-spec-046-launcher-timeou.mcpproxy-docs.pages.dev

View logs

reap() called cmd.Wait() before pumpWG.Wait(). Per exec.Cmd docs, Wait
closes the parent-side stdout/stderr pipes as part of its cleanup — so
if Wait ran before both pump goroutines reached EOF, the pump scanners
could race against that close and observe EOF with buffered child
output still in the kernel pipe, silently dropping it.

CI repro: TestSpawn_LogSinkCaptured on Linux runners (Unit Tests amd64
and Build Binaries linux-arm64) saw the sink contain only the startup
banner, no [launcher stdout]/[launcher stderr] lines. Locally the test
passed because timing happened to favor pumps. 20x -race iterations
green after flipping the order.

Pumps naturally hit EOF when the child exits and the kernel propagates
the close — calling Wait() is not what unblocks them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Windows GitHub runners have something bound on 127.0.0.1:80 (IIS/WinNAT
default), so the test's "should be unreachable" assertion failed: the
dial succeeded and WaitForURL returned nil where the test expected a
"not reachable" error.

Switched the host to 192.0.2.1 (TEST-NET-1, RFC 5737) — reserved for
documentation and guaranteed non-routable, so the dial fails
consistently on every OS while still exercising default-port inference
from the URL scheme.

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

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/spec-046-launcher-timeout-persistence

Available Artifacts

  • archive-darwin-amd64 (26 MB)
  • archive-darwin-arm64 (23 MB)
  • archive-linux-amd64 (15 MB)
  • archive-linux-arm64 (13 MB)
  • archive-windows-amd64 (26 MB)
  • archive-windows-arm64 (23 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (19 MB)
  • installer-dmg-darwin-arm64 (18 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 25756022180 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris Dumbris merged commit 45a06d9 into main May 12, 2026
23 checks passed
@Dumbris Dumbris deleted the fix/spec-046-launcher-timeout-persistence branch May 12, 2026 19:17
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.

2 participants