Repository navigation
Parity with AX f3e6ecc: Gateways and rax --trace - #18
Merged
Merged
Conversation
Gateways: AX's new gateway.proto (copied unchanged, with ax.proto and task.proto) adds the Gateway kind, its five RPCs and TaskSpec.gateway. Its egress rules are Agent Substrate's EgressRule, so Substrate's ateapi.proto moves to proto/substrate/api/ateapi/v1, where gateway.proto's import finds it, and rax-api generates its messages (not its service) into rax_api::substrate::ateapi::v1. buf formats and lints only AX's own protos, as AX's make generate does. - rax-api: the Gateway manifest, validate_gateway (one kind per rule; no `*`, IP addresses or localhost; credentials only on https rules without wildcards; ports required on tlsPassthrough) and spec.gateway needing a name. - rax-store: Gateway records in both stores, and AX's gateways table. - rax-server: Get, List, Create (AlreadyExists when present), Update (NotFound when missing) and DeleteGateway under the gateway lock. CreateTask refuses spec.gateway with Unimplemented until gateway rules are enforced, since a task is immutable. - rax-cli: apply, get, describe and delete gateways, with AX's output. --trace: the command gets a sampled root span whose trace ID goes to stderr, resolving the server address is a child span, and each AX RPC is a client span that sends a W3C traceparent. Without the flag no tracer is made and no trace context is sent. Spans are kept and exported once over OTLP, only when an OTLP endpoint is set, within 2 s (200 ms on a double Ctrl-C in ssh) and without retries; a failed export is a warning naming the endpoint. The OTEL_*_EXPORTER rules and the resource move from rax-server into a new rax-otelenv crate, which both use, as AX moved them into otelenv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193yhp36oDAu6CBMYsbPxH8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193yhp36oDAu6CBMYsbPxH8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Hoffmann · project thread
Brings RAX from AX
dcdfd0ato AXf3e6ecc(2026-11-12).Gateways
AX added a Gateway kind, whose egress rules are Agent Substrate's
EgressRule, along with five RPCs andTaskSpec.gateway.gateway.proto,ax.protoandtask.protoare copied unchanged. Substrate'sateapi.protomoves toproto/substrate/api/ateapi/v1so that the import ingateway.protoresolves. rax-api generates only the Substrate messages, not its service. buf formats and lints only AX's protos (--path proto/pkg/apis), the same way AX'smake generatedoes.validate_gateway, with AX's rules: exactly one kind per rule; no*, IP addresses orlocalhost; credentials only onhttpsrules without wildcards; ports required ontlsPassthrough.spec.gatewaymust have a name.gatewaystable.spec.gatewaywithUnimplemented, as AX does until gateway rules are enforced.apply,get,describeanddeletework on gateways, with AX's output.rax --tracetraceparent.ssh) and does not retry. A failed export prints a warning that names the endpoint.OTEL_*_EXPORTERrules and the telemetry resource move into a newrax-otelenvcrate shared by rax-server and the CLI, mirroring AX'sotelenv.Not ported
These AX changes are CI and repository settings with no RAX feature: golangci-lint /
make verify, rulesets managed as code, and skipping E2E on docs-only changes. RAX already lints with clippy. AX's labeledbreakfix in the reconciler has no Rust counterpart, because the Rust retry loop has no such bug.Testing
cargo fmt --check,cargo clippy --all-targets -D warnings,cargo test --all: 201 tests pass, up from 191. buf format and lint are clean.--trace(thetraceparentheader, export to a fake OTLP collector, and the warning when the collector is unreachable).Generated by Claude Code