fix: surface bundle startup failures to workspace log, SSE, and health (#7)#23
Open
mgoldsborough wants to merge 1 commit intomainfrom
Open
fix: surface bundle startup failures to workspace log, SSE, and health (#7)#23mgoldsborough wants to merge 1 commit intomainfrom
mgoldsborough wants to merge 1 commit intomainfrom
Conversation
#7) Previously, when startBundleSource threw inside startWorkspaceBundles, the error was written to process.stderr and silently dropped — the bundle simply vanished from the registry, from workspace JSONL logs, from SSE clients, and from /v1/health. Operators had to tail container logs to know a bundle was down; users saw "App X is not available" with no context. Root cause: the catch block had no reference to the EventSink and no way to inform HealthMonitor (the failed bundle never became an McpSource, which is HealthMonitor's only input). Fix: - Add a bundle.start_failed EngineEventType. - startWorkspaceBundles now accepts the EventSink and, on catch, emits bundle.start_failed and returns a BundleStartFailure[] that the caller can forward to HealthMonitor. - Runtime.start stores the failure list and exposes it via getStartFailures(); the API server constructs HealthMonitor with those records so /v1/health shows the bundle as `dead`. - bundle.start_failed is added to WORKSPACE_EVENTS (JSONL log) and to the SSE forwarding list. - HealthMonitor.getStatus() merges live records with start-failure records, suppressing a failure record when a source with the same name later came up (so a successful retry hides the earlier attempt). Startup-continues-on-failure behavior is preserved — the workspace registry is still created, platform tools still work, and other bundles still start.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Startup-continues-on-failure behavior is preserved — the workspace registry is still created, platform tools still work, and other bundles in the same workspace still start.
Test plan
Closes #7