Repository navigation
Conversation
Add immutable route compilation with precedence, ambiguity checks, and fuzz coverage. Add endpoint selection, health thresholds, and cancellable probe scheduling. This is a partial M2 checkpoint; listener configuration, telemetry integration, scheduler jitter, and remaining M2 gates are not included.
Reviewer's GuideThis PR completes the static M2 data-plane foundation by compiling validated routes into a deterministic matcher, selecting and health-filtering cluster endpoints, running bounded cancellable probes, and integrating the resulting runtime with the gateway, telemetry, command wiring, and acceptance-test coverage. Sequence diagram for deterministic request routing and endpoint selectionsequenceDiagram
participant Client
participant Listener
participant Gateway
participant Matcher
participant Cluster
participant Proxy
participant Endpoint
Client->>Listener: HTTP request
Listener->>Gateway: ServeHTTP
Gateway->>Matcher: Match
Matcher-->>Gateway: Route
Gateway->>Cluster: Select
Cluster-->>Gateway: Endpoint
Gateway->>Proxy: ServeHTTP
Proxy->>Endpoint: Forward request
Endpoint-->>Proxy: HTTP response
Proxy-->>Client: HTTP response
Sequence diagram for scheduled endpoint health checkssequenceDiagram
participant Scheduler
participant Gateway
participant Endpoint
participant Cluster
Scheduler->>Gateway: checkEndpoint
Gateway->>Endpoint: GET health path
alt transport failure or non-2xx response
Endpoint-->>Gateway: probe failure
Gateway->>Cluster: MarkResult false
else successful response
Endpoint-->>Gateway: 2xx response
Gateway->>Cluster: MarkResult true
end
Cluster-->>Gateway: updated health state
Scheduler->>Scheduler: schedule next bounded probe
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
# Conflicts: # docs/Gatehouse_TESTING_CI.md
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. Incorrect route matching, endpoint selection, or health transitions could send live requests to the wrong backend or exclude all eligible backends, causing traffic failures or an outage before the change is reverted. Reverting stops the new behavior but does not undo requests already misrouted or downtime that already occurred.
Summary
Verification
make verifypassed on the M1-integrated tree: vet, Staticcheck, Buf lint and compatibility fixtures, generation cleanliness, module verification, shuffled unit tests, race tests, and govulncheck (no vulnerabilities found).FuzzRouteMatchsmoke completed 374,404 executions.BenchmarkMatch10KRoutesrecorded 239.4 ns/op, 32 B/op, and 1 alloc/op on Go 1.27.1-X:nodwarf3; the benchmark runtime differs from the pinned verification runtime.git diff --checkpassed.Plan status
All listed M2 local acceptance gates are evidenced in
docs/Gatehouse_PLAN.mdanddocs/Gatehouse_TESTING_CI.md. The branch includes the M1 fix through a normal merge. M3 dynamic configuration storage and publication are not part of this PR.Summary by Sourcery
Implement deterministic static routing, health-aware cluster endpoint selection, and gateway integration for the M2 data plane.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: