Skip to content

Enforce Switchyard routing network, retry, fallback, and cancellation policy #8888

Closed as not planned

Description

@cjagwani

Parent Epic: #7937\n\nDepends on the accepted multi-target provider boundary and on released upstream provider-transport protections.\n\n## Outcome\n\nNemoClaw enforces a least-privilege network, resource, diagnostic, and failure contract for Switchyard-routed Hermes calls without forking Switchyard provider transport or adding another routing loop.\n\n## Current upstream gate — 2026-08-25\n\nSwitchyard #271 closed unmerged and no accepted successor was found. That work carried redirect rejection, configurable connection and idle-read timeouts, bounded buffered and error bodies, bounded SSE frames, and credential/provider-body redaction. Switchyard #277 remains open for a separate total request timeout and judge-consultation deadline.\n\nCanonical NemoClaw support remains blocked until these guarantees, or an explicitly accepted equivalent, are released and qualified through the shared Switchyard runner/client used by the Relay plugin.\n\n## Scope\n\n- Permit only the approved sandbox-local provider boundary and explicitly approved telemetry destinations.\n- Deny direct access to upstream model-provider hosts and credential-bypass paths.\n- Consume the released Switchyard runner/client retry and candidate-fallback policy; do not add a second NemoClaw or plugin-owned rerouting/default-target loop.\n- Require the shared provider client to reject cross-authority redirects.\n- Require configurable connection, idle-read, and total-request bounds appropriate for the supported models; distinguish a stalled stream from an active long-running stream.\n- Bound buffered success bodies, retained error bodies, and individual SSE frames before untrusted metadata or line buffering can cause excessive allocation.\n- Keep credentials, static header values, provider-returned bodies, prompts, and secrets out of ordinary Display, Debug, tracing, routing events, and NemoClaw diagnostics.\n- Define the allowed judge/classifier failure policy and deadline. Any upstream classifier fail-open behavior must be explicitly accepted and observable; it cannot silently bypass the requested routing contract.\n- Define timeout, cancellation, shutdown, and the allowed runner/client candidate policy for the supported deployment.\n- Define behavior before and after the first streamed event; never restart a streamed answer in a way that can duplicate or splice output.\n- Record failures and any candidate fallback truthfully through the released routing evidence/status contract.\n- Treat missing released upstream protections as a release blocker rather than reimplementing a parallel HTTP client in NemoClaw.\n\n## Acceptance\n\n- [ ] Intended routed calls succeed while direct-provider egress is denied.\n- [ ] DNS, proxy, TLS, and redirect variants cannot bypass destination binding; a redirect target receives neither prompt nor credential.\n- [ ] Invalid target, connection failure, authentication denial, connect timeout, idle-read timeout, total deadline, rate limit, candidate exhaustion, judge failure, and cancellation have deterministic outcomes.\n- [ ] Inflated Content-Length metadata cannot trigger a large eager allocation before response bytes arrive.\n- [ ] Oversized buffered responses, retained error bodies, and SSE frames fail or truncate according to the released bounded contract without unbounded memory growth.\n- [ ] Provider credentials, static header values, provider bodies, prompts, and secrets are absent from Display, Debug, tracing, routing events, errors, and captured artifacts.\n- [ ] Candidate fallback occurs only through the accepted released Switchyard runner/client policy and is attempted at most as configured.\n- [ ] Judge/classifier timeout or failure is either rejected or follows one explicitly accepted, observable released policy; no silent routing bypass is reported as normal success.\n- [ ] NemoClaw and the Relay plugin do not rerun routing after a selected-target execution failure.\n- [ ] No retry begins after the first streamed event unless the released upstream contract explicitly supports safe continuation.\n- [ ] Restart, teardown, timeout, and cancellation leave no orphan Relay/Switchyard processes, streams, or provider calls owned by NemoClaw.\n- [ ] All transport and diagnostic protections are proven against the exact released runner/client artifact consumed by the native plugin on Linux amd64 and arm64.\n

Activity

  1. self-assigned this
    on Aug 12, 2026
  2. added
    area: networkingDNS, proxy, TLS, ports, host aliases, or connectivity
    area: routingRequest routing, policy routing, model selection, or fallback logic
    area: sandboxOpenShell sandbox lifecycle, runtime, config, or recovery
    on Aug 12, 2026
  3. cjagwani commented on Aug 24, 2026

    @cjagwani
    CollaboratorAuthor

    2026-08-24 ownership and failure-contract update

    The converged ownership boundary is now clearer:

    • Switchyard deployment/client configuration owns router behavior, candidate ordering, retries, and configured target fallback.
    • Relay owns interception and plugin execution in the Hermes process.
    • NemoClaw owns destination policy, provider/credential binding, requested-but-inactive fail-closed readiness, bypass prevention, and end-to-end acceptance.

    Switchyard #528 head 5bfb86e removes the earlier translation preflight as obsolete, fixes Rust formatting, hardens bundle output validation, and now has green CI. It remains review-blocked with focused call-mapping/interceptor test gaps and an unresolved functional concern around preserving context-window errors. NemoClaw should validate the released behavior rather than add a second retry/router implementation.

    Streaming still requires the invariant that no fallback restarts or splices an answer after the first emitted event.

  4. cjagwani commented on Oct 27, 2026

    @cjagwani
    CollaboratorAuthor

    Superseded by #13865 under the replanned #7937 implementation. The replacement tracks the credential, network, and failure boundaries for the first implementation slice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: networkingDNS, proxy, TLS, ports, host aliases, or connectivityarea: routingRequest routing, policy routing, model selection, or fallback logicarea: sandboxOpenShell sandbox lifecycle, runtime, config, or recoveryintegration: hermesHermes integration behavior

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions