Repository navigation
Ship and verify the packaged host plugin worker - #1790
Merged
Merged
Conversation
ymichael
marked this pull request as ready for review
August 18, 2026 18:22
ymichael
pushed a commit
that referenced
this pull request
Aug 18, 2026
## Problem Keep Awake's `experimental_onWorkerExit` handler called `requestReconcile()`, which forces an immediate pass and skips the retry backoff. When a host worker crashes on start (see #1790 for the packaging cause), the server loops every ~80ms: ``` Keep Awake host worker exited unexpectedly on host host_...; retrying Could not reconcile Keep Awake on host host_...: host plugin worker exited (1) ``` One log file collected 60k+ of these lines. ## Change - `plugins/keep-awake/server.ts`: worker exits now request a *retry*, which waits for the exponential backoff (1s → 2s → … → 30s cap). Configuration changes and host connects still reconcile immediately. - `plugins/keep-awake/server.test.ts`: fake-timer tests for the delayed retry and the crash-loop backoff. The crash-loop test spins forever on the old code. This is the plugin-side half of #1790, split out so it can land now. The packaging fix (ship `bb-plugin-host-worker.mjs`) stays in #1790. ## Verification `turbo run test typecheck --filter=bb-plugin-keep-awake` passes. > AGENT GENERATED: by Claude Opus 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
Bundle, package, resolve, and validate the host plugin worker in bb-app releases.
ymichael
force-pushed
the
bb/fix-keep-awake-worker-exit-thr_hh3dtrmbwv
branch
from
August 18, 2026 18:29
5320b8f to
c20e077
Compare
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.
Problem
Packaged
bb-appdaemons fail every host plugin call withhost plugin worker exited (1). Their stderr reports that neither the compiled worker nor its TypeScript development fallback exists in the installed package.defaultWorkerEntryPath()looked forplugin-host-worker.jsbesidedaemon-bundle.mjsand fell back to the.tssource. The published package contained neither: the bundle manifest had no worker target, and thebb-apppackage whitelist only shipped the.mjsbundles.The Keep Awake-specific retry mitigation was split out and merged in #1792. This PR now contains only the general packaging fix and its release-level coverage.
Changes
bb-plugin-host-worker.mjsbundle..mjsworker first while retaining compiled-development and source-development fallbacks.bb-appand require it during launcher artifact validation.No daemon wire contract changed, so no
HOST_DAEMON_PROTOCOL_VERSIONbump is needed.Verification
turbo run typecheck --filter=@bb/host-daemon --filter=bb-appturbo run test --filter=@bb/host-daemon --filter=bb-app --force(583 host-daemon tests and 65 bb-app tests)turbo run smoke:tarball --filter=bb-app --force(direct packed worker, full stack, and two-daemon enrollment)git diff --check