feat(core): support strict plugin activation waits - #46615
Closed
kitlangton wants to merge 1 commit into
Closed
Conversation
kitlangton
force-pushed
the
strict-plugin-readiness
branch
from
September 1, 2026 15:44
b350c7a to
f217621
Compare
kitlangton
force-pushed
the
strict-plugin-readiness
branch
from
September 1, 2026 19:38
f217621 to
7c8eda8
Compare
Contributor
Author
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.
Why
An instance constructor may need to reject a plugin generation that could not activate, such as host and instance definitions sharing a plugin ID. Core's normal
awaitActivationdeliberately reports settlement, not success, and logs generation failures without failing the waiter.Constructors need an opt-in way to observe that failure without changing readiness behavior for existing callers.
What Changes
Add
PluginSupervisor.configured({ failOnError: true })for graph replacements:The strict readiness wait propagates the settled activation result. The ordinary node and omitted or false options retain log-and-continue behavior.
Generation failure is distinct from an individual plugin's setup failure: setup failures remain in plugin inventory. Consumers still decide which individual plugins are required.
Scope
Core capability prerequisite extracted from #46496, not a change to default readiness policy. SDK instance selection and admission policy remain in that dependent PR.
The former shared build prerequisite landed independently in
43d09b9d75; this PR now targetsv2directly.Verification
Using Bun 1.4.0, from
packages/core:After rebasing onto
v2ate2e82f18e2, the focused regression suite passed 57 tests and the eight readiness cases passed 80/80 repeated runs. Core typechecking, formatting, Effect AST rules, and diff checks passed. Scoped lint had no errors and one warning on an unchanged spread expression. Upstream's sanitized plugin-load errors, diagnostic references, and regression assertions are preserved. The normal pre-push workspace typecheck passed all 33 tasks.The collision regression now uses an actual host/builtin duplicate ID; the old test registered the same host ID twice, which only overwrote a Map entry. Against the previous log-only behavior, the three non-strict cases pass and the strict assertion fails as expected.
Coverage includes gated package activation, isolated waiter interruption, coalesced pending updates, failure followed by successful reload, repeated waits, and individual setup failures remaining in inventory. The unchanged 24-hour timer was not time-advanced.
Earlier CI failed in the separate shell-retention stress test (#46610). The TUI Home-fixture repair landed independently in #46618; upstream later removed the scroll fixture in #46640, so #46620 was closed as superseded. None of those changes is part of this capability diff.
At the rebased head, run
33550675221passed the Linux unit suites, then failed the generated-documentation check: the website OpenAPI copies in basev2omit the diagnosticrefadded in #46594. Windows exited with a native Bun 1.4.0 segmentation fault during the TUI suite, not a reported test assertion; its cause is not established. No documentation repair or crash workaround is included here.