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.

Based on main at d7b616895. Stacked on feat/4954-sandbox-proxy/TaylorMutch.

Related Issue

Closes #4955. Part of RFC 0017.

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

  • Hostname integration: 111 standalone application-URL-layer tests and 120 combined-stack routing/schema regressions passed, including shared shutdown fencing and ingress URL stability. Go SDK CI, strict Clippy for affected crates, protobuf/docs/Mermaid lint, and lockfile checks passed.
  • 40 focused combined-stack Rust regression tests cover listener routing, route-limit concurrency, shutdown fencing, advertisements, discovery, and proxy behavior.
  • Local k3d validated the Service removal with dedicated push/poll, abrupt shared-owner takeover, HTTP/WebSockets, network-policy denial, freshness/withdrawal, outage recovery, and disabled-listener gateway access. Workload identity and memory survived owner changes.
  • Real Go SDK snapshots/watches and workspace-restricted discovery credentials drove two proxy replicas; both followed Pod-IP endpoints, graceful owner handover, and route withdrawal without per-sandbox app Services.
  • Helm lint/unit/parser/coherence/scaling checks, Python lint/format/type checks, and topology assertions passed.

Live Kubernetes validation preceded integration of the latest listener hardening;
focused Rust regressions validate that final integration. New-head CI is pending.

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. Both ingress paths now share the gateway hostname format and label generator. The same installation identity and public HTTPS domain/port preserve service URLs when switching ingress. Installation-status presentation (#4670) remains separate work. Live Kubernetes runs above preceded hostname integration; the naming and shutdown-fence integration is validated by focused Rust regressions.

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
@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
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 7cae154 to 299e56b Compare October 28, 2026 17:05
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch 3 times, most recently from e847dfd to f294b2e Compare October 29, 2026 01:16
@rhuss

rhuss commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Heads-up: the Go SDK moves to ai-openshell/sdk-go on 2026-11-03 (details in #5031). This PR depends on server-side work that has not shipped yet, so its SDK layer is ported once that work is in a core release the new repository pins. Until then it stays here as is.

@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 43d66d7 to b74077d Compare October 30, 2026 17:57
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch 2 times, most recently from e61baf7 to b5cfc8e Compare October 30, 2026 18:13
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch 2 times, most recently from 310d2a2 to 7e291af Compare October 30, 2026 21:11
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch 2 times, most recently from 0edce63 to 66cd349 Compare October 30, 2026 23:00
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 7e291af to 5f04422 Compare October 30, 2026 23:00
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from 66cd349 to 9e85e14 Compare October 31, 2026 04:33
@TaylorMutch
TaylorMutch force-pushed the feat/4954-sandbox-proxy/TaylorMutch branch from 5f04422 to 097b630 Compare October 31, 2026 04:33
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 097b630 to b9d8337 Compare October 31, 2026 04:40
@TaylorMutch
TaylorMutch force-pushed the feat/4955-go-service-discovery/TaylorMutch branch from 9e85e14 to 03783bd Compare October 31, 2026 04:40

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.

2 participants