Skip to content

host: Let embedders discover the points an extension offers - #22

Open
vvoland wants to merge 4 commits into
moby:mainfrom
vvoland:fix-outofprocess-servicev0
Open

vvoland wants to merge 4 commits into
moby:mainfrom
vvoland:fix-outofprocess-servicev0

Conversation

@vvoland

@vvoland vvoland commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Embedders had to know each offered point in advance to look up its services, and could not resolve out-of-process offers through servicev0. Proxies that missed a point returned Unimplemented for its services.

Build a servicev0 provider from each launched extension's declaration. Apply the same admission policy as for other providers and include only points the policy admits.
Stop the extension if no providers remain.

Leave service exposure and reserved names to the embedder. Let grpcproxy route an offered point by proto package rather than by individual service name, while rejecting reserved names and overlapping routes.

/moby-pr=54306

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical gaps leave offered services unregistered when the servicev0 provider marker is absent and misroute valid services whose package differs from the Point ID, causing admission bypasses and Unimplemented responses.

2 open issues
What changed in this PR

This PR makes offered Points discoverable through servicev0 for both in-process and launched extensions, while leaving service exposure to the embedder.

Changes:

  • Applies provider admission to offers, filters dropped providers, and stops fully dropped extensions.
  • Replaces Host-managed service publication with embedder-controlled registration or proxying.
  • Adds proto-package routing with reserved-name and overlap checks, alongside updated tests and documentation.
File Description
README.md Explains offer discovery and embedder-owned exposure.
host/​socket_test.go Tests discovery and exposure for builtin and launched extensions.
host/​host.go Synthesizes and filters offer providers; removes Host publication APIs.
host/​host_internal_test.go Updates admission, filtering, and adapter tests.
grpcproxy/​routes_test.go Tests package routes and conflict rejection.
grpcproxy/​proxy.go Adds package routing and runtime-namespace protection.
grpcproxy/​proxy_test.go Tests package forwarding and updates route construction.
docs/​DESIGN.md Documents the revised discovery and exposure architecture.
docs/​AUTHORING.md Shows embedder wiring for registration and package proxying.
core.go Updates metadata-admission comments; no functional change.

Review effort: Balanced

Comment thread docs/AUTHORING.md Resolved
Comment thread host/host.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active issues allow duplicate or empty backend IDs to bypass route-overlap detection and route services to the wrong connection, while providers with empty offers can bypass rejection policy.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve empty-offer providers until policy admission

host/​host.go:747

When a launched extension declares servicev0.Point with no offers, this condition removes the provider before policy admission, so even Reject is ignored. If it is the only provider, the process is treated as genuinely providerless and initialized instead of closed under a drop-all policy. Preserve the metadata provider for empty offer lists and let restrictOffers remove it after admission.

2 resolved since last review

Review effort: Balanced

Comment thread grpcproxy/proxy.go Resolved
Embedders had to know each offered point in advance to look up its
services, and could not resolve out-of-process offers through servicev0.
Proxies that missed a point returned Unimplemented for its services.

Build a servicev0 provider from each launched extension's declaration.
Apply the same admission policy as for other providers and include only
points the policy admits.
Stop the extension if no providers remain.

Leave service exposure and reserved names to the embedder.
Let grpcproxy route an offered point by proto package rather than by
individual service name, while rejecting reserved names and overlapping
routes.

Signed-off-by: Paweł Gronowski <git@grono.dev>
A launched extension could serve an offered point in a different proto
package from its point ID.
Routing by point ID missed those services, and routing a whole package
could also expose unrelated services.

Expose the reported service names for each admitted process offer via
Host.OfferedServices.
Use exact routes in the embedder example and exercise a mismatched
point and package in the socket test.

Signed-off-by: Paweł Gronowski <git@grono.dev>
…vider

The SDK derives OfferedPoints from the servicev0 provider, but the
launcher accepted a nonempty list without that provider.
Reject inconsistent declarations during Describe, before admission or
initialization. Extensions that offer nothing need no marker.

Signed-off-by: Paweł Gronowski <git@grono.dev>
The moby-integration job always built moby/moby master against the
PR's extensions code.
A PR that changes an API Moby uses could not pass until Moby adopted
the change, and Moby could not adopt it before the PR merged.

Read a "/moby-pr=<number>" line from the PR description and check out
that Moby PR's head instead of master.
The body is fetched at run time so re-runs pick up edits.
The extensions replace still overrides whatever extensions version the
Moby PR pins.
Without the directive, and on pushes, the job keeps using master.

Signed-off-by: Paweł Gronowski <git@grono.dev>
@vvoland
vvoland force-pushed the fix-outofprocess-servicev0 branch from afafae0 to 40723dc Compare November 27, 2026 22:16
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