feat(supervisor): expose sandbox name to middleware request context - #8
feat(supervisor): expose sandbox name to middleware request context#8letv1nnn wants to merge 2 commits into
Conversation
Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughWalkthroughMiddleware request context now carries both the originating sandbox ID and name. Network middleware obtains these values from the explicit OCSF sandbox context. Protobuf definitions, tests, documentation, and platform imports reflect the changes. ChangesSandbox identity propagation
Platform import cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds the sandbox name to middleware request context with an empty-string fallback and preserves existing wire field numbers; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
# Conflicts: # crates/openshell-supervisor-network/src/l7/middleware.rs
Summary
Adds the originating sandbox name to the supervisor middleware request context. Operator-run middleware already receives the sandbox ID; passing the name alongside it lets audit and approval interfaces show a human-readable identifier instead of an opaque UUID, using data the supervisor already owns.
Related Issue
Closes NVIDIA#2754
Changes
sandbox_namefield toRequestContextinproto/supervisor_middleware.proto; existing field numbers are unchanged for wire compatibility.sandbox_nametoopenshell_supervisor_middleware::HttpRequestInputand carry it into the gRPCRequestContext.sandbox_idandsandbox_namefrom the process-wideopenshell_ocsf::SandboxContextwhen the network supervisor builds middleware input.SandboxContextintomiddleware_request_inputinstead of reading the global inside it, making the identifier copy unit-testable with a real name.docs/extensibility/supervisor-middleware.mdx.Testing
mise run pre-commitpassesChecklist
Summary by CodeRabbit
New Features
Documentation
Bug Fixes