Skip to content

feat(supervisor): expose sandbox name to middleware request context - #2771

Open
letv1nnn wants to merge 2 commits into
NVIDIA:mainfrom
letv1nnn:expose-sandbox-name-to-supervisor-middleware
Open

feat(supervisor): expose sandbox name to middleware request context#2771
letv1nnn wants to merge 2 commits into
NVIDIA:mainfrom
letv1nnn:expose-sandbox-name-to-supervisor-middleware

Conversation

@letv1nnn

Copy link
Copy Markdown
Contributor

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 #2754

Changes

  • Add sandbox_name field to RequestContext in proto/supervisor_middleware.proto; existing field numbers are unchanged for wire compatibility.
  • Add sandbox_name to openshell_supervisor_middleware::HttpRequestInput and carry it into the gRPC RequestContext.
  • Populate sandbox_id and sandbox_name from the process-wide openshell_ocsf::SandboxContext when the network supervisor builds middleware input.
  • Inject the SandboxContext into middleware_request_input instead of reading the global inside it, making the identifier copy unit-testable with a real name.
  • Document the request-context identifiers and their empty-string fallback in docs/extensibility/supervisor-middleware.mdx.
  • Drop the #[cfg(target_os = "linux")] gate on the std::path::Path import in openshell-driver-podman's container.rs. Path is used unconditionally in a public function signature, so the gated import broke the non-Linux (macOS) build after merging main. Unrelated to the feature but required for the branch to compile cross-platform.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
# Conflicts:
#	crates/openshell-supervisor-network/src/l7/middleware.rs
@copy-pr-bot

copy-pr-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(supervisor): expose sandbox name to supervisor middleware

2 participants