Migrating from PATH to SAGE

SAGE is a restructured successor to PATH, built to drop into PATH’s place. Your PATH config loads unmodified, and your clients keep sending the same requests to the same /v1 path with the same Target-Service-Id header. The full contract, with every deliberate difference and the test that holds it, is docs/path-compat.md.

Steps

  1. Run SAGE on your existing PATH config. Same file, same keys:
    bash
    ./sagegw -config /path/to/your/path-config.yaml
  2. Read the startup report. For every key SAGE does not act on, it says so and why (see below). Resolve anything you relied on.
  3. Move your probes. Liveness to /livez or /health, readiness and startup to /ready. See Health and readiness.
  4. Check what your clients read from responses. If anything parses PATH’s metadata headers or the -31001 error code, see What clients see.
  5. Send a share of traffic to SAGE, compare error rates and latency, then move the rest.

What the Startup Report Tells You

SAGE never fails on a PATH key it lacks. It reports each one at startup:

ReportMeaningExamples
IgnoredSAGE has no such settingstrike_system (SAGE uses continuous scoring, not strikes)
Not implementedSAGE handles this another way, and the line says howactive_health_checks.coordination, router_config.max_concurrent_websocket_connections
No effectThe key parses into a field nothing readslatency_profiles (latency breaks ties but never lowers a score), the retry_on_* switches (retryability comes from the response’s grade), lazy_mode and session_rollover_blocks (sessions follow the protocol’s own boundaries)
Probably not what was meantThe value is read; the line says what SAGE will do with itReputation thresholds that do not descend

Most of PATH’s reputation tuning is honoured: signal_impacts, the tiered_selection thresholds, probation and min_threshold.

Keys That Differ

KeyPATHSAGE
owned_apps_private_keys_hexNames the appsStill accepted, with a warning: SAGE only derives the addresses. Prefer owned_apps_addresses (pokt1…), which keeps application keys out of the config
gateway_mode: delegatedSigns for the app the App-Address header namesLoads with a warning: SAGE relays for its configured apps only and ignores the header
retry_config.enabledAbsent means onSame, read from the key’s presence in the YAML
Strikes and cooldownsEndpoints benched by strike countersNo strikes: a continuous score feeds tiered selection

Health and Readiness

RoutePATHSAGE
/healthLivenessLiveness (same)
/healthzReadiness: 503 until a session existsSame
/livez—Liveness
/ready—503 until sessions are ready and reputation has warmed from health checks
/ready/{service}503 without a session or endpointsSame condition

Gate readiness on /ready: a pod that takes traffic on session readiness alone serves errors until reputation has warmed.

What Clients See

Supplier output passes through unchanged: response bodies, JSON-RPC ids and WebSocket frames. What SAGE itself produces follows HTTP and JSON-RPC semantics rather than PATH’s conventions:

AreaPATHSAGE
Gateway-made errorsHTTP 500, JSON-RPC code -31001A status for the cause: 500, 504 on timeout, 429 on rate limit, 400 on a client mistake, 502 for an oversized supplier response
Oversized request or batchRefused by net/http, or a 500413 with a JSON body
Metadata response headersX-Retry-Count, X-Suppliers-Tried, X-Archival-Request, …None. X-Request-ID is echoed, and X-Degraded marks a degraded answer
Target-Suppliers headerPins the relay to listed suppliersIgnored
/v1/{portal_app_id}/… prefixStripped when Portal-Application-ID is setNot stripped: forwarded as the REST path
GET /config, GET /disqualified_endpointsOn the relay portAbsent; the admin port has the equivalents

Requests that PATH refused before relaying (unknown service, unsupported RPC type, malformed JSON-RPC) get the same 400 with a -32600 envelope on SAGE.

Operations That Differ

  • Three listeners. Relays on 3069, admin on loopback 9091, Prometheus on 9090. PATH’s operational routes on the relay port moved to the admin port.
  • One prober per fleet. With Redis, an elected leader sends health-check probes and every replica applies the results, instead of each replica probing every supplier.
  • Metrics are named sage_*. Dashboards and alerts built on PATH’s metric names need new queries; docs/metrics.md lists them all.