Skip to content

feat(erpc:PLA-695): pluggable routing strategies and capability-aware filtering#38

Merged
0x666c6f merged 1 commit intomorpho-mainfrom
feature/pla-695-erpc-versatility-pluggable-routing-strategies-capability
Mar 4, 2026
Merged

feat(erpc:PLA-695): pluggable routing strategies and capability-aware filtering#38
0x666c6f merged 1 commit intomorpho-mainfrom
feature/pla-695-erpc-versatility-pluggable-routing-strategies-capability

Conversation

@0x666c6f
Copy link
Copy Markdown
Collaborator

@0x666c6f 0x666c6f commented Mar 3, 2026

Summary

  • add capability tags to upstream config (upstreams[].capabilities) and method requirements (methods.definitions.<method>.requires)
  • enforce capability matching in network upstream selection to prevent routing a method to incompatible upstreams
  • add routing strategy registry and new strategies: latency-aware, cost-aware, rendezvous
  • keep default behavior unchanged (score-based)
  • add focused tests for capability normalization/filtering and strategy behavior/distribution

Validation

  • go test ./common -run 'Test(NormalizeCapabilityTags|HasAllCapabilities|IsValidCapabilityTag)$' -count=1
  • go test ./upstream -run 'TestUpstreamsRegistry_(RoundRobinStrategy|LatencyAwareStrategy|CostAwareStrategy|RendezvousStrategyDeterministicDistribution)$' -count=1
  • go test ./erpc -run 'Test(FilterUpstreamsByRequiredCapabilities|NetworkForward_MethodCapabilitiesMismatchPrevented)$' -count=1
  • go test ./erpc -run '^$' -count=1
  • go test ./erpc -run 'TestNetwork_Forward_InfiniteLoopWithAllUpstreamsSkipping|TestNetwork_Forward_BatchSelectionCacheReuse' -count=1
  • make agent-check
  • make agent-review-load

@0x666c6f 0x666c6f changed the base branch from feature/pla-694-erpc-tracker-resilience-cordon-persistence-reorg-aware-lag to morpho-main March 4, 2026 16:49
@0x666c6f 0x666c6f merged commit 9d6a79c into morpho-main Mar 4, 2026
1 check passed
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