Skip to content

feat(sdk/go): add service discovery snapshots, watches, and scopes - #4958

Draft
TaylorMutch wants to merge 1 commit into
feat/4954-sandbox-proxy/TaylorMutchfrom
feat/4955-go-service-discovery/TaylorMutch
Draft

TaylorMutch wants to merge 1 commit into
feat/4954-sandbox-proxy/TaylorMutchfrom
feat/4955-go-service-discovery/TaylorMutch

Conversation

@TaylorMutch

@TaylorMutch TaylorMutch commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Expose service discovery through the curated Go SDK so external infrastructure consumers use the same API as the sandbox proxy. Keep the example Kubernetes HTTPRoute controller on its separate POC branch.

Rebased onto main at 2c31ac7e6. Stacked on feat/4954-sandbox-proxy/TaylorMutch.

Related Issue

Closes #4955. Part of RFC 0017.

The linked issue has no state:accepted label; the author has verified repository ADMIN access.

Changes

  • Add ServiceRoutes().Snapshot/Watch for one workspace and SnapshotFor/WatchFor for selected or all workspaces.
  • Use protobuf-independent domain types with validated deep-copy conversions and scope containment checks.
  • Define explicit Recv/Close, cancellation, EOF, and server-error behavior without hidden reconnects or prefetch.
  • Add bufconn/converter tests, regenerated bindings, and SDK documentation.

Release Notes

Testing

  • Latest main rebase (2c31ac7e6): 2,553 server tests passed (34 ignored), 211 supervisor + 310 Kubernetes driver tests, 8 proxy tests, full Go SDK CI, 431 gateway + 6 workspace + 6 proxy Helm tests, and full repository pre-commit checks passed. All eight rebased layers independently passed locked Rust compilation with test targets. Dedicated supervisor rendering also verifies destination-CA delivery with the app listener enabled and disabled. Signed-OIDC browser regression covers hashed-host login, single-use redemption, authenticated sessions, cross-installation rejection, and anonymous denial.
  • After the internal RPC separation in feat(supervisor): advertise accepted application route installations #4940, this rebased layer independently passed locked Rust compilation with test targets.
  • Updated stack tip: 2,494 server library tests passed (34 ignored), 306 Kubernetes driver tests, RPC tracing coverage, SDK binding regeneration, and full repository pre-commit checks passed. The public discovery schema and generated SDK bindings are unchanged by the internal RPC refactor.
  • Earlier HA validation, before the internal RPC separation: 3,136 runtime library tests passed (34 ignored), 48 Rust SDK mock tests, 8 proxy tests, full Go SDK CI, and 412 gateway + 6 workspace + 6 proxy Helm tests passed.
  • Combined stack: full repository pre-commit (including strict Clippy), strict docs, and navigation checks passed.
  • Earlier live Kubernetes validation, before the internal RPC separation: two gateways, shared supervisors, and proxy replicas; direct/proxy TLS and HTTP/WebSockets, abrupt owner-process loss/recovery, populated 2→1→2→1 scaling, route renewal/withdrawal, and discovery grant narrowing/regrant passed. Workload Pod identity, PID, and in-memory state survived owner handoff.

Qualification limits

Live HA validation exercised supervisor process/Pod loss on a local k3d cluster. Whole-node failure, real network partitions, metric-driven HPA, sustained production load, and published release artifacts remain unqualified. Grant-file projection contributes to revocation propagation time. Main now includes #4842 for gateway-mediated hashed hostnames. Direct application-listener/discovery hostnames remain readable; extending hashed naming to that path and installation-status presentation (#4670) remain separate work.

The example Kubernetes HTTPRoute controller is a deferred compatibility POC outside this stack.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Relevant implementation, configuration, and API documentation updated

PR dependency order: #4936 → #4940 → #4941 → #4956 → #4963 → #4964 → #4957 → #4958.

@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@TaylorMutch
TaylorMutch added this pull request to stack #4942 October 27, 2026 02:54
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from 54b31d9 to e9e5042 Compare October 27, 2026 03:15
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from d51549f to 6d0cb1e Compare October 27, 2026 03:15
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from e9e5042 to a12adf6 Compare October 27, 2026 05:42
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 6d0cb1e to 151ee71 Compare October 27, 2026 05:42
@TaylorMutch
TaylorMutch removed this pull request from stack #4942 October 27, 2026 05:45
@TaylorMutch TaylorMutch changed the title feat(sdk/go): add workspace service discovery client feat(sdk/go): add service discovery snapshots, watches, and scopes Oct 27, 2026
@TaylorMutch
TaylorMutch added this pull request to stack #4965 October 27, 2026 05:46
@TaylorMutch
TaylorMutch removed this pull request from stack #4965 October 27, 2026 05:47
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from a12adf6 to e01a394 Compare October 27, 2026 06:24
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 151ee71 to 7624c50 Compare October 27, 2026 06:24
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from e01a394 to 6678680 Compare October 27, 2026 06:25
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch 2 times, most recently from 5415439 to 8b71a26 Compare October 27, 2026 06:46
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from 6678680 to 69ca4b5 Compare October 27, 2026 06:46
Expose a narrow service discovery client with protobuf-independent domain
types, validated deep-copying conversions, and explicit stream lifecycle.
Preserve single-workspace calls and add SnapshotFor/WatchFor for finite
workspace sets or platform scope, with scope containment checks.

Closes #4955
Refs #4668

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 8b71a26 to 7cae154 Compare October 27, 2026 21:06
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from 69ca4b5 to b83f71c Compare October 27, 2026 21:06

This branch has not been deployed

No deployments
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.

1 participant