Skip to content

feat(registrar): mesh-wide service catalog in every agent (hybrid index) - #169

Merged
bpalermo merged 1 commit into
mainfrom
feat/service-catalog
Jun 13, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/service-catalog

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Part 1 of the ODCDS convergence plan (hybrid full-name-index / scoped-endpoints, per design discussion).

  • SERVICE_ADDED/SERVICE_REMOVED on the existing watch stream; transitions derived inside Snapshot.Apply/Replace (0↔1 endpoint crossings) — impossible to desync.
  • Catalog events bypass the per-service broadcaster index (rare, deploy-time); full catalog replay on (re)connect, client swaps wholesale at SNAPSHOT_COMPLETE (only when state was resent — a current client keeps its catalog).
  • ODCDS observer gates on registry.ServiceCatalog: ghosts never touch dep set/filter/reload; aether.agent.upstreams.rejected counter.
  • Phase 2 fan-out property fully preserved; agent memory cost ≈ service-name strings.

Part 2 (next PR): catalog-gated RPC-fill in the reload + leading-edge dep-change trigger + watch-cache purge on filter shrink + on_demand timeout 5s→2s.

🤖 Generated with Claude Code

Every agent now keeps a full local index of mesh service NAMES while
endpoints stay demand-scoped — the hybrid that preserves Phase 2's
fan-out property (per-change cost = consumer count) and gives the
ODCDS cold path a local existence oracle.

Protocol: SERVICE_ADDED/SERVICE_REMOVED events on the existing watch
stream. A service exists while it has >=1 endpoint; transitions are
derived inside Snapshot.Apply/Replace (0<->1 crossings, service-set
diffs) so the catalog cannot desync from the endpoint data it
summarizes. Catalog events BYPASS the watch filter (they are rare,
deploy-time transitions — not pod churn) and the full catalog replays
on every (re)connect before SNAPSHOT_COMPLETE; the client swaps it
wholesale at the marker (only when the server actually resent state),
so stale names cannot survive a reconnect.

The on-demand observer rejects subscriptions for services not in the
catalog: no dependency-set pollution, no watch-filter churn, no reload,
no RPC for ghosts. New counter: aether.agent.upstreams.rejected. The
new-service race (first caller vs catalog propagation, ~ms) resolves
on the client's retry; declared upstreams remain the answer for
correctness-critical first traffic.

Part 1 of the cold-path convergence work; part 2 (catalog-gated RPC
fill + leading-edge reload) brings cold warms to ~20-30ms.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@bpalermo
bpalermo merged commit 03023dd into main Jun 13, 2026
8 of 9 checks passed
@bpalermo
bpalermo deleted the feat/service-catalog branch June 13, 2026 12:01
bpalermo added a commit that referenced this pull request Jun 13, 2026
TestServiceCatalog_ReplayAndIncrementals (merged in #169) left the fake
watch stream's err nil, so after its events processStream looped
forever — registrar_test TIMEOUT on main (and every branch's CI). Set
io.EOF like the sibling processStream tests. The fix existed on the
#169 branch but the squash-merge raced ahead of it.

Co-authored-by: Claude Opus 4.8 <[email protected]>
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