fix: move model lifecycle controls off peer-reachable ingress - #1279
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe OpenAI ingress no longer handles runtime model load or unload requests. Legacy lifecycle paths return HTTP 410 before routing. Runtime control-channel wiring is removed. Local lifecycle APIs, rejection behavior, and control-surface documentation receive coverage. ChangesLifecycle ingress separation
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: ⚪ Minimal · up to The change removes peer-reachable model lifecycle controls while preserving canonical local management, inference, tunneling, and owner-control behavior; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Client
participant OpenAIIngress
participant RequestParser
participant MeshTransport
participant InferenceTarget
Client->>OpenAIIngress: POST /mesh/load or /mesh/drop
OpenAIIngress->>RequestParser: classify path
RequestParser->>MeshTransport: identify legacy lifecycle route
MeshTransport-->>Client: HTTP 410 legacy_route_gone
Note over MeshTransport,InferenceTarget: No request is forwarded
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@crates/mesh-llm-host-runtime/src/network/openai/transport_tests/durable_artifacts.rs`:
- Around line 3-55: Expand passive_legacy_lifecycle_paths_are_rejected to use
two test nodes connected through Node::open_http_tunnel and the
STREAM_TUNNEL_HTTP path, with the receiving node’s API proxy handling /mesh/load
and /mesh/drop. Assert each response is 410 Gone with legacy_route_gone, and
verify the runtime state remains unchanged and no inference request is
forwarded.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 71138dfb-e62f-4c79-a92a-6c7b8d748d10
📒 Files selected for processing (14)
crates/mesh-llm-host-runtime/src/api/tests/runtime_lifecycle_routes.rscrates/mesh-llm-host-runtime/src/network/openai/ingress.rscrates/mesh-llm-host-runtime/src/network/openai/ingress_tests/durable_artifacts.rscrates/mesh-llm-host-runtime/src/network/openai/request_parse.rscrates/mesh-llm-host-runtime/src/network/openai/response.rscrates/mesh-llm-host-runtime/src/network/openai/response/send.rscrates/mesh-llm-host-runtime/src/network/openai/transport.rscrates/mesh-llm-host-runtime/src/network/openai/transport_tests/durable_artifacts.rscrates/mesh-llm-host-runtime/src/runtime/proxy.rscrates/mesh-llm-host-runtime/src/runtime/proxy/tests/basic.rscrates/mesh-llm-host-runtime/src/runtime/proxy/tests/mod.rscrates/mesh-llm-host-runtime/src/runtime/serving_surface.rsdocs/plugins/plugin-hosted-mesh-serving-design.mdwebsite/src/docs/pages/runtime-lifecycle.md
💤 Files with no reviewable changes (3)
- crates/mesh-llm-host-runtime/src/network/openai/ingress_tests/durable_artifacts.rs
- crates/mesh-llm-host-runtime/src/runtime/serving_surface.rs
- crates/mesh-llm-host-runtime/src/runtime/proxy.rs
a429090 to
ae1a79e
Compare
michaelneale
left a comment
There was a problem hiding this comment.
thanks, yes we need this.
ae1a79e to
fe830d3
Compare
Original problem
POST /mesh/loadandPOST /mesh/dropwere handled by the model-aware OpenAI ingress on:9337. Because inboundSTREAM_TUNNEL_HTTPtraffic is relayed to the loopback API port, an admitted peer could reach model lifecycle controls through the same channel intended for inference and discovery.Diagnostics
The request path was traced through the OpenAI ingress, the runtime proxy, and the inbound HTTP tunnel relay. Regression tests cover both direct ingress requests and the passive/bootstrap path used for tunneled peer HTTP requests.
Fix
/mesh/loadand/mesh/droppaths before any inference or model routing, including query-string variants.410 Gonewith thelegacy_route_goneerror code for those legacy paths. They do not reach an inference upstream and cannot mutate runtime state.POST :3131/api/runtime/modelsDELETE :3131/api/runtime/models/{model}This is an HTTP-surface compatibility change only; the mesh wire protocol is unchanged, and mixed-version inference/split serving remains supported.
Validation
just with-lld cargo test -p mesh-llm-host-runtime -- --test-threads=1— 2,455 passed, 8 ignored.just with-lld cargo clippy -p mesh-llm-host-runtime --all-targets -- -D warnings— passed.just build— passed.just website-build— passed.git diff --check— passed.Closes #1190
Summary by CodeRabbit
Breaking Changes
/mesh/loadand/mesh/dropendpoints now return410 Gonewithout changing runtime state, including through inbound tunnels.New Features
Documentation
Tests