fix(plugins): keep root help responsive#1935
Open
stephenlclarke wants to merge 3 commits into
Open
Conversation
Import apple#1862 unchanged on top of current Apple main, preserving the original author and implementation.
Exercise the timeout, caller-cancellation, late-reply, client-reuse, and unknown-route paths introduced by apple#1862.
Use a one-second API health deadline for container --help, container help, and bare container while preserving the normal ten-second plugin dispatch deadline. Fall back to built-in help when the daemon is unavailable. Depends on the cancellable XPC request handling from apple#1862 and supersedes apple#1838 for apple#1459.
This was referenced Jul 11, 2026
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.
Type of Change
Motivation and Context
Root help currently performs daemon-backed plugin discovery before it can print. If the API service is registered but not replying,
container --help,container help, and barecontainercan appear to hang.Related to #1459. Supersedes #1838, whose fork branch was deleted after the PR was closed.
This PR is intentionally stacked on #1862:
main, preserving its original author and implementation in a standalone commit.What Changed
invalidArgumentfor unknown XPC routes instead of leaving clients waiting.container --help,container help, and barecontainerin integration tests.Testing
Validation:
make allmake testmake swift-fmt-checkswift test --disable-automatic-resolution --filter 'ApplicationPluginDiscoveryTests|XPCClientTests': 8 tests passedXPCReplyBox.swiftreached 100% line, function, and region coverage; every new help-policy branch was executedcontainer --help,container help, barecontainer, andcontainer --debug helppassedThe full integration matrix also exposed repository-baseline failures unrelated to this diff:
Three serial
.dockerignoretests failed with four assertions.The same three tests fail identically from a clean worktree at unmodified Apple
main(5f277a9).The default 18-way run also saturated host forwarding; all 32 tests in the affected run-command suite passed when rerun serially.
git diff --check origin/main..HEAD