Skip to content

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

Merged
pimlock merged 2 commits into
NVIDIA:mainfrom
letv1nnn:expose-sandbox-name-to-supervisor-middleware
Aug 21, 2026
Merged

feat(supervisor): expose sandbox name to middleware request context#2771
pimlock merged 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)

@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.

Comment thread proto/supervisor_middleware.proto
Comment thread docs/extensibility/supervisor-middleware.mdx Outdated
@letv1nnn
letv1nnn force-pushed the expose-sandbox-name-to-supervisor-middleware branch from 9d38ccf to 803dc62 Compare August 20, 2026 13:07
@letv1nnn
letv1nnn requested a review from pimlock August 20, 2026 13:12
Comment thread docs/extensibility/supervisor-middleware.mdx Outdated

@pimlock pimlock left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good now, just one small comment for the documentation update.

@letv1nnn
letv1nnn force-pushed the expose-sandbox-name-to-supervisor-middleware branch from 803dc62 to 7ce3d62 Compare August 21, 2026 09:29
@letv1nnn
letv1nnn requested a review from pimlock August 21, 2026 09:31
@pimlock

pimlock commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 7ce3d62

pimlock
pimlock previously approved these changes Aug 21, 2026
@pimlock
pimlock added this pull request to the merge queue Aug 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 21, 2026
@pimlock

pimlock commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

@letv1nnn looks like the change doesn't build on main (https://github.com/NVIDIA/OpenShell/actions/runs/32503624769/job/96838754570), due to some recent changes needing to handle the extra params. Please rebase your branch on main, update any new code and this should be good to go. Thanks!

Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
@letv1nnn
letv1nnn force-pushed the expose-sandbox-name-to-supervisor-middleware branch from 7ce3d62 to 89af438 Compare August 21, 2026 17:31
@letv1nnn
letv1nnn requested a review from pimlock August 21, 2026 17:42
@pimlock

pimlock commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 89af438

Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
@letv1nnn
letv1nnn force-pushed the expose-sandbox-name-to-supervisor-middleware branch from 89af438 to 244935e Compare August 21, 2026 18:05
@letv1nnn

letv1nnn commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@pimlock, rebased onto latest main and fixed the transparent-TCP http_context call site; mise run ci passes locally.

@pimlock

pimlock commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 244935e

@pimlock
pimlock added this pull request to the merge queue Aug 21, 2026
Merged via the queue into NVIDIA:main with commit 7adc05a Aug 21, 2026
39 checks passed
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